-
Notifications
You must be signed in to change notification settings - Fork 5
bounty_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:
^
-
BOUNTY_ID
: Bounty ID Example:12345
-
*
: All bounties -
nation:NATION_NAME
: A qualified nation name Example:nation:Borg
-
leader:NATION_NAME
: A qualified leader name Example:leader:Danzek
-
aa:ALLIANCE_NAME
: A qualified alliance name Example:aa:Rose
-
alliance:ALLIANCE_NAME
: A qualified alliance name Example:alliance:Eclipse
-
nation/id=NATION_ID
: A nation url Example:nation/id=6
-
alliance/id=ALLIANCE_ID
: An alliance url Example:alliance/id=790
-
coalition:COALITION
: A qualified coalition name Example:coalition:allies
-
~COALITION
: A coalition name Example:~enemies
-
NATION_NAME
: An unqualified nation name Example:Borg
-
LEADER_NAME
: An unqualified leader name Example:Danzek
-
NATION_ID
: A nation id Example:189573
-
ALLIANCE_ID
: An alliance id Example:790
-
@ROLE_MENTION
: A discord role mention or name Example:@Member
-
ROLE_ID
: A discord role id Example:123456789012345678
-
@USER_MENTION
: A discord user mention or name Example:@xdnw
-
USER_ID
: A discord user id Example:123456789012345678
-
https://politicsandwar.com/index.php?id=15&tax_id=TAX_ID
: A full tax url Example:https://politicsandwar.com/index.php?id=15&tax_id=1234
-
TAX_ID
: A tax bracket id or url Example:tax_id=1234
-
nation(<timestamp>,<includeVM:bool>):SELECTOR
: As a sheet tab name; a snapshot selector, with optional timestamp and includeVM Example:nation(5d,true):*
A google sheet url with one of the following columns is accepted: bounty
#getAmount - long
This command is public
The amount of the bounty
This command has no arguments
#getDate - long
This command is public
Get the date this bounty was posted (epoch milliseconds)
This command has no arguments
#getId - int
This command is public
Get the id of this bounty
This command has no arguments
#getNation - DBNation
This command is public
Get the nation this bounty is for
This command has no arguments
#getNationId - int
This command is public
Get the nation id of the bounty
This command has no arguments
#getPostedBy - int
This command is public
The nation id posting the bounty (if any)
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
#getType - WarType
This command is public
The type of bounty
This command has no arguments
#toLineString - String
This command is public
String of the bounty type and amount
This command has no arguments