Files
nignoggobot/commands/info.go
2025-06-25 15:53:42 +02:00

30 lines
708 B
Go

package commands
import (
"log"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
)
type InfoCommand struct{}
func (i InfoCommand) Name() string {
return "info"
}
func (i InfoCommand) Help() string {
return "Displays information about the bot."
}
func (i InfoCommand) Execute(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "This bot does dumb stuff and chemistry. Now version 2.0, rewritten in Go.\n\nSauce: https://gitea.boner.be/nignogbot/nignoggobot\n\nComplaints and support: @fatboners")
_, err := bot.Send(msg)
if err != nil {
log.Println("Failed to send info message:", err)
}
}
func init() {
Register(InfoCommand{})
}