1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 13:02:38 +00:00

Potentially fix owner commands for teams

This commit is contained in:
Myned 2022-03-04 00:01:21 -06:00
parent 417b43c4e0
commit 977a8b1d1e
No known key found for this signature in database
GPG key ID: 33790F979F7A28B8

View file

@ -13,7 +13,11 @@ plugin = lightbulb.Plugin("master", default_enabled_guilds=c.config["master"])
@lightbulb.command("master", "Commands my master can demand of me", ephemeral=True) @lightbulb.command("master", "Commands my master can demand of me", ephemeral=True)
@lightbulb.implements(lightbulb.SlashCommand) @lightbulb.implements(lightbulb.SlashCommand)
async def master(context): async def master(context):
if context.user.id == context.bot.application.owner.id: owners = (
context.bot.application.team.members if context.bot.application.team else [context.bot.application.owner.id]
)
if context.user.id in owners:
match context.options.command: match context.options.command:
case "reload": case "reload":
context.bot.reload_extensions(*context.bot.extensions) context.bot.reload_extensions(*context.bot.extensions)