added channel id command
authorEduardo <[email protected]>
Thu, 28 Mar 2024 23:40:13 +0000 (00:40 +0100)
committerEduardo <[email protected]>
Thu, 28 Mar 2024 23:40:13 +0000 (00:40 +0100)
telegram.go

index b9790bfca7d91a7fe0e02bc032596e7b9372b636..ac6aff1b2c5fcad0b04767ed9714c3aa1b563b54 100644 (file)
@@ -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",