From: Eduardo Date: Thu, 28 Mar 2024 23:41:44 +0000 (+0100) Subject: removed some not very useful vars X-Git-Url: http://git.edufdez.es/?a=commitdiff_plain;h=d7a12677d3cceb0f95ea017985445bff2a8ad2b9;p=sylphiette-bot.git removed some not very useful vars --- diff --git a/bot.go b/bot.go index 1bc9e91..791af43 100644 --- 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 diff --git a/telegram.go b/telegram.go index ac6aff1..0c16570 100644 --- a/telegram.go +++ b/telegram.go @@ -149,7 +149,7 @@ func handleButton(query *tgbotapi.CallbackQuery) { botMsg = message } - if query.Data == UpdateTextBtn { + if query.Data == "Update" { text = botText markup = menuTextMarkup }