GithubHelp home page GithubHelp logo

Comments (2)

JMeta0 avatar JMeta0 commented on May 28, 2024 1

Not sure if my fix is right, but I modified it like this and it seems to be working:
To fix error:

[2023-05-22 12:26:47] [WARNING] py.warnings: /data/cogs/CogManager/cogs/messageslog/__init__.py:11: RuntimeWarning: coroutine 'Red.add_cog' was never awaited
  bot.add_cog(cog)

in file __init__.py
line 11 await bot.add_cog(cog)

To fix error:

[2023-05-22 12:35:32] [ERROR] discord.client: Ignoring exception in on_message_delete
Traceback (most recent call last):
  File "/data/venv/lib/python3.9/site-packages/discord/client.py", line 441, in _run_event
    await coro(*args, **kwargs)
  File "/data/cogs/CogManager/cogs/messageslog/messageslog.py", line 275, in message_deleted
    embed.set_author(name=message.author, icon_url=message.author.avatar_url)
AttributeError: 'Member' object has no attribute 'avatar_url'

in file messageslog.py
line 275 embed.set_author(name=message.author, icon_url=message.author.avatar.url)
line 429 embed.set_author(name=before.author, icon_url=before.author.avatar.url)

Tested it on Red version 3.5.2 and now editing and removing messages does not produce errors in my case. I have no idea what I'm doing (never wrote any cog) but it seem to work for me. Maybe that will help!

from fixator10-cogs.

freakexeuLow avatar freakexeuLow commented on May 28, 2024

Not sure if my fix is right, but I modified it like this and it seems to be working: To fix error:

[2023-05-22 12:26:47] [WARNING] py.warnings: /data/cogs/CogManager/cogs/messageslog/__init__.py:11: RuntimeWarning: coroutine 'Red.add_cog' was never awaited
  bot.add_cog(cog)

in file __init__.py line 11 await bot.add_cog(cog)

To fix error:

[2023-05-22 12:35:32] [ERROR] discord.client: Ignoring exception in on_message_delete
Traceback (most recent call last):
  File "/data/venv/lib/python3.9/site-packages/discord/client.py", line 441, in _run_event
    await coro(*args, **kwargs)
  File "/data/cogs/CogManager/cogs/messageslog/messageslog.py", line 275, in message_deleted
    embed.set_author(name=message.author, icon_url=message.author.avatar_url)
AttributeError: 'Member' object has no attribute 'avatar_url'

in file messageslog.py line 275 embed.set_author(name=message.author, icon_url=message.author.avatar.url) line 429 embed.set_author(name=before.author, icon_url=before.author.avatar.url)

Tested it on Red version 3.5.2 and now editing and removing messages does not produce errors in my case. I have no idea what I'm doing (never wrote any cog) but it seem to work for me. Maybe that will help!

hey and thanks for the answer and is there a way around this?
"This cog requires different Red version than you currently have (3.5.2): messageslog (Minimum: 3.4.0, at most: 3.4.99)" i try to reinstall it, but the system will not let me

from fixator10-cogs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.