Discord bot preventing multiple command instances

Viewed 37

I'm working on a discord bot in C#. While testing I realized that players are able to start a command and while they are interacting with it they can open the command again and interact with it again, this can continue indefinitely. How can I check if there is a command open for that player and disallow them from using another command until the one has finished.

Currently my thought is to use my database to track their in use status, but if I can prevent repetitive calls to the database I would prefer that.

0 Answers
Related