소스 검색

Update intents for new sessions

Thisnthat 3 년 전
부모
커밋
9b0d9d9e65
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      session.go

+ 7 - 0
session.go

@@ -12,6 +12,13 @@ func GetSession(token string) (*discordgo.Session, error) {
 		return nil, err
 	}
 
+	session.Identify.Intents =
+		discordgo.IntentsGuildMembers |
+			discordgo.IntentsGuildVoiceStates |
+			discordgo.IntentsGuildMessages |
+			discordgo.IntentsDirectMessages |
+			discordgo.IntentsDirectMessageReactions
+
 	// Open a websocket connection to Discord and begin listening.
 	err = session.Open()
 	if err != nil {