moiph / ub3r-b0t

A Discord/IRC Bot
MIT License
94 stars 27 forks source link

Regex breaks hardcoded commands #8

Closed BrokeProtocol closed 6 years ago

BrokeProtocol commented 6 years ago

Found a bug with regex, if you use regex to remove command messages like . or like .cat for example, the command won't run. The temp fix would be to just remove the related regex filter but that seems counter-intuitive. For example, I have given UB3R-BOT "Managed Message" permissions on all channels that I want commands to be automatically deleted, while the channel #commands has the permission revoked; where as the bot will not be able to delete command messages contrary to the regex filter. Even while the permission is revoked, no responses are given when a command is issued, since the regex filter is trying to delete the message but the bot cannot due to inefficient permissions.

Commands should be given priority over regex filter. People will also be able to disable hardcoded commands that you cannot disable via the dashboard like .help with using the regex filter.

moiph commented 6 years ago

Fix is done, pending going live.

moiph commented 6 years ago

Fixed with a01eedbd63b7e791151ea835a74cf3c9f882bee5

moiph commented 6 years ago

Fix is live

moiph commented 6 years ago

Actually fixed in commit d9c3ec44c3be10e82b3bbf23d963c27b57993bda