Gaute945 / Overmounting

Overmounting is a feature rich discord bot with discord's api and complex slash commands
Other
5 stars 2 forks source link

/role #43

Closed Gaute945 closed 5 months ago

Gaute945 commented 6 months ago

Let users make and assign cosmetic roles

Rationale

This would make it easier for server mods to allow cosmetic roles

Implementation Details

Bot needs more perms.

// Create a new role
guild.roles.create()
  .then(console.log)
  .catch(console.error);
// Create a new role with data and a reason
guild.roles.create({
  name: 'Super Cool Blue People',
  color: Colors.Blue,
  reason: 'we needed a role for Super Cool People',
})
  .then(console.log)
  .catch(console.error);
// Delete a role
guild.roles.delete('222079219327434752', 'The role needed to go')
  .then(() => console.log('Deleted the role'))
  .catch(console.error);
// Add a role to a user
message.member.addRole(role);

https://discord.js.org/docs/packages/discord.js/main/RoleManager:Class

Additional Information

image


Note: