Closed kshgr closed 2 years ago
Have you perhaps enabled message content intents in your bot's developer portal?
You can alternatively refer to my tutorial video during which this bug was found https://www.youtube.com/watch?v=jlhZXFfS40s Timestamp - 9:25 to 10:15
Have you perhaps enabled message content intents in your bot's developer portal?
All intents are enabled and the bot was working alright with GuildMessageCreateEvent until last time.
You have not, however, enabled intents within the bot's constructor in your code.
you need to add intents=hikari.Intents.MESSAGE_CONTENT
(https://www.hikari-py.dev/hikari/intents.html#hikari.intents.Intents.MESSAGE_CONTENT)
Edit: Although watching more of the video, when you start using lightbulb you add all intents
You have not, however, enabled intents within the bot's constructor in your code.
you need to add
intents=hikari.Intents.MESSAGE_CONTENT
(https://www.hikari-py.dev/hikari/intents.html#hikari.intents.Intents.MESSAGE_CONTENT)Edit: Although watching more of the video, when you start using lightbulb you add all intents
Alright thanks Is there a recent change that requires this to be done?
I do not remember this being an issue a couple of months back.
Yes, Discord made message content a privileged intent. You can read more here: https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ
You can still enable the intent without needing verification if your bot is in less than 100 servers though, but you do need to turn it on and add it to the requested intents in your code
Great, thank you for your help! I will be sure to pass on the message in the next video.
Steps to reproduce
Expected result
type(event.content) should be returned as a string for all text messages in server
Actual result
type(event.content) returns None type for all messages in server.
System info
Further info
No response
Checklist