1
0
forked from sass/tipibot

Change admin command permissions

This commit is contained in:
Rene Arumetsa
2026-06-01 22:11:44 +03:00
parent 8d7ac504ca
commit b0e23c1a17
6 changed files with 66 additions and 19 deletions

4
bot.py
View File

@@ -22,6 +22,7 @@ import psutil
import config
import strings as S
from core import economy, pb_client, sheets
from core.admin import is_bot_admin
from core.member_sync import SyncResult
from commands.dev_member_commands import register_dev_member_commands
from commands.dev_member_runtime import handle_member_join, run_birthday_daily
@@ -593,8 +594,7 @@ class HelpSelect(discord.ui.Select):
@tree.command(name="help", description=S.CMD["help"])
async def cmd_help(interaction: discord.Interaction):
perms = interaction.user.guild_permissions if interaction.guild else None
is_admin = bool(perms and (perms.manage_roles or perms.manage_guild))
is_admin = is_bot_admin(interaction.user)
await interaction.response.send_message(
embed=_help_embed("üldine"), view=HelpView(is_admin), ephemeral=True
)