Skip to content

$filterMembers

$filterMembers filters members in a guild and returns them.

Usage

$filterMembers[guildId;filter;returnAs?;total?;separator?]

Parameters

FieldTypeDescriptionRequired
guildIdstringID of the guild to filter members from.true
filterstringSpace-separated filters: bots, members, boosters, online, offline, role:roleId1,roleId2.true
returnAs?stringFormat of each member in the output. Supports {username}, {discriminator}, {tag}, {id}, {mention}. Default: {mention}false
total?numberMaximum number of members to return. Default: 5false
separator?stringSeparator between members in the returned string. Default: ,false

Example(s)

This will return up to 10 online members as mentions, separated by a comma:

1
client.command({
2
name: "onlineMembers",
3
code: `
4
$filterMembers[$guildID;online;{mention};10;,]
5
`
6
});