Create role with custom icon

Is it possible to create a role with a icon without the custom icon being on the server, since you can upload a file directly in the roles menu?
3 Replies
d.js toolkit
d.js toolkit7mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
d.js docs
d.js docs7mo ago
:method: RoleManager#create @14.15.2 Creates a new role in the guild with given information. The position will silently reset to 1 if an invalid one is provided, or none.
// Create a new role
guild.roles.create()
.then(console.log)
.catch(console.error);
// Create a new role
guild.roles.create()
.then(console.log)
.catch(console.error);
!   discolight99
! discolight99OP7mo ago
OK, am I correct in saying doing it this way, you don't have to have the emoji on the server for it to work, you can do it directly from the file.
Want results from more Discord servers?
Add your server