Error 50007 "Cannot send messages to this user"
See original GitHub issueIssue Description
I am having issues when inviting the bot with the URL generated during the start-up script. Even when inviting the bot with permissions=8 I am shown the below error.
DiscordAPIError[50007]: Cannot send messages to this user
at SequentialHandler.runRequest (/home/hosted/muse/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:287:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at SequentialHandler.queueRequest (/home/hosted/muse/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:99:14)
at REST.request (/home/hosted/muse/node_modules/@discordjs/rest/src/lib/REST.ts:50:22)
at DMChannel.send (/home/hosted/muse/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:175:15)
at Client.guild_create_default (/home/hosted/muse/src/events/guild-create.ts:43:3) {
rawError: { message: 'Cannot send messages to this user', code: 50007 },
code: 50007,
status: 403,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1049822517302399006/messages',
requestBody: {
files: [],
json: {
content: "👋 Hi! Someone (probably you) just invited me to a server you own. By default, I'm usable by all guild member in all guild channels. To change this, check out the wiki page on permissions: https://github.com/codetheweb/muse/wiki/Configuring-Bot-Permissions.",
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined
}
}
}
Runtime I’m running Muse:
- Directly from the cloned repository
- Inside a Docker container
- Something else (please elaborate)
Versions
- Muse: 2.1.7
- Docker (if applicable): N/A
- OS: Linux Mint
- Node.js: (if running outside the Docker container) v16.18.1
- ffmpeg: (if running outside the Docker container, 4.1 or later is required) v4.2.7-0ubuntu0.1
Issue Analytics
- State:
- Created 3 months ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
400 Bad Request (error code: 50007): Cannot send messages ...
python 3. x - Command raised an exception: HTTPException: 400 Bad Request (error code: 50007): Cannot send messages to this user - Stack ......
Read more >Cannot send messages to this user - Discord Core - uMod
This error means the user has DM's blocked due to privacy reason or has blocked the bot. Recso. Original Poster.
Read more >Discord Bot gets 403 Forbidden Error Code 50007 ... - Reddit
Discord Bot gets 403 Forbidden Error Code 50007 when sending DM's. Hi, I'm trying to make a Discord ... if message.author == client.user:...
Read more >When I send a DM to the corde bot i get "Cannot send ... - GitHub
This looks like the error you get when a user has their privacy settings set to not allow DM's from server members. When...
Read more >DiscordAPIError: Cannot send messages to this user
I am having a problem will trying to make my bot send a message to a user who have left. Here is my...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I tested the bot on both a Ubuntu 20.04 install and also a windows 10 install and both had the same issues. I’m going to use another music bot for now, and won’t be doing any more troubleshooting. Feel free to close the issue if you want, but it might be worth leaving here if other people have a similar problem
It’s also worth noting that you should still be able to use the bot, even if it can’t send the invite message for some reason.