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

bug: Upgrading discordjs-utilities to 7.3.1 causing the process to crash #842

Open
1 task done
KagChi opened this issue Dec 1, 2024 · 4 comments
Open
1 task done

Comments

@KagChi
Copy link

KagChi commented Dec 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

I recently upgraded to 7.3.1 and this causing to crash on missing perms

node:internal/event_target:1090
  process.nextTick(() => { throw err; });
                           ^
DiscordAPIError[50001]: Missing Access
    at handleErrors (/app/node_modules/.pnpm/@discordjs+rest@2.4.0/node_modules/@discordjs/rest/dist/index.js:727:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async SequentialHandler.runRequest (/app/node_modules/.pnpm/@discordjs+rest@2.4.0/node_modules/@discordjs/rest/dist/index.js:1128:23)
    at async SequentialHandler.queueRequest (/app/node_modules/.pnpm/@discordjs+rest@2.4.0/node_modules/@discordjs/rest/dist/index.js:959:14)
    at async _REST.request (/app/node_modules/.pnpm/@discordjs+rest@2.4.0/node_modules/@discordjs/rest/dist/index.js:1272:22)
    at async GuildMessageManager.edit (/app/node_modules/.pnpm/discord.js@14.16.3/node_modules/discord.js/src/managers/MessageManager.js:188:15)
    at async safelyReplyToInteraction (file:///app/node_modules/.pnpm/@[email protected]/node_modules/@sapphire/discord.js-utilities/dist/esm/index.mjs:699:5) {
  requestBody: {
    files: [],
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      enforce_nonce: false,
      embeds: undefined,
      components: [],
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: 0,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined,
      thread_name: undefined,
      applied_tags: undefined,
      poll: undefined
    }
  },
  rawError: { message: 'Missing Access', code: 50001 },
  code: 50001,
  status: 403,
  method: 'PATCH',
  url: 'http://nirn.production.svc.cluster.local:6070/api/v10/channels/635490854089261077/messages/1312765356749750336'
}

Steps To Reproduce

Use 7.3.1 and run PaginationMessage on missing perms channel.

Expected behavior

Promise should be handled correctly

Screenshots

No response

Additional context

No response

System Info

<i cant run inside k3s container>
@favna
Copy link
Member

favna commented Dec 1, 2024

Let me guess, your installed the bot as a user application and used the command in a server where the bot is not a member and/or doesn't have the Read Message History permission? There is a known bug with user installed apps.

@KagChi
Copy link
Author

KagChi commented Dec 4, 2024

Let me guess, your installed the bot as a user application and used the command in a server where the bot is not a member and/or doesn't have the Read Message History permission? There is a known bug with user installed apps.

The bot are not user installed apps as im aware. im sure i only enabled guild install.

@favna
Copy link
Member

favna commented Dec 4, 2024

In that case we need much more information.

  • What perms are missing
  • what is the command code
  • is this a slash command or message command, on that note, are you using @sapphire/framework or not?

Just this error really doesn't say much to us

@KagChi
Copy link
Author

KagChi commented Dec 4, 2024

In that case we need much more information.

  • What perms are missing
  • what is the command code
  • is this a slash command or message command, on that note, are you using @sapphire/framework or not?

Just this error really doesn't say much to us

permissions missing should not make the process crashed?
here is the command https://bin.hzmi.xyz/opidaxeceg.typescript
that is a slash command, and yeah i did use @sappphire/framework

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

No branches or pull requests

2 participants