Skip to content

Conversation

@notsniped
Copy link
Member

It would return this exception in stdout for absolutely no reason (if someone were to message in a server where no one is AFK)

Ignoring exception in on_message
Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "main.py", line 104, in on_message
    for x in user_presence[str(ctx.guild.id)].keys(): uList.append(x)
KeyError: '873417861589262367'

It's kinda annoying seeing this exception flooding the verbose log when there isn't even anything wrong with the code or the bot.

@notsniped notsniped added enhancement New feature or request priority:high area:main Changes to the main functioning code type:code quality Anything that improves the source's code quality type:patch Bug fixes for the bot and/or it's commands labels Aug 22, 2022
@notsniped notsniped self-assigned this Aug 22, 2022
@notsniped notsniped merged commit e006a1c into main Aug 22, 2022
@notsniped notsniped deleted the afksystem.fix-error-if-guild-has-no-afk-statuses branch August 22, 2022 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:main Changes to the main functioning code enhancement New feature or request priority:high size/XS type:code quality Anything that improves the source's code quality type:patch Bug fixes for the bot and/or it's commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant