diff --git a/commands/commands.go b/commands/commands.go index a66939a..e2bcfab 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -29,6 +29,8 @@ func Commands(update tgbotapi.Update, bot *tgbotapi.BotAPI) { gaypoints.SetGP(update, bot) case "remindme": notify.Reminder(update, bot) + case "help": + help(update, bot) } } @@ -41,3 +43,22 @@ func shutup(update tgbotapi.Update, bot *tgbotapi.BotAPI) { botIO.SendMessage(msg, bot) } + +func help(update tgbotapi.Update, bot *tgbotapi.BotAPI) { + const textHelp string = "User commands:" + "\n\n" + + "/help Sends this help message" + "\n" + + "/gp List Gaypoints for user or group" + "\n" + + "/remindme 2m,5h,7d <message> Send a reminder message in 2 minutes, 5 hours, 7 days" + "\n\n" + + "Admin Commands:" + "\n\n" + + "/addgp <amount> Add Gaypoints to User" + "\n" + + "/subtractgp <amount> Add Gaypoints to User" + "\n" + + message := tgbotapi.MessageConfig{ + BaseChat: tgbotapi.BaseChat{ChatID: update.Message.Chat.ID, ReplyToMessageID: update.Message.MessageID}, + ParseMode: "html", + DisableWebPagePreview: false, + Text: textHelp, + } + botIO.SendMessage(message, bot) + +}