I'm trying to delete an already created role with the discord bot
using discord.js.
The error in terminal shows:
DiscordAPIError: Missing Permissions
Although I have given my bot all permissions.
Code: guild.roles.find(role => role.name === 'Test').delete();
Error message in terminal:
(node:7428) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions at item.request.gen.end (...\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:85:15) at then (...\node_modules\snekfetch\src\index.js:215:21) at process._tickCallback (internal/process/next_tick.js:68:7) (node:7428) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:7428) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.