async function editRole(
  guildId,
  id,
  options,
) {
  await requireBotGuildPermissions(guildId, [
    "MANAGE_ROLES",
  ]);
  const result = await rest.runMethod(
    "patch",
    endpoints.GUILD_ROLE(guildId, id),
    {
      ...options,
      permissions: options.permissions
        ? calculateBits(options.permissions)
        : undefined,
    },
  );
  return await structures.createDiscordenoRole({
    role: result,
    guildId,
  });
}
/** Edit a guild role. Requires the MANAGE_ROLES permission. */
Edit a guild role. Requires the MANAGE_ROLES permission.
Edit a guild role . Requires the MANAGE_ROLES permission .
async function editRole(
  guildId,
  id,
  options,
) {
  await requireBotGuildPermissions(guildId, [
    "MANAGE_ROLES",
  ]);
  const result = await rest.runMethod(
    "patch",
    endpoints.GUILD_ROLE(guildId, id),
    {
      ...options,
      permissions: options.permissions
        ? calculateBits(options.permissions)
        : undefined,
    },
  );
  return await structures.createDiscordenoRole({
    role: result,
    guildId,
  });
}
async function editRole ( guildId , id , options , ) { await requireBotGuildPermissions ( guildId , [ "MANAGE_ROLES" , ] ) ; const result = await rest . runMethod ( "patch" , endpoints . GUILD_ROLE ( guildId , id ) , { ... options , permissions : options . permissions ? calculateBits ( options . permissions ) : undefined , } , ) ; return await structures . createDiscordenoRole ( { role : result , guildId , } ) ; }
Edit a guild role.
Edit a guild role .