Role

Class

Methods

getEveryone

Promise<Discord.Role>

ParameterTypeDescription

guild

Discord.Guild

The Guild where the Role should be.

Optional:

async function usageExample(instance) {
  const guild = await instance.utils.guild.getGuildByName('NAME');
  const everyone = await instance.utils.guild.role.getEveryone(guild);
  
  console.log(everyone);
}

getRoleByName

Promise<Discord.Role>

ParameterTypeDescription

name

string

The name of the Role.

Optional:

guild

Discord.Guild

The Guild where the Role should be.

Optional:

async function usageExample(instance) {
  const guild = await instance.utils.guild.getGuildByName('NAME');
  const role = await instance.utils.guild.role.getRoleByName('NAME', guild);
  
  console.log(role);
}

getRoleById

Promise<Discord.Role>

ParameterTypeDescription

id

string

The id of the Role.

Optional:

guild

Discord.Guild

The Guild where the Role should be.

Optional:

async function usageExample(instance) {
  const guild = await instance.utils.guild.getGuildByName('NAME');
  const role = await instance.utils.guild.role.getRoleById('ID', guild);
  
  console.log(role);
}

Last updated