Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion gateway/platforms/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,11 @@ def get_command(self) -> Optional[str]:
return None
# Split on space and get first word, strip the /
parts = self.text.split(maxsplit=1)
return parts[0][1:].lower() if parts else None
cmd = parts[0][1:].lower() if parts else None
# Strip @botname suffix (Telegram appends it in groups, e.g. /model@MyBot_bot)
if cmd and '@' in cmd:
cmd = cmd.split('@')[0]
return cmd

def get_command_args(self) -> str:
"""Get the arguments after a command."""
Expand Down