18 lines
647 B
Go
18 lines
647 B
Go
package tgbot
|
|
|
|
// func ApproveHandler(update tgbotapi.Update, cmd defs.Command) {
|
|
// u, err := models.GetUserByTGID(update.CallbackQuery.From.ID)
|
|
// if err != nil {
|
|
// return
|
|
// }
|
|
// mc.GetAuthcator().Auth(u)
|
|
// callback := tgbotapi.NewCallback(update.CallbackQuery.ID, "已授权")
|
|
// if _, err := conf.Bot.Request(callback); err != nil {
|
|
// logrus.Panic(err)
|
|
// }
|
|
// conf.Bot.Send(tgbotapi.NewDeleteMessage(update.CallbackQuery.Message.Chat.ID,
|
|
// update.CallbackQuery.Message.MessageID))
|
|
// conf.Bot.Send(tgbotapi.NewMessage(update.CallbackQuery.Message.Chat.ID,
|
|
// fmt.Sprintf("已授权☑️: %s 登录MC", u.MCName)))
|
|
// }
|