This commit is contained in:
shoopea 2019-12-12 11:35:49 +08:00
parent b3ba33c863
commit e615d0ca7b

4
td.go
View File

@ -75,8 +75,8 @@ func ListenTG(c *tdlib.Client) {
if updateMsg.Message.ReplyMarkup != nil { if updateMsg.Message.ReplyMarkup != nil {
if updateMsg.Message.ReplyMarkup.GetReplyMarkupEnum() == tdlib.ReplyMarkupInlineKeyboardType { if updateMsg.Message.ReplyMarkup.GetReplyMarkupEnum() == tdlib.ReplyMarkupInlineKeyboardType {
rm := updateMsg.Message.ReplyMarkup.(*tdlib.ReplyMarkupInlineKeyboard) rm := updateMsg.Message.ReplyMarkup.(*tdlib.ReplyMarkupInlineKeyboard)
for k1, v1 := range rm.Rows { for _, v1 := range rm.Rows {
for k2, v2 := range v1 { for _, v2 := range v1 {
if v2.Type.GetInlineKeyboardButtonTypeEnum() == tdlib.InlineKeyboardButtonTypeCallbackType { if v2.Type.GetInlineKeyboardButtonTypeEnum() == tdlib.InlineKeyboardButtonTypeCallbackType {
cwcb := ChatWarsCallback{ cwcb := ChatWarsCallback{
Name: v2.Text, Name: v2.Text,