mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 06:27:27 +00:00
Potentially fix owner commands for teams
This commit is contained in:
parent
417b43c4e0
commit
977a8b1d1e
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue