#Bot Command work only on DM but not Server
1 messages · Page 1 of 1 (latest)
Message Content Intent is checked but I don't know what do you mean by
- added it to your clients scope on connecting to the gateway
(I am very starting in there)
I gave bot Administrator Permission and Checked bot and application.commands in Scopes on Developper portal
Before you start your client, you need to add a DiscordSocketConfig with the appropriate intent configured:
var config = new DiscordSocketConfig
{
GatewayIntents = GatewayIntents.Guilds |
GatewayIntents.GuildMessages |
GatewayIntents.DirectMessages
};
var client = new DiscordSocketClient(config);
Also in the dev portal you need to activate this intent:
I added the GatewayIntent in the DiscordSocketConfig
client = new DiscordSocketClient(new DiscordSocketConfig
{
LogLevel = LogSeverity.Debug,
GatewayIntents = GatewayIntents.Guilds |
GatewayIntents.GuildMessages |
GatewayIntents.DirectMessages
});
But still the same issue
The runtime Console does recognize a message sent in the server but doesn't executing the command, but will if I sent it through dm to the Bot
hmm, I‘m on mobile .. so can’t really look it up. But if there also a MessageContent value within the GatewayIntents enum? Add that one too then