❔ Discord.Net new Message Content system
Hey Guys I want to program a Discord bot :) But since 31 August 22 the message.content, message.attachments etc aren't working anymore. And I don't understand how i get them working again :c Like I don't want a Slash Command I just want a command with a prefix like '#' or something like that
12 Replies
have u checked the intents in the dev portal?
in order to receive message content / attachments you need the Message Content Intent enabled
jup
you also need to specify the intents in the setup process for Discord.Net I assume
GitHub
Discord.Net/Program.cs at dev · discord-net/Discord.Net
An unofficial .Net wrapper for the Discord API (https://discord.com/) - Discord.Net/Program.cs at dev · discord-net/Discord.Net
there's an example here, in fact the last commit is to update for the new intents system
i have been using discord.net since net 6 released and it is still working fine until now
im using
DiscordSocketClient.MessageReceived
event and just SocketUserMessage msg = arg as SocketUserMessage;
to get message contentmake a new help thread instead of hijacking this one as it may be a different issue entirely
but it is not a question
it is working fine
ah okay I misinterpreted, you said it was working fine until now so I figured you meant it is broken now
I'm guessing he just hasn't subscribed to the content intent when setting up Discord.Net
op suggests that it was working fine before but suddenly it isn't
he said since august of last year which is more than a couple months old
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.