FugiTech / kaet

Chat bot for twitch.tv/kate
MIT License
7 stars 5 forks source link

!addcommand/!removecommand shouldn't work on built-ins #6

Closed r4v5 closed 7 years ago

r4v5 commented 7 years ago

Let's say some hapless fool calls !addcommand Help this streamer do great things! because they forgot the command they wanted to define. This text then shadows !help for the lifetime of the bot's process, and also affects aliased commands like !halp. !removecommand help manages to remove the errant command but doesn't actually restore !help's default behavior, so it actually removes the command (and any aliases like !halp). (This also extends to !removecommand removecommand, so, uh, be careful.)

We probably should detect when !addcommand or !removecommand would collide with a built-in and produce a helpful "I'm afraid I can't let you do that" type message.