coding-buddies-discord / cb-bots

4 stars 3 forks source link

Change invalid command handling #27

Closed simshadows closed 2 years ago

simshadows commented 2 years ago

Currently (as far as I can tell), all invalid commands are replied to in the same channel of invocation:

image

I think it's worth considering changing to a more silent behaviour.

My suggestion:

Alternative ideas:


(This issue originates from the comments of #24)

cubiquitous commented 2 years ago

I just checked and if you write code like "a" !== "b" it will see as if is a command, so even normal code written could be interpreted by the bot. therefore I also think that we should change this behavior

simshadows commented 2 years ago

image

🤔

simshadows commented 2 years ago

Side-note: the error message is also vulnerable to MD injection

image

cubiquitous commented 2 years ago

just to add to the issue for documentation purposes, @doulovera pointed out that any message containing ! in the beginning will trigger the command, even if is in a codeblock. image

Due to this, I'm in favor of @doulovera proposal of only triggering a command if is in the beginning of a message.