Skip to content
Functioncorev0.10.0

mergeRoles

The role ids a member holds after adding and removing the given sets. Removals win over additions.

This does not write the roles. Apply the result with member.roles.set() on gateway, or PATCH the member over HTTP.

mergeRoles(
    current: readonly string[],
    add: readonly string[],
    remove: readonly string[]
): string[]

current

current: readonly string[]

The role ids the member holds.

add

add: readonly string[]

The role ids to add.

remove

remove: readonly string[]

The role ids to remove.