Skip to content

$findRoles

$findRoles will return all matching roles depending on the given query.

Usage

$findRoles[roleResolver;limit?;type?;format?]

Parameters

FieldTypeDescriptionRequired
roleResolverstringQuery to match.true
limit?numberThe maximum amount of roles the bot will return.false
type?stringType of the search query.false
format?stringFormatting for the output.false

Parameters for the format argument

  • {position} -> returns the position
  • {id} -> returns the role ID
  • {username} -> returns the role name

Example(s)

This will return all roles which are named Owner:

1
client.command({
2
name: "findRoles",
3
code: `
4
$findRoles[Owner;5;startsWith;{position}) {username}: {id}]
5
`
6
});