Ooglely / pugBot

Discord bot to run TF2 pick up games | pugbot.tf
https://pugbot.tf
21 stars 1 forks source link

Whitelist channels for commands #28

Closed zjgarrett closed 10 months ago

zjgarrett commented 10 months ago

Currently commands can be executed anywhere. There are restrictions on who can execute some commands, but server admins might appreciate also having a way to restrict where commands can be executed. Limiting where commands can be executed can prevent potential abuse (spam) or potentially leaking sensitive information. For example, TF2CC has typically wanted to keep stats like ELO and win rate private to avoid bullying, unnecessary bragging, and other toxicity that might stem from that information being public.

This would require a new database field to store each guild's list of allowed channels, a few commands to manage this list, and a decorator for restricted commands.

Some commands could be left unaffected by the whitelist. I personally see no issues with leaving /search unrestricted.

zjgarrett commented 10 months ago

Forgot that there was a native way to restrict bots within discord itself