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
If a long-running fetch task occurs (i.e. getting an image for a command) and more messages arrive before the API response is received, the cached "last message" is updated and the channel the response is sent to will change.
This change set removes the caching of the last received message from the bot's discord client. The old behaviour meant if a message comes in during processing, it would potentially respond to the wrong channel.
The code has been updated to explicitly pass through the source message so the response is sent to the same channel.
Addresses #49
If a long-running fetch task occurs (i.e. getting an image for a command) and more messages arrive before the API response is received, the cached "last message" is updated and the channel the response is sent to will change.
i.e.:
Channel 1 userA: +get-slow-api-response
*bot begins data request
Channel 2: userB: anything
*API returns results, bot processes
Channel 2: bot: api response
This means the bot can potentially post a response to a request in a different server.
The text was updated successfully, but these errors were encountered: