Voxel-Fox-Ltd / VoxelBotUtils

An extension of the Discord.py library to improve the bot development process.
https://voxelbotutils.readthedocs.io/en/latest/
GNU General Public License v2.0
34 stars 12 forks source link

IMPORTANT - owner only cog with `create_cog` #122

Closed schlopp closed 3 years ago

schlopp commented 3 years ago

Currently menus.Menu.create_cog doesn't support owner only cogs. This creates some VERY bad bugs (I am not supposed to be able to use this): image I think a owner_only: Optional[bool] = False arg for menus.Menu.create_cog would be pretty hot

schlopp commented 3 years ago

permissions: Optional[List[str]] = [] would be pretty hot Example: x.create_cog(bot, permissions=['manage_messages'] > cog can only be used by people with the manage_messages perm

4Kaylum commented 3 years ago

Cool thank you that's just something I missed. I'd prefer it to be a manage guild permission if you want to PR it in, but if not then I'll do that later today. I'll grandfather it in to a 0.5.10 release so you don't need to wait for a 0.6 release, though you can create your own cog and command and use settings_menu.start(ctx) in it.

4Kaylum commented 3 years ago

oh I didn't read the second message that would be very good