feat: unify set-home command naming across platforms
- Updated the command name from `/set-home` to `/sethome` in the GatewayRunner class for consistency. - Added a new slash command `/sethome` in the Discord adapter to set the home channel. - Registered the `/sethome` command in the Telegram adapter to align with the updated naming convention.
This commit is contained in:
parent
79f8831738
commit
674a6f96d3
3 changed files with 15 additions and 4 deletions
|
|
@ -513,6 +513,16 @@ class DiscordAdapter(BasePlatformAdapter):
|
|||
except Exception as e:
|
||||
logger.debug("Discord followup failed: %s", e)
|
||||
|
||||
@tree.command(name="sethome", description="Set this chat as the home channel")
|
||||
async def slash_sethome(interaction: discord.Interaction):
|
||||
await interaction.response.defer(ephemeral=True)
|
||||
event = self._build_slash_event(interaction, "/sethome")
|
||||
await self.handle_message(event)
|
||||
try:
|
||||
await interaction.followup.send("Done~", ephemeral=True)
|
||||
except Exception as e:
|
||||
logger.debug("Discord followup failed: %s", e)
|
||||
|
||||
@tree.command(name="stop", description="Stop the running Hermes agent")
|
||||
async def slash_stop(interaction: discord.Interaction):
|
||||
await interaction.response.defer(ephemeral=True)
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ class TelegramAdapter(BasePlatformAdapter):
|
|||
BotCommand("undo", "Remove the last exchange"),
|
||||
BotCommand("status", "Show session info"),
|
||||
BotCommand("stop", "Stop the running agent"),
|
||||
BotCommand("sethome", "Set this chat as the home channel"),
|
||||
BotCommand("help", "Show available commands"),
|
||||
])
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue