fix(discord): register native /restart slash command

This commit is contained in:
areu01or00
2026-04-14 01:52:22 +05:30
committed by Teknium
parent b24e5ee4b0
commit cfa24532d3
2 changed files with 21 additions and 0 deletions

View File

@@ -1696,6 +1696,10 @@ class DiscordAdapter(BasePlatformAdapter):
async def slash_update(interaction: discord.Interaction):
await self._run_simple_slash(interaction, "/update", "Update initiated~")
@tree.command(name="restart", description="Gracefully restart the Hermes gateway")
async def slash_restart(interaction: discord.Interaction):
await self._run_simple_slash(interaction, "/restart", "Restart requested~")
@tree.command(name="approve", description="Approve a pending dangerous command")
@discord.app_commands.describe(scope="Optional: 'all', 'session', 'always', 'all session', 'all always'")
async def slash_approve(interaction: discord.Interaction, scope: str = ""):