add help command
This commit is contained in:
parent
6817ed5a9e
commit
bde1d93369
1 changed files with 21 additions and 0 deletions
|
@ -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 = "<b>User commands:</b>" + "\n\n" +
|
||||
"<code>/help </code><i>Sends this help message</i>" + "\n" +
|
||||
"<code>/gp </code><i>List Gaypoints for user or group</i>" + "\n" +
|
||||
"<code>/remindme 2m,5h,7d <message> </code> <i>Send a reminder message in 2 minutes, 5 hours, 7 days</i>" + "\n\n" +
|
||||
"<b>Admin Commands:</b>" + "\n\n" +
|
||||
"<code>/addgp <amount> </code> <i>Add Gaypoints to User</i>" + "\n" +
|
||||
"<code>/subtractgp <amount> </code> <i>Add Gaypoints to User</i>" + "\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)
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue