We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f402d50 commit 2d8913eCopy full SHA for 2d8913e
1 file changed
packages/main/src/telegram_bot.ts
@@ -77,8 +77,8 @@ export default class TelegramBot {
77
}
78
79
// Then check if it's a command starting with /
80
- if (args.at(0)?.startsWith('/')) {
81
- const command = args.at(0)?.slice(1) ?? '';
+ if (args[0] && args[0].startsWith('/')) {
+ const command = args[0].substring(1, args[0].lastIndexOf('@') > -1 ? args[0].lastIndexOf('@') : args[0].length);
82
return command in this.commands ? command : this.defaultCommand;
83
84
0 commit comments