-
-
Notifications
You must be signed in to change notification settings - Fork 735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Unknown Channel for DiscordSocketClient.MessageReceived #2795
Comments
You also need to enable |
Surely, then, |
It shouldn't? These are two separate intents. Forcing one to be enabled with another one would be counterintuitive. /// <summary> This intent includes GUILD_CREATE, GUILD_UPDATE, GUILD_DELETE, GUILD_ROLE_CREATE, GUILD_ROLE_UPDATE, GUILD_ROLE_DELETE, CHANNEL_CREATE, CHANNEL_UPDATE, CHANNEL_DELETE, CHANNEL_PINS_UPDATE </summary>
Guilds = 1 << 0, https://github.com/discord-net/Discord.Net/blob/dev/src/Discord.Net.Core/GatewayIntents.cs#L10-L11 /// <summary> This intent includes MESSAGE_CREATE, MESSAGE_UPDATE, MESSAGE_DELETE, MESSAGE_DELETE_BULK </summary>
GuildMessages = 1 << 9, https://github.com/discord-net/Discord.Net/blob/dev/src/Discord.Net.Core/GatewayIntents.cs#L30-L31 |
What I'm trying to get at is that my application doesn't need to use anything in |
This resolved the issue for me. Thank you! |
I have the same problem. Even with this example: https://github.com/discord-net/Discord.Net/blob/dev/samples/BasicBot/Program.cs DMs work just fine. |
I just found the solution: #2704 (comment) In the *.csproj file, you need to change |
Thanks for calling out globalization as a potential cause for this issue! While I wasn't modifying the |
Both of these problems are, in my opinion, indications of a leaky abstraction which is the actual problem I was trying to bring up originally. To put it more completely: The library needs the The library needs non-invariant globalization to do its work, which is fine, but this implementation detail leaked to the user causing errors when using an unrelated part of the API. Neither of these is technically a bug, per se, but they both impact usability. |
Check The Docs
Verify Issue Source
Check your intents
Description
The
DiscordSocketClient.MessageReceived
event is never fired. Instead, a log message similar to13:20:41 Gateway Unknown Channel (MESSAGE_CREATE Channel=1174775482668027995).
is generated.Steps to reproduce:
1 Create a new application
2 Get the bot's token
3 Set the "Message Content" intent
3 Under OAuth2, set "Authorization Method" to "In-app Authorization"
4 Set "Scopes" to "bot"
5 Set "Bot Permissions" to "Read Messages/View Channels"
6 Invite bot to server
7 Create a new public text channel
8 Run provided program
9 Send a message in the text channel
Version
3.12.0
Working Version
No response
Logs
Sample
Packages
N/A
Environment
The text was updated successfully, but these errors were encountered: