#Prefix works in bot's DM but don't works in channel

1 messages · Page 1 of 1 (latest)

dreamy pebble
#

If I use mention of bot as prefix, everything works everywhere.

celest ospreyBOT
#

_ _

Dismissed message
upbeat arrow
#

Check if you have the correct intents

#

hans tag message content

crimson vaporBOT
# upbeat arrow 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.

More info:
https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ

upbeat arrow
#

That's not all

#

Read the message throughly

dreamy pebble
#

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

        }; ``
grand shard
#

Intents = DiscordIntents.AllUnprivileged | DiscordIntents.MessageContents

#

i think

upbeat arrow
# dreamy pebble

Not only this is the wrong intent, it's also privileged. Please pay attention to what you do in your code.