aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2022-02-14 04:45:11 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2022-02-14 04:45:11 +0300
commit72b336a5f5641adcfa535270862191d9072dba3c (patch)
treee65f5568ac7480b12bced13dee680b9d76890fbb /telegram/utils.go
parent915c40f1eed6ba139323c0fa15eed4ed3792f34b (diff)
Support ! prefix for commands in addition to /
Diffstat (limited to 'telegram/utils.go')
-rw-r--r--telegram/utils.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/telegram/utils.go b/telegram/utils.go
index 7e93e57..d9773c0 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -666,7 +666,7 @@ func (c *Client) ProcessOutgoingMessage(chatID int64, text string, returnJid str
return nil
}
- if returnJid != "" && strings.HasPrefix(text, "/") {
+ if returnJid != "" && (strings.HasPrefix(text, "/") || strings.HasPrefix(text, "!")) {
// try to execute commands
response, isCommand := c.ProcessChatCommand(chatID, text)
if response != "" {