Reputation: 11
I am developing a Bot in which you can apply for Teams via a little Conversation in DM with the Bot, which Teamcaptains can than see and do whatever they want with it.
It was working fine until a certain point, when the users couldn't be downloaded anymore. I added All the Intents. The Exception and Guild Intents are in the Attachment.
var channel = socketReaction.Channel as ITextChannel;
var guild = channel.Guild;
var guildUser = guild.GetUserAsync(userId).Result;
if(guildUser == null)
{
guild.DownloadUsersAsync().Wait();
guildUser = guild.GetUserAsync(userId).Result;
}
Upvotes: 0
Views: 1223
Reputation: 11
The answer was provided in this comment that Anu6is posted:
You need to enable intents in code via the DiscordSocketConfig
Upvotes: 1