[go: up one dir, main page]

Bug: Race condition in setting requestor of a bot-mediated guild invite

Flow: Command issued -> Bot creates invite -> (Bot received INVITE_CREATE event from gateway / Bot attempts to update database with requestor)

Depending on timings, the bot may try to update the database before the invite record exists. This would result in the requestor not being set for the invite once the INVITE_CREATE event was processed to create said record.

This is problematic, as it results in the bot being unable to correlate that invite the user- disallowing them from revoking it, and preventing the bot itself from revoking it if the member is ever banned.