-
Notifications
You must be signed in to change notification settings - Fork 5
nation_placeholders
These functions 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:
^
-
nation:NATION_NAME
: A qualified nation name Example:nation:Borg
-
leader:NATION_NAME
: A qualified leader name Example:nation:Borg
-
aa:ALLIANCE_NAME
: A qualified alliance name Example:aa:Rose
-
alliance:ALLIANCE_NAME
: A qualified alliance name Example:alliance:Eclipse
-
https://politicsandwar.com/nation/id=NATION_ID
: A nation id Example:6
-
https://politicsandwar.com/alliance/id=ALLIANCE_ID
: An alliance id Example: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
-
*
: All nations
A google sheet url with one of the following columns is accepted:- nation
leader
#allianceSeniority - double
This command is public
Days since joining the alliance
This command has no arguments
#allianceSeniorityApplicant - double
This command is public
Days since joining the alliance
This command has no arguments
#allianceSeniorityApplicantMs - long
This command is public
Milliseconds since joining the alliance
This command has no arguments
#allianceSeniorityMs - long
This command is public
Milliseconds since joining the alliance
This command has no arguments
#allianceSeniorityNoneMs - long
This command is public
No description provided
This command has no arguments
#attritionBountyValue - double
This command is public
Sum of all attrition bounties placed on them
This command has no arguments
#avg_daily_login - double
This command is public
Decimal pct of days they login
This command has no arguments
#avg_daily_login_turns - double
This command is public
Decimal pct of turns they login
This command has no arguments
#avg_daily_login_week - double
This command is public
Decimal pct of days they login in the past week
This command has no arguments
#canBeDeclaredOnByScore - boolean
This command is public
Can be declared on by a nation of score
Arguments:
<score>
- double
A decimal number
#canBeSpiedByScore - boolean
This command is public
Can be spied by a nation of score
Arguments:
<score>
- double
A decimal number
#canBuildProject - boolean
This command is public
Can build project (meets requirements, free slot, doesn't have project)
Arguments:
<project>
- Project
A project name. Replace spaces with _
. See: https://politicsandwar.com/nation/projects/
#canDeclareOnScore - boolean
This command is public
Can declare war on a nation of score
Arguments:
<score>
- double
A decimal number
#canSpyOnScore - boolean
This command is public
Can perform a spy attack against a nation of score
Arguments:
<score>
- double
A decimal number
#cellLookup - Object
Sheet lookup
Arguments:
<sheet>
- SpreadSheet
A google spreadsheet id or url
For shorthand, use a comma when specifying the sheet tab e.g. sheet:ID,TAB_NAME
For a url, append #gid=1234
or #tab=tabName
to specify the id of the tab to use
<tabName>
- String
A single line of text
<columnSearch>
- String
<columnOutput>
- String
<search>
- String
Permission:
#city - String
This command is public
Renamed to cityurl
Arguments:
<index>
- int
A whole number
#cityUrl - String
This command is public
Get the city url by index
Arguments:
<index>
- int
A whole number
#correctAllianceMMR - boolean
If on the correct MMR for their alliance (if one is set)
This command has no arguments
Permission:
#countWars - int
This command is public
Number of wars matching a filter
Arguments:
<warFilter>
- Predicate<DBWar>
#daysSince3ConsecutiveLogins - long
This command is public
Days since the last three consecutive daily logins
This command has no arguments
#daysSince4ConsecutiveLogins - long
This command is public
Days since the last four consecutive daily logins
This command has no arguments
#daysSince5ConsecutiveLogins - long
This command is public
Days since the last five consecutive daily logins
This command has no arguments
#daysSince6ConsecutiveLogins - long
This command is public
Days since the last six consecutive daily logins
This command has no arguments
#daysSince7ConsecutiveLogins - long
This command is public
Days since the last seven consecutive daily logins
This command has no arguments
#daysSinceConsecutiveLogins - long
This command is public
Days since last specified consecutive daily logins
Arguments:
<checkPastXDays>
- long
A whole number
<sequentialDays>
- int
#daysSinceLastAircraftBuy - double
This command is public
Days since last aircraft purchase
This command has no arguments
#daysSinceLastBankDeposit - double
This command is public
Days since last bank deposit
This command has no arguments
#daysSinceLastDefensiveWarLoss - double
This command is public
Days since last defensive war
This command has no arguments
#daysSinceLastMissileBuy - double
This command is public
Days since last missile purchase
This command has no arguments
#daysSinceLastNukeBuy - double
This command is public
Days since last ship purchase
This command has no arguments
#daysSinceLastOffensive - double
This command is public
Days since their last offensive war
This command has no arguments
#daysSinceLastSelfWithdrawal - double
This command is public
Days since they last withdrew from their own deposits
This command has no arguments
#daysSinceLastShipBuy - double
This command is public
Days since last ship purchase
This command has no arguments
#daysSinceLastSoldierBuy - double
This command is public
Days since last soldier purchase
This command has no arguments
#daysSinceLastSpyBuy - double
This command is public
Days since last spy purchase
This command has no arguments
#daysSinceLastTankBuy - double
This command is public
Days since last tank purchase
This command has no arguments
#daysSinceLastWar - double
This command is public
Days since last war
This command has no arguments
#equilibriumTaxRate - double
The alliance tax rate necessary to break even when distributing raw resources
This command has no arguments
Permission:
#estimateGNI - double
This command is public
Estimated daily Gross National Income (GNI)
This command has no arguments
#getActiveWarsWith - int
This command is public
Get the number of wars with nations matching a filter
Arguments:
<filter>
- NationFilter
A comma separated list of filters (can include nations and alliances)
#getActive_m - int
This command is public
Minutes since last active in-game
Arguments:
[time]
- Long[Timestamp]
A unix timestamp, a DMY date or a time difference that will resolve to a timestamp from the current date
#getAgeDays - int
This command is public
Days since creation
This command has no arguments
#getAircraft - int
This command is public
Number of aircraft
This command has no arguments
#getAircraftPct - double
This command is public
Decimal ratio of aircraft a nation has out of their maximum (between 0 and 1)
This command has no arguments
#getAllTimeDefensiveWars - int
This command is public
All time defensive wars involved in
This command has no arguments
#getAllTimeOffDefWars - Entry<Integer,Integer>
This command is public
No description provided
This command has no arguments
#getAllTimeOffensiveWars - int
This command is public
All time offensive wars involved in
This command has no arguments
#getAllTimeWars - int
This command is public
All time wars involved in
This command has no arguments
#getAlliance - DBAlliance
This command is public
The alliance class
This command has no arguments
#getAllianceDepositValue - double
Net nation deposits with their alliance guild
This command has no arguments
Permission:
#getAllianceDepositValuePerCity - double
Net nation deposits with their alliance guild divided by their city count
This command has no arguments
Permission:
#getAllianceName - String
This command is public
Alliance Name
This command has no arguments
#getAlliancePositionId - int
This command is public
Globally unique id of the position in the alliance
This command has no arguments
#getAllianceRank - int
This command is public
Alliance rank by score
Arguments:
[filter]
- NationFilter
A comma separated list of filters (can include nations and alliances)
#getAllianceUrl - String
This command is public
Game url for alliance
This command has no arguments
#getAlliance_id - int
This command is public
Alliance ID
This command has no arguments
#getAttacking - int
This command is public
Get the number of active offensive wars with a list of nations
Arguments:
<nations>
- Set<DBNation>
A comma separated list of nations, alliances and filters
#getAuditResult - Object
Get the Audit result raw value
Arguments:
<audit>
- AuditType
An audit type
Permission:
#getAuditResultString - String
Get the Audit result message
Arguments:
<audit>
- AuditType
An audit type
Permission:
#getAvgBarracks - double
This command is public
Get number of barracks Shorthand for getAvgBuilding(barracks)
This command has no arguments
#getAvgBuilding - double
This command is public
Get number of buildings
Arguments:
<building>
- Building
A city building type
#getAvgBuildings - double
This command is public
Number of buildings per city
Arguments:
[buildings]
- Set<Building>
A comma separated list of building types
#getAvgDrydocks - double
This command is public
Get number of drydocks Shorthand for getAvgBuilding(drydock)
This command has no arguments
#getAvgFactories - double
This command is public
Get number of factories Shorthand for getAvgBuilding(factory)
This command has no arguments
#getAvgHangars - double
This command is public
Get number of hangars Shorthand for getAvgBuilding(hangar)
This command has no arguments
#getAvgLand - double
This command is public
Average land per city
This command has no arguments
#getAvg_infra - double
This command is public
average infrastructure in cities
This command has no arguments
#getBeigeAbsoluteTurn - long
This command is public
The absolute turn of leaving beige
This command has no arguments
#getBeigeLootTotal - double
Total stockpile value based on last war loss or espionage
This command has no arguments
Permission:
#getBeigeTurns - int
This command is public
Game turns left on the beige color bloc
This command has no arguments
#getBlockadedBy - Set<Integer>
This command is public
List of nation ids which are blockading this nation with their navy ships in-game
This command has no arguments
#getBlockading - Set<Integer>
This command is public
List of nation ids whuch are blockaded by this nation's navy ships in-game
This command has no arguments
#getBountySums - Map<WarType,Long>
This command is public
Get a map of each war type to the total value of bounties for that type that this nation has
This command has no arguments
#getBuildings - int
This command is public
Number of buildings total
Arguments:
[buildings]
- Set<Building>
A comma separated list of building types
#getBuyInfraCost - double
This command is public
Cost of buying up to a certain infra level
Arguments:
<toInfra>
- double
A decimal number
[-u forceUrbanization]
- boolean
[-aec forceAEC]
- boolean
[-cfce forceCFCE]
- boolean
[-gsa forceGSA]
- boolean
#getBuyLandCost - double
This command is public
Cost of buying up to a certain land level
Arguments:
<toLand>
- double
A decimal number
[-ra forceRAPolicy]
- boolean
[-aec forceAEC]
- boolean
[-ala forceALA]
- boolean
[-gsa forceGSA]
- boolean
#getCities - int
This command is public
Number of built cities
This command has no arguments
#getCitiesAt - int
This command is public
Number of cities at a date
Arguments:
<time>
- long[Timestamp]
A unix timestamp, a DMY date or a time difference that will resolve to a timestamp from the current date
#getCitiesSince - int
This command is public
Number of cities built since date
Arguments:
<time>
- long[Timestamp]
A unix timestamp, a DMY date or a time difference that will resolve to a timestamp from the current date
#getCityAvg - double
This command is public
Get the average value of a city attribute for this nation's cities
Arguments:
<attribute>
- TypedFunction<DBCity, Double>
A city
#getCityCostPerCitySince - double
This command is public
Cost of cities built since a date divided by the current city count
Arguments:
<time>
- long[Timestamp]
A unix timestamp, a DMY date or a time difference that will resolve to a timestamp from the current date
<allowProjects>
- boolean
#getCityCostSince - double
This command is public
Cost of cities built since a date
Arguments:
<time>
- long[Timestamp]
A unix timestamp, a DMY date or a time difference that will resolve to a timestamp from the current date
<allowProjects>
- boolean
#getCityGroup - int
This command is public
Get the min city count of the first matching city range c1-10, c11-15
Arguments:
<ranges>
- CityRanges
A range of city counts (inclusive)
#getCityMax - double
This command is public
Get the maximum value of a city attribute for this nation's cities
Arguments:
<attribute>
- TypedFunction<DBCity, Double>
A city
#getCityTimerAbsoluteTurn - long
This command is public
Absolute turn the city time ends before being able to buy a city
This command has no arguments
#getCityTotal - double
This command is public
Get the summed total of a city attribute for this nation's cities
Arguments:
<attribute>
- TypedFunction<DBCity, Double>
A city
#getCityTurns - long
This command is public
Turns left on the city timer
This command has no arguments
#getColor - NationColor
This command is public
Nation color bloc
This command has no arguments
#getColorAbsoluteTurn - long
This command is public
The absolute turn the color change timer expires
This command has no arguments
#getColorTurns - long
This command is public
The number of turns until the color timer expires
This command has no arguments
#getContinent - Continent
This command is public
Continent
This command has no arguments
#getDate - long
This command is public
Unix timestamp of date created
This command has no arguments
#getDaysSinceLastCity - int
This command is public
Days since last city
This command has no arguments
#getDaysSinceLastSpyReport - int
This command is public
Days since a nation posted a spy report
This command has no arguments
#getDc_turn - int
This command is public
The turn of the day (0-11) when their day change (DC) unit rebuy is available
This command has no arguments
#getDef - int
This command is public
Number of active defensive wars
This command has no arguments
#getDefending - int
This command is public
Get the number of active defensive wars with a list of nations
Arguments:
<nations>
- Set<DBNation>
A comma separated list of nations, alliances and filters
#getDeposits - Map<ResourceType,Double>
Get nation deposits
Arguments:
[start]
- Long[Timestamp]
A unix timestamp, a DMY date or a time difference that will resolve to a timestamp from the current date
[end]
- Long[Timestamp]
[filter]
- Predicate<Transaction2>
A bank transaction
[-b ignoreBaseTaxrate]
- boolean
use 0/0 as the tax base
i.e. All taxes included in deposits
The default internal taxrate is 100/100 (all taxes excluded)
[-o ignoreOffsets]
- boolean
Do NOT include any manual deposit offesets
[-e includeExpired]
- boolean
[-i includeIgnored]
- boolean
[-d excludeTypes]
- Set<DepositType>
A comma separated list of deposit types
Permission:
#getDiscordUser - UserWrapper
This command is public
Get the discord user object
This command has no arguments
#getDomesticPolicy - DomesticPolicy
This command is public
Domestic policy
This command has no arguments
#getDomesticPolicyAbsoluteTurn - long
This command is public
The absolute turn the domestic policy change timer expires
This command has no arguments
#getDomesticPolicyTurns - long
This command is public
The number of turns until the domestic policy timer expires
This command has no arguments
#getEnemies - Set<Integer>
This command is public
Set of nation ids fighting this nation
This command has no arguments
#getEnemyStrength - double
This command is public
Estimated combined strength of the enemies its fighting
This command has no arguments
#getEntered_vm - long
This command is public
Absolute turn number when entering Vacation Mode (VM)
This command has no arguments
#getEspionageFullTurn - long
This command is public
Absolute turn when full espionage slots will reset
This command has no arguments
#getFighting - int
This command is public
Get the number of active wars with a list of nations
Arguments:
<nations>
- Set<DBNation>
A comma separated list of nations, alliances and filters
#getFreeBuildings - int
This command is public
Get total free building slots in this nations cities
This command has no arguments
#getFreeOffSpyOps - int
Get free offensive spy ops available -1 = No data available
This command has no arguments
Permission:
#getFreeOffensiveSlots - int
This command is public
Free offensive war slots
This command has no arguments
#getFreeProjectSlots - int
This command is public
Number of free project slots
This command has no arguments
#getGNI - double
This command is public
Their gross income (GNI)
This command has no arguments
#getGroundStrength - double
This command is public
Effective ground strength with munitions, enemy air control, and daily rebuy
Arguments:
<munitions>
- boolean
<enemyAc>
- boolean
[includeRebuy]
- Double
A decimal number
#getId - int
This command is public
The nation id
This command has no arguments
#getInfra - double
This command is public
Total infra in all cities
This command has no arguments
#getLastUnitBuy - Long
Get unix timestamp of when a unit was purchased last
Arguments:
<unit>
- MilitaryUnit
Military unit name
Permission:
#getLeader - String
This command is public
Leader name
This command has no arguments
#getLeaving_vm - long
This command is public
Absolute turn number when leaving Vacation Mode (VM)
This command has no arguments
#getLootRevenueTotal - double[]
This command is public
No description provided
This command has no arguments
#getMMR - String
This command is public
Average military unit building capacity (unit mmr) in all cities as a whole number soldiers tanks aircraft ships Maximum is: 5553
This command has no arguments
#getMMRBuildingDecimal - String
This command is public
The average military buildings (building mmr) in all cities as a decimal barracks/factories/hangars/drydocks] e.g. 4.9/4.8/4.3/2.5
This command has no arguments
#getMMRBuildingStr - String
This command is public
The average military buildings (building mmr) in all cities as a whole number barracks factories hangars drydocks Maximum is: 5553
This command has no arguments
#getMaxOff - int
This command is public
Maximum offensive war slots
This command has no arguments
#getMissiles - int
This command is public
Number of missiles
This command has no arguments
#getMoneyLooted - double
Total money looted
This command has no arguments
Permission:
#getName - String
This command is public
The nation name
This command has no arguments
#getNation - String
This command is public
Nation Name
This command has no arguments
#getNation_id - int
This command is public
Nation ID
This command has no arguments
#getNations - int
This command is public
Number of nations
This command has no arguments
#getNetDepositsConverted - double
No description provided
This command has no arguments
Permission:
#getNukes - int
This command is public
Number of nuclear weapons (nukes)
This command has no arguments
#getNumDefWarsSince - int
This command is public
Number of defensive wars since date
Arguments:
<date>
- long
A whole number
#getNumOffWarsSince - int
This command is public
Number of offensive wars since date
Arguments:
<date>
- long
A whole number
#getNumProjects - int
This command is public
Number of built projects
This command has no arguments
#getNumReports - int
This command is public
No description provided
This command has no arguments
#getNumWars - int
This command is public
Number of active offensive and defensive wars
This command has no arguments
#getNumWarsAgainstActives - int
This command is public
All time wars against active nations
This command has no arguments
#getNumWarsSince - int
This command is public
Number of offensive and defensive wars since date
Arguments:
<date>
- long
A whole number
#getOff - int
This command is public
Number of active offensive wars
This command has no arguments
#getOffSpySlots - int
This command is public
Total offensive espionage spy slots
This command has no arguments
#getOnlineStatus - OnlineStatus
This command is public
Discord online status
This command has no arguments
#getPopulation - int
This command is public
Total population in all cities
This command has no arguments
#getPosition - int
This command is public
Raw positional value (0 = remove, 1 = app, 2 = member, 3 = officer 4 = heir, 5 = leader)
This command has no arguments
#getPositionEnum - Rank
This command is public
Alliance position enum id 0 = None or Removed 1 = Applicant 2 = Member 3 = Officer 4 = Heir 5 = Leader
This command has no arguments
#getPositionLevel - int
This command is public
Alliance unique id of the position level As shown in the position edit page
This command has no arguments
#getProjectAbsoluteTurn - Long
This command is public
Turn epoch when project timer expires
This command has no arguments
#getProjectBitMask - long
This command is public
The projects built as a bitmask
This command has no arguments
#getProjectTurns - long
This command is public
Turns left on the project timer before being able to buy a project
This command has no arguments
#getProjects - Set<Project>
This command is public
Set of projects this nation has
This command has no arguments
#getRads - double
This command is public
The radiation level of the nation
This command has no arguments
#getRelativeStrength - double
This command is public
Relative strength compared to enemies its fighting (1 = equal)
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
#getRevenueConverted - double
This command is public
Daily revenue value of nation
This command has no arguments
#getScore - double
This command is public
Nation Score (ns)
This command has no arguments
#getShipPct - double
This command is public
Decimal ratio of ships a nation has out of their maximum (between 0 and 1)
This command has no arguments
#getShips - int
This command is public
Number of navy ships
This command has no arguments
#getSoldierPct - double
This command is public
Decimal ratio of soldiers a nation has out of their maximum (between 0 and 1)
This command has no arguments
#getSoldiers - int
This command is public
Number of soldiers
This command has no arguments
#getSpies - int
This command is public
Most recent spy count
This command has no arguments
#getSpyCap - int
This command is public
Maximum spies a nation can have
This command has no arguments
#getSpyCapLeft - int
This command is public
Number of spies this nation can buy before reaching cap
This command has no arguments
#getSpyReportsToday - int
This command is public
How many spy reports they have posted today
This command has no arguments
#getStockpile - Map<ResourceType,Double>
Get the in-game resources a member nation has
This command has no arguments
Permission:
#getStrength - double
This command is public
Military strength (1 plane = 1)
This command has no arguments
#getStrengthMMR - double
This command is public
Military strength (1 plane = 1)
Arguments:
<mmr>
- MMRDouble
4 decimal numbers representing barracks, factory, hangar, drydock
#getStrongestEnemy - double
This command is public
Effective strength of the strongest nation this nation is fighting
This command has no arguments
#getStrongestEnemyOfScore - double
This command is public
Get the effective military strength of the strongegst nation within the provided score range
Arguments:
<minScore>
- double
A decimal number
<maxScore>
- double
#getStrongestEnemyRelative - double
This command is public
Relative strength of the strongest nation this nation is fighting (1 = equal)
This command has no arguments
#getStrongestOffEnemyOfScore - double
This command is public
Effective strength of the strongest nation this nation is attacking (offensive war)
Arguments:
<minScore>
- double
A decimal number
<maxScore>
- double
#getTankPct - double
This command is public
Decimal ratio of tanks a nation has out of their maximum (between 0 and 1)
This command has no arguments
#getTanks - int
This command is public
Number of tanks
This command has no arguments
#getTax_id - int
This command is public
ID of their in-game tax rate bracket
This command has no arguments
#getTotalLand - double
This command is public
Total land in their cities
This command has no arguments
#getTradeAvgPpu - long
This command is public
Get resource quantity for this nation
Arguments:
<dateStart>
- long
A whole number
[dateEnd]
- Long
[types]
- Set<ResourceType>
A comma separated list of resource types
[filter]
- Predicate<DBTrade>
A completed trade
#getTradeQuantity - long
This command is public
Get resource quantity for this nation
Arguments:
<dateStart>
- long
A whole number
[dateEnd]
- Long
[types]
- Set<ResourceType>
A comma separated list of resource types
[filter]
- Predicate<DBTrade>
A completed trade
[-n net]
- boolean
#getTradeValue - double
This command is public
Get resource quantity for this nation
Arguments:
<dateStart>
- long
A whole number
[dateEnd]
- Long
[types]
- Set<ResourceType>
A comma separated list of resource types
[filter]
- Predicate<DBTrade>
A completed trade
#getTreasureBonusPct - double
This command is public
Treasure bonus decimal percent
This command has no arguments
#getTurnsFromDC - int
This command is public
No description provided
This command has no arguments
#getTurnsTillDC - int
This command is public
Turns remaining until their day change (DC)
This command has no arguments
#getUnits - int
This command is public
Get number of a specific military unit
Arguments:
<unit>
- MilitaryUnit
Military unit name
#getUnitsAt - int
Get units at a specific date
Arguments:
<unit>
- MilitaryUnit
Military unit name
<date>
- long[Timestamp]
A unix timestamp, a DMY date or a time difference that will resolve to a timestamp from the current date
Permission:
#getUpdateTZ - double
Get the update timezone (in hours from UTC) -1 = No data available
This command has no arguments
Permission:
#getUrl - String
This command is public
Game url for nation
This command has no arguments
#getUserAgeDays - double
This command is public
Age of discord account in days
This command has no arguments
#getUserAgeMs - long
This command is public
Age of discord account in milliseconds
This command has no arguments
#getUserDiscriminator - String
This command is public
The registered discord username and user discriminator
This command has no arguments
#getUserId - Long
This command is public
The registered discord user id
This command has no arguments
#getUserMention - String
This command is public
The registered discord user mention (or null)
This command has no arguments
#getVacationTurnsElapsed - int
This command is public
Number of turns since entering Vacation Mode (VM)
This command has no arguments
#getVm_turns - int
This command is public
Number of turns in Vacation Mode (VM)
This command has no arguments
#getWarPolicy - WarPolicy
This command is public
War policy
This command has no arguments
#getWarPolicyAbsoluteTurn - long
This command is public
The absolute turn the war policy change timer expires
This command has no arguments
#getWarPolicyTurns - long
This command is public
The number of turns until the war policy timer expires
This command has no arguments
#getWars_lost - int
This command is public
Total wars lost
This command has no arguments
#getWars_won - int
This command is public
Total wars won
This command has no arguments
#hasAllPermission - boolean
This command is public
Check if the nation has all permissions
Arguments:
<permissions>
- Set<AlliancePermission>
A comma separated list of In-game permission in an alliance
#hasAnyPermission - boolean
This command is public
Check if the nation has any permissions
Arguments:
<permissions>
- Set<AlliancePermission>
A comma separated list of In-game permission in an alliance
#hasBoughtAircraftToday - boolean
This command is public
purchased aircraft today
This command has no arguments
#hasBoughtMissileToday - boolean
This command is public
purchased missiles today
This command has no arguments
#hasBoughtNukeToday - boolean
This command is public
purchased nuclear weapons today
This command has no arguments
#hasBoughtShipsToday - boolean
This command is public
purchased ships today
This command has no arguments
#hasBoughtSoldiersToday - boolean
This command is public
purchased soldiers today
This command has no arguments
#hasBoughtSpiesToday - boolean
This command is public
purchased spies today
This command has no arguments
#hasBoughtTanksToday - boolean
This command is public
purchased tanks today
This command has no arguments
#hasBounty - boolean
This command is public
Has any bounties placed on them to defeat them in war or detonate a nuke
This command has no arguments
#hasNukeBounty - boolean
This command is public
Has any bounties placed on them to detonate a nuke
This command has no arguments
#hasPermission - boolean
This command is public
Check if the nation has a permissions
Arguments:
<permission>
- AlliancePermission
In-game permission in an alliance
#hasPriorBan - boolean
This command is public
If this nation has a previous ban attached to their nation or discord id
This command has no arguments
#hasProject - boolean
This command is public
If the nation has a project
Arguments:
<project>
- Project
A project name. Replace spaces with _
. See: https://politicsandwar.com/nation/projects/
#hasProjects - boolean
This command is public
If the nation has all of the specified projects
Arguments:
<projects>
- Set<Project>
A comma separated list of nation projects
[any=false]
- boolean
#hasTreasure - boolean
This command is public
If the nation has the treasure
This command has no arguments
#hasUnitBuyToday - boolean
This command is public
If a unit was bought today
Arguments:
<unit>
- MilitaryUnit
Military unit name
#hasUnsetMil - boolean
This command is public
If they have undefined military values
This command has no arguments
#hasWarBounty - boolean
This command is public
Has any bounties placed on them to defeat them in war
This command has no arguments
#inactivity_streak - int
This command is public
Number of times since this nation's creation that they have been inactive for a specified number of days
Arguments:
<daysInactive>
- int
A whole number
<checkPastXDays>
- long
#infraAttackModifier - double
This command is public
The modifier for infra damage
Arguments:
<type>
- AttackType
An attack type
#infraDefendModifier - double
This command is public
The modifier for infra damage
Arguments:
<type>
- AttackType
An attack type
#isAllianceColor - boolean
This command is public
If nation color matches the alliance color
This command has no arguments
#isAttackingEnemyOfCities - boolean
This command is public
If this nation has an offensive war against an enemy in the provided city range
Arguments:
<minCities>
- double
A decimal number
<maxCities>
- double
#isAttackingEnemyOfScore - boolean
This command is public
If this nation has an offensive war against an enemy in the provided score range
Arguments:
<minScore>
- double
A decimal number
<maxScore>
- double
#isBanEvading - boolean
This command is public
If this nation has a ban attached to their nation or discord id that has not expired
This command has no arguments
#isBeige - boolean
This command is public
If nation color is beige
This command has no arguments
#isBlitzkrieg - boolean
This command is public
Whether their war policy is blitzkrieg and within the first 12 turns of switching to it
This command has no arguments
#isBlockaded - boolean
This command is public
If blockaded by navy ships in-game
This command has no arguments
#isBlockader - boolean
This command is public
If blockading a nation in-game with navy ships
This command has no arguments
#isDefendingEnemyOfCities - boolean
This command is public
If this nation has a defensive war from an enemy in the provided city range
Arguments:
<minCities>
- double
A decimal number
<maxCities>
- double
#isEnemy - boolean
This command is public
If this nation is in the enemies coalition
This command has no arguments
#isEspionageAvailable - boolean
This command is public
If there are remaining espionage slots
This command has no arguments
#isEspionageFull - boolean
This command is public
If espionage slots are full
This command has no arguments
#isFightingActive - boolean
This command is public
If fighting a war against another active nation
This command has no arguments
#isFightingEnemyOfCities - boolean
This command is public
If this nation has an war with an enemy in the provided city range
Arguments:
<minCities>
- double
A decimal number
<maxCities>
- double
#isFightingEnemyOfScore - boolean
This command is public
If this nation has a war with an enemy in the provided score range
Arguments:
<minScore>
- double
A decimal number
<maxScore>
- double
#isGray - boolean
This command is public
If nation color is gray
This command has no arguments
#isIn - boolean
This command is public
If this nation is in a nation list
Arguments:
<nations>
- Set<DBNation>
A comma separated list of nations, alliances and filters
#isInAllianceGuild - boolean
This command is public
If in the discord guild for their alliance
This command has no arguments
#isInMilcomGuild - boolean
This command is public
If in the milcom discord guild for their alliance
This command has no arguments
#isInSpyRange - boolean
This command is public
If a specified nation is within this nations espionage range
Arguments:
<other>
- DBNation
nation id, name or url
#isInWarRange - boolean
This command is public
If this nation is in war declare range of the current attacking nation
This command has no arguments
#isOnline - boolean
This command is public
If online ingame or discord
This command has no arguments
#isPowered - boolean
This command is public
Are any cities powered
This command has no arguments
#isReroll - int
This command is public
Returns self nation ID if the nation is a reroll, otherwise 0
This command has no arguments
#isTaxable - boolean
This command is public
If the nation is taxable
This command has no arguments
#isVerified - boolean
This command is public
If registered with this Bot
This command has no arguments
#lastBankDeposit - long
This command is public
Unix timestamp when last deposited in a bank
This command has no arguments
#lastSelfWithdrawal - long
This command is public
Unix timestamp when they last withdrew from their own deposits
This command has no arguments
#login_daychange - double
This command is public
Decimal pct of times they login during UTC daychange
This command has no arguments
#lootModifier - double
This command is public
The modifier for loot given when they are defeated in war
This command has no arguments
#lootTotal - double
This command is public
Estimated loot value including aliance bank loot when defeated in a raid war based on last war loss or espionage
This command has no arguments
#looterModifier - double
This command is public
The modifier for loot given when they defeat an enemy in war
Arguments:
<isGround>
- boolean
#lostInactiveWar - boolean
This command is public
If this nation is not daily active and lost their most recent war
This command has no arguments
#maxBountyValue - double
This command is public
Maximum total bounty placed on them of any type
This command has no arguments
#maxCityInfra - double
This command is public
The infra level of their highest city
This command has no arguments
#maxWarBountyValue - double
This command is public
Maximum total bounty placed on them of any war type
This command has no arguments
#militaryValue - double
This command is public
Total monetary value of military units
This command has no arguments
#minWarResistance - int
This command is public
Minimum resistance of self in current active wars
This command has no arguments
#minWarResistancePlusMap - int
This command is public
Minimum resistance of self in current active wars, assuming the enemy translates their MAP into ground/naval with guaranteed IT
This command has no arguments
#nukeBountyValue - double
This command is public
Sum of all nuke bounties placed on them
This command has no arguments
#ordinaryBountyValue - double
This command is public
Sum of all ordinary bounties placed on them
This command has no arguments
#passesAudit - boolean
If the nation passes an audit
Arguments:
<audit>
- AuditType
An audit type
Permission:
#projectSlots - int
This command is public
Total project slots (used + unused)
This command has no arguments
#raidBountyValue - double
This command is public
Sum of all raid bounties placed on them
This command has no arguments
#revenue - Map<ResourceType,Double>
This command is public
Daily revenue of a nation
Arguments:
[turns]
- Integer
A whole number
[-c no_cities]
- boolean
[-m no_military]
- boolean
[-t no_trade_bonus]
- boolean
[-b no_new_bonus]
- boolean
[-f no_food]
- boolean
[-p no_power]
- boolean
[-r treasure_bonus]
- Double
A decimal number
#totalBountyValue - double
This command is public
Sum of all bounty values placed on them
This command has no arguments
#treasureDays - long
This command is public
How many days the treasure is in said nation
This command has no arguments