mirror of
https://github.com/stoatchat/python-client-sdk.git
synced 2026-07-25 16:35:33 -04:00
Mentioning an out-of-server user gives a crash in revolt.websocket.handle_message #27
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MysticMia on GitHub (Jul 2, 2023).
Describe the bug
If a member mentions a user that isn't in cache (the crash happens in DMs too, apparently), it crashes. This is especially an issue if the bot sends a message mentioning a user that isn't in the cache, specifically an out-of-serverm user, because then this crash causes the current function to stop.
To Reproduce
Expected behavior
I expected to see "Second print statement" being printed in console, but this didn't happen due to it crashing.
Traceback
Note how there are 2 crashes: 1 for my bot's function sending a message with an out-of-server member that tries to return the sent message, and one for the handle_message event that tries to add the message to cache. Both have the same error source though.
Library version
Version 0.1.11 commit
5ee3c60(most recent GitHub version)Additional context
The crash resulting in the discontinuation of your function can be caught by catching the LookupError, but you will still get a crash for the handle_event()