discord-tickets / bot

The most popular open-source and self-hosted ticket management bot for Discord - a free alternative to the premium and white-label plans of other popular ticketing bots.
https://discordtickets.app
GNU General Public License v3.0
941 stars 477 forks source link

[BUG] Error when banning a member #401

Closed MrRockis closed 1 year ago

MrRockis commented 1 year ago

Is there an existing issue for this?

Current Behavior

Banning a member gives the following error:

[ERROR] DiscordAPIError[10007]: Unknown Member at SequentialHandler.runRequest (/home/bot/node_modules/@discordjs/rest/dist /index.js:933:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5 ) at async SequentialHandler.queueRequest (/home/bot/node_modules/@discordjs/r est/dist/index.js:712:14) at async REST.request (/home/bot/node_modules/@discordjs/rest/dist/index.js: 1321:22) at async GuildMemberManager._fetchSingle (/home/bot/node_modules/discord.js/ src/managers/GuildMemberManager.js:221:18) at async TicketManager.finallyClose (/home/bot/src/lib/tickets/manager.js:12 09:20) at async module.exports.run (/home/bot/src/listeners/client/guildMemberRemov e.js:29:4) { rawError: { message: 'Unknown Member', code: 10007 }, code: 10007, status: 404, method: 'GET', url: 'https://discord.com/api/v10/guilds/609855695772188672/members/507591152891985941', requestBody: { files: undefined, json: undefined } }

Expected Behavior

It should not give out any errors

Steps To Reproduce

  1. Create a ticket
  2. Ban the member who created the ticket
  3. An error will show up on the console

Environment

- OS: Ubuntu 22.04
- Node: 18.15.0
- NPM: 9.5.0
- Bot: 4.0.0-beta.10

Anything else?

https://discord.com/channels/451745464480432129/1091801251534094336/1092184876872122368