telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

Create caliplugzaza

Open lambrightn17 opened this issue 7 months ago • 0 comments

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) } } }

lambrightn17 avatar Jul 05 '24 00:07 lambrightn17