Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onMessageDelete - content must be non empty #273

Open
Eccleria opened this issue Dec 4, 2023 · 1 comment
Open

onMessageDelete - content must be non empty #273

Eccleria opened this issue Dec 4, 2023 · 1 comment
Assignees
Labels
bug Fatal issue

Comments

@Eccleria
Copy link
Owner

Eccleria commented Dec 4, 2023

/home/ewibot/ewibot/node_modules/discord.js/src/util/Util.js:504
    if (!allowEmpty && data.length === 0) throw new error(errorMessage);
                                                ^

RangeError [MESSAGE_CONTENT_TYPE]: Message content must be a non-empty string.
    at Function.verifyString (/home/ewibot/ewibot/node_modules/discord.js/src/util/Util.js:504:49)
    at MessagePayload.makeContent (/home/ewibot/ewibot/node_modules/discord.js/src/structures/MessagePayload.js:114:22)
    at MessagePayload.resolveData (/home/ewibot/ewibot/node_modules/discord.js/src/structures/MessagePayload.js:129:26)
    at ThreadChannel.send (/home/ewibot/ewibot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:173:61)
    at Client.onMessageDelete (file:///home/ewibot/ewibot/src/admin/listeners.js:568:36)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  [Symbol(code)]: 'MESSAGE_CONTENT_TYPE'
}
@Eccleria Eccleria added the bug Fatal issue label Dec 4, 2023
@Eccleria Eccleria self-assigned this Dec 4, 2023
@Eccleria
Copy link
Owner Author

node:events:495
      throw er; // Unhandled 'error' event
      ^

DiscordAPIError[50006]: Cannot send an empty message
    at handleErrors (/home/ewibot/ewibot/node_modules/@discordjs/rest/dist/index.js:640:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SequentialHandler.runRequest (/home/ewibot/ewibot/node_modules/@discordjs/rest/dist/index.js:1021:23)
    at async SequentialHandler.queueRequest (/home/ewibot/ewibot/node_modules/@discordjs/rest/dist/index.js:862:14)
    at async REST.request (/home/ewibot/ewibot/node_modules/@discordjs/rest/dist/index.js:1387:22)
    at async ThreadChannel.send (/home/ewibot/ewibot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:162:15)
    at async Client.onMessageDelete (file:///home/ewibot/ewibot/src/admin/listeners.js:504:19)
Emitted 'error' event on Client instance at:
    at emitUnhandledRejectionOrErr (node:events:398:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
  requestBody: {
    files: [],
    json: {
      content: '',
      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,
      thread_name: undefined
    }
  },
  rawError: { message: 'Cannot send an empty message', code: 50006 },
  code: 50006,
  status: 400,
  method: 'POST',
  url: 'https://discord.com/api/v10/channels/1012365101594058762/messages'
}

Node.js v18.19.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fatal issue
Projects
None yet
Development

No branches or pull requests

1 participant