RPDJF / Goofyn

Goofyn is a fun, friendly Discord bot inspired by "Murder Drones." It chats like a real user with playful, emoji-filled messages!
https://goofyn.ruinformatique.ch
MIT License
3 stars 0 forks source link

[bug] Crashing when bot has no permissions to write welcome channel #1

Closed RPDJF closed 1 month ago

RPDJF commented 1 month ago

See output below

/usr/src/app/node_modules/@discordjs/rest/dist/index.js:730
      throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
            ^

DiscordAPIError[50013]: Missing Permissions
    at handleErrors (/usr/src/app/node_modules/@discordjs/rest/dist/index.js:730:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SequentialHandler.runRequest (/usr/src/app/node_modules/@discordjs/rest/dist/index.js:1133:23)
    at async SequentialHandler.queueRequest (/usr/src/app/node_modules/@discordjs/rest/dist/index.js:963:14)
    at async _REST.request (/usr/src/app/node_modules/@discordjs/rest/dist/index.js:1278:22)
    at async TextChannel.send (/usr/src/app/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:177:15)
...

The bot shouldn't crash and simply print the error message on console

RPDJF commented 1 month ago

Fixed in https://github.com/RPDJF/Goofyn/commit/a3769b26217db6e8e8a7e4a94532ee544e07d77e

Planned for next update