D000: Permission denied when querying for a resource (e.g. channel, user, slash commands...).
This error may occur in a few situations.
- When accessing a channel you do not have access to
- When accessing a server you do not have access to (i.e. the bot is not a member of the server)
- When accessing a message you do not have access to (i.e. it is in a channel or server you do not have access to)
- When accessing slash commands for a server that has not authorized them. Make sure you have authorized your bot with the “applications.commands” permission. This is covered in the “Your First Bot” tutorial, here.
You can avoid these errors with increased input validation.
Matches exception with text: