nyxx-discord / nyxx_commands

A framework for easily creating slash commands and text commands for Discord using the nyxx library.
Apache License 2.0
13 stars 5 forks source link

Don't use response future as lock in acknowledge #111

Closed abitofevrything closed 1 year ago

abitofevrything commented 1 year ago

Description

The future used as a lock for context.acknowledge was the future returned by the call to interaction.acknowledge which could complete with an error if multiple calls to acknowledge were made.

This PR ensures that the lock is cleared and separate from the interaction.acknowledge call so that awaiting it never causes an exception to be thrown.

Type of change

Checklist: