removed some not very useful vars
authorEduardo <[email protected]>
Thu, 28 Mar 2024 23:41:44 +0000 (00:41 +0100)
committerEduardo <[email protected]>
Thu, 28 Mar 2024 23:41:44 +0000 (00:41 +0100)
bot.go
telegram.go

diff --git a/bot.go b/bot.go
index 1bc9e91c962e599c6a8715ce5d8d2e3433297cfe..791af43e07956b6a3cf1a86935ef6007b4f47955 100644 (file)
--- a/bot.go
+++ b/bot.go
@@ -19,11 +19,10 @@ var (
        TgApiToken   = "7113650816:AAFBlE-AAeLxIv6Kawk4OohtQ72pz55_s_4"
        DiscApiToken = "MTIwMzg0MzAyMDg5ODgzMjM5NA.G6e3Eo.yU90uQzHOMCw-cHguOhzwlXhnIcHo5YId60U64"
 
-       UpdateTextBtn  = "Update"
-       InitBotText    = "I'm new here, I need to update my text. Click the button below to update it."
+
        menuTextMarkup = tgbotapi.NewInlineKeyboardMarkup(
                tgbotapi.NewInlineKeyboardRow(
-                       tgbotapi.NewInlineKeyboardButtonData(UpdateTextBtn, UpdateTextBtn),
+                       tgbotapi.NewInlineKeyboardButtonData("Update", "Update"),
                ),
        )
 
@@ -35,7 +34,7 @@ var (
        lastMsg *tgbotapi.Message
 
        // bot text message
-       botText string = InitBotText
+       botText string = "I'm new here, I need to update my text. Click the button below to update it."
 
        Members []*discordgo.Member
 
index ac6aff1b2c5fcad0b04767ed9714c3aa1b563b54..0c165707c55d436fff61757ad7bef569752bb28e 100644 (file)
@@ -149,7 +149,7 @@ func handleButton(query *tgbotapi.CallbackQuery) {
                botMsg = message
        }
 
-       if query.Data == UpdateTextBtn {
+       if query.Data == "Update" {
                text = botText
                markup = menuTextMarkup
        }