You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
This time, no PR, as I'm not yet sure what the correct way to handle it is.
handle_message_update in State crashes when a private message is updated, because make_message tries to check message.channel.type. However, message.channel can return None if the channel is a private channel that we haven't seen yet (because it was created before a restart of the Bot, for example)
I think message.channel should, if it can't find a channel in the cache, call the Discord channel/{id} endpoint to get the necessary information
This is a pretty serious bug, BTW, because once it occurs, the bot basically stops handling any events and has to be restarted
The text was updated successfully, but these errors were encountered:
message.channel is a property, so that wouldn't work (you'd have to channel = await message.channel).
I think the best way to handle this is to just go with the standard and exit from state parsing entirely, as is the standard case when dealing with cache inconsistently.
Fuyukai
changed the title
message_update crashes in a private channel that was created before bot restart
message_update events disappear in private channels that are not newly created
Jun 19, 2018
Reported as discord/discord-api-docs#615. According to discord/discord-api-docs#184 they try to work around that by issuing a CHANNEL_CREATE before sending a MESSAGE_CREATE, which works fine, but they forgot to also send when sending a MESSAGE_UPDATE.
Given my previous experience with Discord bugs, I wouldn't hold my breath until they fix it (if they ever do)
This time, no PR, as I'm not yet sure what the correct way to handle it is.
handle_message_update
in State crashes when a private message is updated, becausemake_message
tries to checkmessage.channel.type
. However,message.channel
can return None if the channel is a private channel that we haven't seen yet (because it was created before a restart of the Bot, for example)I think
message.channel
should, if it can't find a channel in the cache, call the Discordchannel/{id}
endpoint to get the necessary informationThis is a pretty serious bug, BTW, because once it occurs, the bot basically stops handling any events and has to be restarted
The text was updated successfully, but these errors were encountered: