#Prefix works in bot's DM but don't works in channel
1 messages · Page 1 of 1 (latest)
_ _
Don't know what that message said, but pretty sure it was the correct one.
Check if you have the correct intents
hans tag message content
Help, my bot stopped receiving message content!
Help, my bot stopped responding to text-based commands!
As of September 1st 2022, Discord started requiring message content intent for bots that want to read message content. This is a privileged intent!
If your bot has under 100 guilds, all you have to do is flip the switch in the developer dashboard.
If your bot has over 100 guilds, you'll need approval from Discord's end.
Additionally, you will have to specify the intent in your DiscordConfiguration.Intents property.
However, Discord urges you to use their new Slash Command API, so do make sure to see if that is a viable option for you.
As the popularity and number of Discord bots grow, it's important to keep our users and developers safe and healthy. This means from time to time, like any maturing platform, we need to update our ...
Still does not work, added Intents = DiscordIntents.AllUnprivileged.
DiscordConfiguration config = new DiscordConfiguration { Token = configJson.Token, TokenType = TokenType.Bot, AutoReconnect = true, MinimumLogLevel = LogLevel.Debug, Intents = DiscordIntents.AllUnprivileged };
`` CommandsNextConfiguration commandsConfig = new CommandsNextConfiguration
{
StringPrefixes = new string[] { configJson.Prefix },
EnableDms = true,
EnableMentionPrefix = true,
DmHelp = true
}; ``
Not only this is the wrong intent, it's also privileged. Please pay attention to what you do in your code.