#18711: fix(telegram): replace hyphens with underscores in export-session command
stale
size: XS
trusted-contributor
Cluster:
Signal and Discord Fixes
Telegram does not allow hyphens in bot command names. This fixes the setMyCommands failure (BOT_COMMAND_INVALID) by changing nativeName from 'export-session' to 'export_session'.
Fixes #18683
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Changed the `nativeName` from `export-session` to `export_session` to comply with Telegram's bot command naming requirements, which only allow lowercase letters, numbers, and underscores (pattern: `^[a-z0-9_]{1,32}$`). This fixes the `BOT_COMMAND_INVALID` error when calling `setMyCommands`.
- The change is consistent with other commands in the registry (e.g., `dock_${dock.id}` at src/auto-reply/commands-registry.data.ts:54)
- Text aliases (`textAliases: ["/export-session", "/export"]`) correctly remain unchanged, as they can still use hyphens for user-facing commands
- The fix resolves the issue where Telegram would reject the command registration due to invalid character (hyphen) in the native command name
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with no risks
- The change is a straightforward one-character fix (hyphen to underscore) that directly addresses a documented Telegram API requirement. The fix is consistent with existing patterns in the codebase and all text aliases remain properly functional.
- No files require special attention
<sub>Last reviewed commit: c0288f3</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#19203: telegram: convert hyphens to underscores in command names
by janckerchen · 2026-02-17
85.6%
#18704: fix(telegram): normalize command names by replacing hyphens with un...
by Limitless2023 · 2026-02-17
82.3%
#11240: Fix #10875: Clear Telegram commands before registering to prevent d...
by divol89 · 2026-02-07
75.6%
#6457: fix(telegram): register commands for group scope + preserve topic t...
by dae-sun · 2026-02-01
74.7%
#15684: fix(telegram): persist relative session transcript paths
by Jdo300 · 2026-02-13
72.3%
#3368: fix: sessions navigation, DM thread display, and DM thread delivery...
by Lukavyi · 2026-01-28
71.9%
#20204: fix(sessions): allow negative IDs and colon separators in session IDs
by zerone0x · 2026-02-18
71.8%
#11132: fix(telegram): guard command menu overflow and doctor warnings
by kiminbean · 2026-02-07
71.4%
#16548: fix(telegram): enhance chat_id validation and diagnostics
by tanujbhaud · 2026-02-14
71.3%
#11347: fix: scope Telegram update offset to bot token
by anooprdawar · 2026-02-07
71.2%