1
0
forked from sass/tipibot

Edit discord role rights

This commit is contained in:
Rene Arumetsa
2026-06-01 22:19:12 +03:00
parent 24de79c503
commit 42f7bae681
6 changed files with 73 additions and 19 deletions

5
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,8 @@ 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))
member = interaction.user
is_admin = isinstance(member, discord.Member) and is_bot_admin(member)
await interaction.response.send_message(
embed=_help_embed("üldine"), view=HelpView(is_admin), ephemeral=True
)