projects
/
sylphiette-bot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cc34fd
)
added channel id command
author
Eduardo
<
[email protected]
>
Thu, 28 Mar 2024 23:40:13 +0000
(
00:40
+0100)
committer
Eduardo
<
[email protected]
>
Thu, 28 Mar 2024 23:40:13 +0000
(
00:40
+0100)
telegram.go
patch
|
blob
|
history
diff --git
a/telegram.go
b/telegram.go
index b9790bfca7d91a7fe0e02bc032596e7b9372b636..ac6aff1b2c5fcad0b04767ed9714c3aa1b563b54 100644
(file)
--- a/
telegram.go
+++ b/
telegram.go
@@
-2,6
+2,7
@@
package main
import (
"context"
+ "fmt"
"log"
"regexp"
"strings"
@@
-81,6
+82,9
@@
func handleCommand(chatId int64, command string) error {
case "/help":
err = sendTelegramMessage(chatId, "Currently my only comands are /start, /help and /sylph\n I'm a work in progress, please don't tease me.")
+ case "/channel_id":
+ err = sendTelegramMessage(chatId, "The ID of this chat is <code>"+fmt.Sprint(chatId)+"</code>")
+
case "/s",
"/sylph",
"/sylphi",