raclettes / discordpy-slash-commands

A cleaner interface with slash commands
MIT License
1 stars 0 forks source link

A way to make all commands use the same set of guild IDs #1

Closed Artemis21 closed 3 years ago

Artemis21 commented 3 years ago

Often I'm making a bot for a single guild, so all my commands will be just for that guild. Passing guild_ids with every command registered would not be ideal, I'd rather just be able to pass it on the SlashCommand initialiser and have it used by default on all commands.

Is this possible?

raclettes commented 3 years ago

Definitely possible. I'll take a look and make it work for the next release 👍

raclettes commented 3 years ago

Got this prepped for release/1.2.2. Hopefully that'll be done within a day, I'll give you a mention when it's there 😉

raclettes commented 3 years ago

https://pypi.org/project/dpyslash/1.2.2/ Here ya go ! @Artemis21. Pass guild_ids to SlashCommand the same way you'd pass it to a function 😉

Artemis21 commented 3 years ago

Looks cool! I ended up re-maintaing my own wrapper for this project, but I imagine this would be useful even for testing normal multi-server bots during development.