From 977a8b1d1eca8346a8964dc40df598b4a5e37ad8 Mon Sep 17 00:00:00 2001 From: Myned Date: Fri, 4 Mar 2022 00:01:21 -0600 Subject: [PATCH] Potentially fix owner commands for teams --- commands/master.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/master.py b/commands/master.py index 6add516..2aefb64 100644 --- a/commands/master.py +++ b/commands/master.py @@ -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.implements(lightbulb.SlashCommand) 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: case "reload": context.bot.reload_extensions(*context.bot.extensions)