forceupdate.go 403 B

12345678910111213141516
  1. package handler
  2. import (
  3. tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api"
  4. )
  5. func (ah ActionHandler) ForceUpdateHandler(chatId int64, params []string) []tgbotapi.MessageConfig {
  6. if len(params) != 0 {
  7. return []tgbotapi.MessageConfig{tgbotapi.NewMessage(chatId, "usage: /forceupdate")}
  8. }
  9. ah.dbconn.UpdateData()
  10. return []tgbotapi.MessageConfig{
  11. tgbotapi.NewMessage(chatId, "Done!")}
  12. }