-
Notifications
You must be signed in to change notification settings - Fork 5
user_placeholders
This page contains a list of functions that can be used as PLACEHOLDERS and FILTERS
Some functions here may accept an argument. The brackets imply argument type, you do NOT include them when using the function.
-
<arg>
- A required parameter -
[arg]
- An optional parameter -
<arg1|arg2>
- Multiple parameters options -
<arg=value>
- Default or suggested value -
[-f flag]
- A optional command argument flag
Placeholders in a text, such as in a spreadsheet or message, are replaced with actual values.
{myFunction}
{functionWithArgs(123)}
{withNamedArgs(myArg: 123 otherArg: 456)}
({conditional}?{ifTrue}:{ifFalse})
9-({numericalFunction}+5)*3
Filters are used to modify a selection. i.e. When you are choosing which things to act upon or display, you use filters to narrow down the selection to ones that meet a certain requirement. When the return type is a string, the filter can be compared using regex to the value. When the return type is boolean (true/false), it will be resolved to either 1 or 0
#myBoolean,#myOtherTrueFalseFunction
(#myFunction=5||#myOtherFunction<10)
#textFunction=abc123,#regexFunction=efg.*
(#myFunction<(#myOtherFunction+5)
- TERNARY:
?
- GREATER_EQUAL:
>=
- GREATER:
>
- LESS_EQUAL:
<=
- LESS:
<
- NOT_EQUAL:
!=
- EQUAL:
=
- PLUS:
+
- MINUS:
-
- MULTIPLY:
*
- DIVIDE:
/
- POWER:
^
-
USER
: Discord user name Example:Borg
-
USER_ID
: Discord user id Example:123456789012345678
-
@ROLE
: All users with a discord role by a given name or mention Example:@Member
-
ROLE_ID
: All users with the discord role by a given id Example:123456789012345678
-
NATION
: Nation name, id, leader, url, user id or mention (see nation type) - only if registered with Locutus Example:Borg
-
ALLIANCE
: Alliance id, name, url or mention (see alliance type), resolves to the users registered with Locutus Example:AA:Rose
-
*
: All shared users
A google sheet url with one of the following columns is accepted: user
#getAgeMs - long
This command is public
Get user age in milliseconds
This command has no arguments
#getAvatarUrl - String
This command is public
Get user avatar url
This command has no arguments
#getColor - int
This command is public
Get user color
This command has no arguments
#getColorRaw - int
This command is public
Get user color raw
This command has no arguments
#getCreatedMs - long
This command is public
Get user date ceated in milliseconds
This command has no arguments
#getEffectiveAvatarUrl - String
This command is public
Get user effective avatar url
This command has no arguments
#getEffectiveName - String
This command is public
Get user effective name
This command has no arguments
#getMention - String
This command is public
Get user mention
This command has no arguments
#getNation - DBNation
This command is public
Nation class corresponding to this user If no nation is found, returns null
This command has no arguments
#getNickname - String
This command is public
Get user nickname
This command has no arguments
#getOnlineStatus - OnlineStatus
This command is public
Get user online status
This command has no arguments
#getResource - double
This command is public
Gets a resource amount from a map of resources
Arguments:
<resources>
- Map<ResourceType, Double>
A comma separated list of resources and their amounts
<resource>
- ResourceType
The name of a resource
#getResourceValue - double
This command is public
Gets the total resource value for a map of resources
Arguments:
<resources>
- Map<ResourceType, Double>
A comma separated list of resources and their amounts
#getServerAgeMs - long
This command is public
Get time since user join in milliseconds
This command has no arguments
#getTimeJoinedMs - long
This command is public
Get user time joined in milliseconds
This command has no arguments
#getUrl - String
This command is public
Get user url
This command has no arguments
#getUserId - long
This command is public
Discord user id
This command has no arguments
#getUserName - String
This command is public
Discord user name
This command has no arguments
#hasAccess - boolean
This command is public
If this member has access to a channel
Arguments:
<channel>
- TextChannel
A discord guild channel name or mention
#hasAllRoles - boolean
This command is public
If this member has all roles
Arguments:
<roles>
- Set<Role>
A comma separated list of discord role names or mentions
#hasAnyRoles - boolean
This command is public
If this member has any roles
Arguments:
<roles>
- Set<Role>
A comma separated list of discord role names or mentions
#hasPermission - boolean
This command is public
If this member has a permission
Arguments:
<permission>
- Permission
A discord role permission
#hasPermissionChannel - boolean
This command is public
If this member has a permission in a channel
Arguments:
<channel>
- TextChannel
A discord guild channel name or mention
<permission>
- Permission
A discord role permission
#hasRole - boolean
This command is public
If this member has a role
Arguments:
<role>
- Role
A discord role name or mention
#matches - boolean
This command is public
Matches a nation filter If no nation is found, returns false
Arguments:
<filter>
- NationFilter
A comma separated list of filters (can include nations and alliances)