Intents
What are intents?
Intents allow you to subscribe Discord events, such as MessageCreate and GuildUserAdd. If you don't specify certain intent, you will not subscribe certain events.
Privileged intents
Privileged intents are intents that you need to enable in Discord Developer Portal.
How to specify intents in NetCord?
Intents in NetCord are handled by GatewayIntents. You specify them like this:
builder.Services
.AddDiscordGateway(options =>
{
options.Intents = GatewayIntents.GuildMessages | GatewayIntents.DirectMessages | GatewayIntents.MessageContent;
});
If you have done this, you will receive guild and direct messages.
Note
MessageContent
is a special, privileged intent that allows you to receive Content, Embeds, Attachments, Components and Poll of messages in events. Otherwise they are empty.