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

"ReactionManager.removeAll" error but I configured the system with buttons #442

Closed
ravenastar-js opened this issue Feb 19, 2023 · 1 comment
Assignees
Labels
bug: confirmed Confirmed bugs in discord-tictactoe.
Milestone

Comments

@ravenastar-js
Copy link

ravenastar-js commented Feb 19, 2023

Describe the bug
● The error occurs when the bot doesn't have the "manage messages" permission.
● the system has been configured to respond with Buttons instead of reactions.

To Reproduce

Script used

const TicTacToe = require('discord-tictactoe')
const game = new TicTacToe({ language: "pt-br", commandOptionName: "player2", embedColor: "#00a859", gameBoardDisableButtons: true })
game.handleInteraction(interaction)

Code error

DiscordAPIError: Missing Permissions
    at RequestHandler.execute (D:\db\staralienbeta-v13\node_modules\discord.js\src\rest\RequestHandler.js:350:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (D:\db\staralienbeta-v13\node_modules\discord.js\src\rest\RequestHandler.js:51:14)
    at async ReactionManager.removeAll (D:\db\staralienbeta-v13\node_modules\discord.js\src\managers\ReactionManager.js:61:5) {
  method: 'delete',
  path: '/channels/1076646065463382066/messages/1076670057268138129/reactions',
  code: 50013,
  httpStatus: 403,
  requestData: { json: undefined, files: [] }
} Promise {
  <rejected> DiscordAPIError: Missing Permissions
      at RequestHandler.execute (D:\db\staralienbeta-v13\node_modules\discord.js\src\rest\RequestHandler.js:350:13)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async RequestHandler.push (D:\db\staralienbeta-v13\node_modules\discord.js\src\rest\RequestHandler.js:51:14)
      at async ReactionManager.removeAll (D:\db\staralienbeta-v13\node_modules\discord.js\src\managers\ReactionManager.js:61:5) {
    method: 'delete',
    path: '/channels/1076646065463382066/messages/1076670057268138129/reactions',
    code: 50013,
    httpStatus: 403,
    requestData: { json: undefined, files: [] }
  }
}

discord-tictactoe version:

NPM package ➤ discord-tictactoe@^3
discord.js ➤ v13.*
node.js ➤ v16.17.0
Module version ➤ v3.*

Additional context
the error "ReactionManager.removeAll" should not occur because the system is by buttons

@ravenastar-js ravenastar-js added the bug: unconfirmed Potential bugs that need replicating to verify. label Feb 19, 2023
@utarwyn utarwyn self-assigned this Mar 1, 2023
@utarwyn utarwyn added bug: confirmed Confirmed bugs in discord-tictactoe. and removed bug: unconfirmed Potential bugs that need replicating to verify. labels Mar 1, 2023
@utarwyn utarwyn added this to the 3.x milestone Mar 1, 2023
@utarwyn
Copy link
Owner

utarwyn commented Mar 1, 2023

Thank you for the feedback! I also have to remove permission "ADD_REACTIONS" from needed list if reactions are disabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed Confirmed bugs in discord-tictactoe.
Projects
None yet
Development

No branches or pull requests

2 participants