package commands import ( "git.dragon-labs.de/alphyron/group_helper/cli" "git.dragon-labs.de/alphyron/group_helper/models" tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api" ) type infoCommand struct { } func NewInfoCommand() cli.Command { return &infoCommand{} } func (i infoCommand) GetUsage() string { return "/info" } func (i infoCommand) GetCommand() string { return "/info" } func (i infoCommand) GetDescription() string { return "Just some Bot information" } func (i infoCommand) ExecuteCommand(bot *tgbotapi.BotAPI, update *tgbotapi.Update, group *models.Group) (bool, error) { infoMessage := "General Information to this Bot\n" + "===============================\n" + "Developer: @Alphyron\n" + "Version: 2.2.5\n" + "Git: [Gitea Repository](https://git.dragon-labs.de/alphyron/group_assistant)\n" + "===============================" msg := tgbotapi.NewMessage(update.Message.Chat.ID, infoMessage) msg.ParseMode = "Markdown" _, err := bot.Send(msg) return err == nil, nil } func (i infoCommand) AllowChatType(*tgbotapi.Chat) bool { return true } func (i infoCommand) AllowMember(*tgbotapi.ChatMember) bool { return i.AllowEveryMember() } func (i infoCommand) AllowEveryMember() bool { return true }