Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[messageslog] no longer working under redbot 3.5.x version #217

Open
freakexeuLow opened this issue May 7, 2023 · 2 comments · May be fixed by #196
Open

[messageslog] no longer working under redbot 3.5.x version #217

freakexeuLow opened this issue May 7, 2023 · 2 comments · May be fixed by #196
Labels
bug pls fix

Comments

@freakexeuLow
Copy link

Describe the bug
After the 3.5.x update I wanted to check again if all commands of the respective cogs work, unfortunately your system was also affected where the bot has no longer responded to it :D an error message does not come, he also loads your system, but I can not see after I enter the green rake that he has accepted it. So, unfortunately i can't tell you more because i don't have any more info or error messages

To Reproduce
[/ or !]messageslog channel ⁠log-channel-for-all-chats

@freakexeuLow freakexeuLow added the bug pls fix label May 7, 2023
@JMeta0
Copy link

JMeta0 commented May 22, 2023

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!

@fixator10 fixator10 linked a pull request Jun 1, 2023 that will close this issue
43 tasks
@freakexeuLow
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pls fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants