Bigger and better rewrite.
This commit is contained in:
parent
dc7febd2ad
commit
d6ed947bb9
@ -46,8 +46,8 @@ func (tb *Bot) Handler() {
|
||||
tb.Bot.HandleMessage("/admin chatID", tb.chatID)
|
||||
|
||||
// Help
|
||||
tb.Bot.HandleMessage("/help", "USAGE:\n\n/movie <Movie Name> or /m <Movie Name>\n/show <TV Show Name> or /s <TV Show Name>\n\nEXAMPLES:\n\n/s The Walking Dead\n/m Avatar")
|
||||
tb.Bot.HandleMessage("/h", "USAGE:\n\n/movie <Movie Name> or /m <Movie Name>\n/show <TV Show Name> or /s <TV Show Name>\n\nEXAMPLES:\n\n/s The Walking Dead\n/m Avatar")
|
||||
tb.Bot.HandleMessage("/help$", tb.helpHandler)
|
||||
tb.Bot.HandleMessage("/h$", tb.helpHandler)
|
||||
|
||||
// Callback Handler
|
||||
tb.Bot.HandleCallback(tb.callbackHandler)
|
||||
@ -67,3 +67,7 @@ func (tb *Bot) callbackHandler(cq *tbot.CallbackQuery) {
|
||||
tb.Client.EditMessageText(tb.CallbackChatID, tb.CallbackMessageID, "Callback received.")
|
||||
tb.Client.SendMessage(tb.CallbackChatID, cq.Data)
|
||||
}
|
||||
|
||||
func (tb *Bot) helpHandler(m *tbot.Message) {
|
||||
tb.Client.SendMessage(m.Chat.ID, "USAGE:\n\n/movie <Movie Name> or /m <Movie Name>\n/show <TV Show Name> or /s <TV Show Name>\n\nEXAMPLES:\n\n/s The Walking Dead\n/m Avatar")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user