This commit is contained in:
shoopea 2020-01-25 19:27:37 +08:00
parent 5d33218c8a
commit 1af69dac64

View File

@ -379,9 +379,11 @@ func ListenDarkwing(c *tdlib.Client) {
func ListenGuild(c *tdlib.Client) { func ListenGuild(c *tdlib.Client) {
eventFilter := func(msg *tdlib.TdMessage) bool { eventFilter := func(msg *tdlib.TdMessage) bool {
updateMsg := (*msg).(*tdlib.UpdateNewMessage) updateMsg := (*msg).(*tdlib.UpdateNewMessage)
chatID := updateMsg.Message.ChatID msg := updateMsg.Message
chatID := msg.ChatID
msgType := msg.Content.GetMessageContentEnum()
// senderUserID := updateMsg.Message.SenderUserID // senderUserID := updateMsg.Message.SenderUserID
if chatID == chat_guild && updateMsg.Message.MessageContent.GetMessageContentEnum() == tdlib.MessageTextType { if chatID == chat_guild && msgType == tdlib.MessageTextType {
return true return true
} }
return false return false