From 1af69dac6414a0190fa7976ca61427adaf3dd40d Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 25 Jan 2020 19:27:37 +0800 Subject: [PATCH] test --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 30b4e4d..47c8edd 100644 --- a/main.go +++ b/main.go @@ -379,9 +379,11 @@ func ListenDarkwing(c *tdlib.Client) { func ListenGuild(c *tdlib.Client) { eventFilter := func(msg *tdlib.TdMessage) bool { updateMsg := (*msg).(*tdlib.UpdateNewMessage) - chatID := updateMsg.Message.ChatID + msg := updateMsg.Message + chatID := msg.ChatID + msgType := msg.Content.GetMessageContentEnum() // senderUserID := updateMsg.Message.SenderUserID - if chatID == chat_guild && updateMsg.Message.MessageContent.GetMessageContentEnum() == tdlib.MessageTextType { + if chatID == chat_guild && msgType == tdlib.MessageTextType { return true } return false