Browse Source

Handle guild join messages

Tulir Asokan 2 năm trước cách đây
mục cha
commit
41d51ec992
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      portal.go

+ 5 - 0
portal.go

@@ -969,6 +969,11 @@ func (portal *Portal) convertDiscordTextMessage(intent *appservice.IntentAPI, ms
 			MsgType: event.MsgEmote,
 			MsgType: event.MsgEmote,
 			Body:    "started a call",
 			Body:    "started a call",
 		}}
 		}}
+	} else if msg.Type == discordgo.MessageTypeGuildMemberJoin {
+		return &ConvertedMessage{Content: &event.MessageEventContent{
+			MsgType: event.MsgEmote,
+			Body:    "joined the server",
+		}}
 	}
 	}
 	var htmlParts []string
 	var htmlParts []string
 	if msg.Interaction != nil {
 	if msg.Interaction != nil {