Dm user Error

Been getting this error and can not seem to see why it won't work


DiscordAPIError[50007]: Cannot send messages to this user
    at handleErrors (/home/container/node_modules/@discordjs/rest/dist/index.js:640:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SequentialHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:1021:23)
    at async SequentialHandler.queueRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:862:14)
    at async REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1387:22)
    at async DMChannel.send (/home/container/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:157:15)
    at async Client.<anonymous> (/home/container/index.js:80:9) {
  requestBody: {
    files: [],
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: [Array],
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined,
      thread_name: undefined
    }
  },
  rawError: { message: 'Cannot send messages to this user', code: 50007 },
  code: 50007,
  status: 403,
  method: 'POST',
  url: 'https://discord.com/api/v10/channels/1093025064749908138/messages'
}
Was this page helpful?