forked from sass/tipibot
Change admin command permissions
This commit is contained in:
@@ -8,6 +8,7 @@ import discord
|
||||
from discord import app_commands
|
||||
|
||||
from core import sheets
|
||||
from core.admin import bot_admin_check
|
||||
import strings as S
|
||||
from core.member_sync import announce_birthday, sync_member, today_local
|
||||
|
||||
@@ -167,7 +168,7 @@ def register_dev_member_commands(
|
||||
|
||||
@tree.command(name="check", description=S.CMD["check"])
|
||||
@app_commands.guild_only()
|
||||
@app_commands.default_permissions(manage_roles=True)
|
||||
@bot_admin_check()
|
||||
async def cmd_check(interaction: discord.Interaction):
|
||||
await interaction.response.defer(ephemeral=True)
|
||||
|
||||
@@ -281,7 +282,7 @@ def register_dev_member_commands(
|
||||
|
||||
@tree.command(name="member", description=S.CMD["member"])
|
||||
@app_commands.guild_only()
|
||||
@app_commands.default_permissions(manage_roles=True)
|
||||
@bot_admin_check()
|
||||
async def cmd_member(interaction: discord.Interaction, user: discord.Member):
|
||||
row = sheets.find_member(user.id, user.name)
|
||||
if row is None:
|
||||
|
||||
Reference in New Issue
Block a user