UQComputingSociety / uqcsbot-discord

:mortar_board: UQCSbot: Our friendly little Discord bot
https://discord.uqcs.org
MIT License
20 stars 20 forks source link

Add decorator to require server usage #178

Open andrewj-brown opened 1 year ago

andrewj-brown commented 1 year ago

Several commands do permissions checks that fall over or behave annoyingly when they're used in DMs. (PR #176) Several more commands just generally assume they occur in servers, and may fail in spectacular ways if they aren't.

It'd be nice if we could codify this with some sort of @require_server decorator, that requires the interaction to take place inside UQCSBot.uqcs_server.