Closed DeSinc closed 2 years ago
You need to enable MessageContent
intent on dev portal and in DiscordSocketConfig
in your code
You need to enable
MessageContent
intent on dev portal and inDiscordSocketConfig
in your code
Both are already done. I ticked the intents box because I did check they are all on. I have the code you're referring to already in my bot too, otherwise it would never have worked in the first place:
Client = new DiscordSocketClient(new DiscordSocketConfig
{
MessageCacheSize = 1200,
LogLevel = LogSeverity.Debug,
AlwaysDownloadUsers = true,
GatewayIntents =
GatewayIntents.GuildPresences |
GatewayIntents.Guilds |
GatewayIntents.GuildMembers |
GatewayIntents.GuildMessageReactions |
GatewayIntents.GuildMessages |
GatewayIntents.GuildVoiceStates
});
But you're missing the GatewayIntents.MessageContent
intent
But you're missing the
GatewayIntents.MessageContent
intent
Oh, okay I see what you mean - I thought you could have been referring to something like that but I didn't know what you meant, or that there was a new field.
Just added that new thing in and it works again now in 3.8.1. Thanks! Issue fixed.
Found it in the docs - it's listed here as one of the fields you can provide: https://discordnet.dev/api/Discord.GatewayIntents.html
I suspect this may catch a few people as I wasn't able to really know what I needed to be looking for, but I guess that's just a documentation issue with me generally
EDIT: GatewayIntents.MessageContent was added to DiscordSocketConfig in 3.8.0 or 3.8.1 as below:
Check The Docs
^ to be fair it was in the docs.. it's just I didn't know where to search to find out that that new line was required
Verify Issue Source
Check your intents
Description
Message content is totally blank in 3.8.1 (I have not tested 3.8.0) but it works fine in 3.7.2.
All of the above WriteLines just send blank content. Only change made is the API updated to the latest 3.8.1 version.
Previous versions all still work with the same code shown here.
Commands are all broken due to this as message content is unreadable. All spam filtering is broken due to not being able to parse the message.
Version
3.8.1
Working Version
3.7.2
Logs
Not sure what a stack trace is but thankfully I don't believe it's necessary for this bug.
Sample
Packages
Discord.Net.Core Discord.Net.WebSocket Discord.Net.Commands