coding-buddies-discord / cb-bots

4 stars 3 forks source link

Implement one reply per user message #24

Closed simshadows closed 2 years ago

simshadows commented 2 years ago

Currently, multiple commands are read in from a single user message, and each command will have its own reply.

I think some kind of implementation to limit this behaviour is required, otherwise users can DoS the bot in a single message, locking the bot up for the full duration in which the command is being processed (due to Discord API rate limiting) and causing the bot to spam the channel.

My suggestion:

cubiquitous commented 2 years ago

I think that I mostly agree with you on that. I'm just not sure about the third one.

one thing that I hadn't considered thus far is the pollution that could occur due to multiple points and commands being given by more than 1 person at the same time. by following what you suggested, we can get rid of this type of problem.

waream2 commented 2 years ago
  1. I agree 100% with point one. The bot will just have a hard rule, "one command per message" otherwise all other messages will be ignored.
  2. Also with you here, lets wrap up all those point messages and just reply one time per message with points given. (this will be fun to figure out)
  3. I would perhaps suggest that the bot DMs the user directly and tells them that this is an invalid command and gives them instructions on how to do it properly? I think otherwise, if we dont inform the user that what they are trying to do doesn't work, it will cause confusion when only one of the comamnds work. Thoughts?
simshadows commented 2 years ago
  1. I would perhaps suggest that the bot DMs the user directly and tells them that this is an invalid command and gives them instructions on how to do it properly? I think otherwise, if we dont inform the user that what they are trying to do doesn't work, it will cause confusion when only one of the comamnds work. Thoughts?

I think it's worth turning into its own issue. My current opinion is that invalid command names don't give any feedback, but invalid command arguments should give feedback, and that this feedback should be provided in the same channel as the command invocation.