From f2b2f03e51faa8b9e40d32e97d4d43ba7a5a222f Mon Sep 17 00:00:00 2001 From: lambrightn17 Date: Thu, 4 Jul 2024 17:07:16 -0700 Subject: [PATCH] Create caliplugzaza package main import ( "log" tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5" ) func main() { bot, err := tgbotapi.NewBotAPI("7363958141:AAFhnTloxO5Z6k4nhGEdLFp8KrxZV5mIVmE") if err != nil { log.Panic(err) } bot.Debug = true log.Printf("Authorized on account %s", bot.Self Caliplugzaza caliplugzaza) u := tgbotapi.NewUpdate(0) u.Timeout = 60 updates := bot.GetUpdatesChan(u) for update := range updates { if update.Message != nil { // If we got a message log.Printf("[%s] %s", update.Message.From.UserName, update.Message.Text) msg := tgbotapi.NewMessage(update.Message.Chat.ID, update.Message.Text) msg.ReplyToMessageID = update.Message.MessageID bot.Send(msg) } } } --- caliplugzaza | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 caliplugzaza diff --git a/caliplugzaza b/caliplugzaza new file mode 100644 index 00000000..d1da8375 --- /dev/null +++ b/caliplugzaza @@ -0,0 +1,34 @@ +package main + +import ( + "log" + + tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5" +) + +func main() { + bot, err := tgbotapi.NewBotAPI("7363958141:AAFhnTloxO5Z6k4nhGEdLFp8KrxZV5mIVmE") + if err != nil { + log.Panic(err) + } + + bot.Debug = true + + log.Printf("Authorized on account %s", bot.Self Caliplugzaza caliplugzaza) + + u := tgbotapi.NewUpdate(0) + u.Timeout = 60 + + updates := bot.GetUpdatesChan(u) + + for update := range updates { + if update.Message != nil { // If we got a message + log.Printf("[%s] %s", update.Message.From.UserName, update.Message.Text) + + msg := tgbotapi.NewMessage(update.Message.Chat.ID, update.Message.Text) + msg.ReplyToMessageID = update.Message.MessageID + + bot.Send(msg) + } + } +}