Skip to content

initial_setup

test edited this page Aug 14, 2024 · 15 revisions

Locutus is a bot on the discord server which assists with war calculations and alliance affairs for the game Politics and War.

Support Server:
Discord Support Server

Created by Borg (nation: https://politicsandwar.com/nation/id=189573 discord: xdnw )

Inviting the bot to your discord server

Click this link: https://discord.com/api/oauth2/authorize?client_id=672237266940198960&permissions=395606879321&scope=bot

Registering your nation

Use the register command to link your in-game nation to your discord. This allows you to use nation related commands.

/register

/register

Register your discord user with your Politics And War nation.

Arguments:

<nation> - DBNation
nation id, name or url


Example:

/register nation: https://politicsandwar.com/nation/id=189573

You can verify by using:

/me

Registering your alliance

Your alliance id

/settings_default registeralliance

Creating and registering roles

The bot uses discord roles to manage notifications and access to commands You must register these discord roles using

/role setalias

Set the discord roles the bot uses for command permissions

Arguments:

[locutusRole] - Roles
A discord role name, mention or id
[discordRole] - Role
A discord role name or mention
[alliance] - DBAlliance
If the role mapping is only for a specific alliance (WIP)
(An alliance name id or url)
[-r removeRole] - boolean
Remove the existing mapping instead of setting it


Let's register three discord roles to the bot (first create the discord roles if they do not exist)

  • REGISTERED - auto role for anyone who is verified with the bot

  • MEMBER - Members can run commands

  • ADMIN - Admin has access to alliance / guild management commands

Register them using:

  • /role setalias locutusrole: REGISTERED discordrole: @registered

  • /role setalias locutusrole: MEMBER discordrole: @member

  • /role setalias locutusrole: ADMIN discordrole: @admin

There are roles which correspond to alliance departments

You can register all of them, or only the main ones you need

  • MILCOM | requires setting ALLIANCE_ID - Access to milcom related commands
  • ECON - Has access to econ gov commands
  • FOREIGN_AFFAIRS | requires setting ALLIANCE_ID - Role required to see other alliance's embassy channel
  • INTERNAL_AFFAIRS | requires setting ALLIANCE_ID - Access to IA related commands
  • MILCOM_NO_PINGS | requires setting ALLIANCE_ID - Access to milcom related commands- doesn't receive pings
  • ECON_STAFF | requires setting ALLIANCE_ID - Has access to economy information commands
  • FOREIGN_AFFAIRS_STAFF | requires setting ALLIANCE_ID - Role for some basic FA commands
  • INTERNAL_AFFAIRS_STAFF | requires setting ALLIANCE_ID - Role for some basic IA commands, such as accepting applicants

Other roles work for specific configuration options

To view a config option, use:

/settings info key:

Here is a list of all the roles:

  • ADMIN - Admin has access to alliance / guild management commands
  • ECON_DEPOSIT_ALERTS | requires setting DEPOSIT_ALERT_CHANNEL - Gets pinged when there is a deposit
  • ECON_WITHDRAW_ALERTS | requires setting WITHDRAW_ALERT_CHANNEL - Gets pinged when there is a withdrawal
  • ECON_WITHDRAW_SELF | requires setting MEMBER_CAN_WITHDRAW - Can withdraw own funds
  • ECON_GRANT_SELF | requires setting MEMBER_CAN_WITHDRAW - Role to allow member to grant themselves
  • APPLICANT | requires setting INTERVIEW_PENDING_ALERTS - Applying to join the alliance in-game
  • INTERVIEWER | requires setting INTERVIEW_PENDING_ALERTS - Role to get pinged when a user requests an interview to join the alliance
  • MENTOR | requires setting INTERVIEW_PENDING_ALERTS - Role for mentoring applicants who have completed their interview
  • GRADUATED | requires setting INTERVIEW_PENDING_ALERTS - Members with this role can have their interview channels archived
  • RECRUITER | requires setting RECRUIT_MESSAGE_OUTPUT - Role to get pinged for recruitment messages (if enabled)
  • TRADE_ALERT | requires setting TRADE_ALERT_CHANNEL - Gets pinged for trade alerts
  • BEIGE_ALERT | requires setting BEIGE_ALERT_CHANNEL - Gets pinged when a nation leaves beige (in their score range), and they have a slot free
  • BEIGE_ALERT_OPT_OUT | requires setting BEIGE_ALERT_CHANNEL - Overrides the beige alert role
  • BOUNTY_ALERT - Gets pings when bounties are placed in their score range
  • BOUNTY_ALERT_OPT_OUT | requires setting BOUNTY_ALERT_CHANNEL - Opt out of received bounty alerts
  • WAR_ALERT_OPT_OUT | requires setting ENEMY_ALERT_CHANNEL - Opt out of received war target alerts
  • AUDIT_ALERT_OPT_OUT | requires setting MEMBER_AUDIT_ALERTS - Opt out of received audit alerts
  • BLITZ_PARTICIPANT | requires setting ALLIANCE_ID - Opt in to blitz participation (clear this regularly)
  • BLITZ_PARTICIPANT_OPT_OUT | requires setting ALLIANCE_ID - Opt in to blitz participation (clear this regularly)
  • TEMP | requires setting ALLIANCE_ID - Role to signify temporary member, not elligable for grants
  • MAIL | requires setting API_KEY - Can use mail commands
  • BLOCKADED_ALERT | requires setting BLOCKADED_ALERTS - Gets a ping when you are blockaded
  • UNBLOCKADED_ALERT | requires setting UNBLOCKADED_ALERTS - Gets a ping when you are unblockaded
  • UNBLOCKADED_GOV_ROLE_ALERT | requires setting UNBLOCKADED_ALERTS - Pings this role when any member is fully unblockaded
  • ESCROW_GOV_ALERT | requires setting UNBLOCKADED_ALERTS - Pings this role when any member is fully unblockaded and has an escrow balance
  • TREASURE_ALERT | requires setting TREASURE_ALERT_CHANNEL - Gets alerts in the TREASURE_ALERT_CHANNEL if a treasure is spawning in their range
  • TREASURE_ALERT_OPT_OUT | requires setting TREASURE_ALERT_CHANNEL - Does not receive treasure alerts (even with the treasure alert role)
  • ENEMY_BEIGE_ALERT_AUDITOR | requires setting ENEMY_BEIGED_ALERT_VIOLATIONS - Role to receive pings when an enemy gets beiged
  • GROUND_MILITARIZE_ALERT | requires setting AA_GROUND_UNIT_ALERTS - Role to receive pings when alliances militarize
  • AI_COMMAND_ACCESS - Access to AI commands on the discord server
  • ESPIONAGE_ALERTS | requires setting DEFENSE_WAR_CHANNEL - Role to receive pings when an alliance member gets spied
  • ENEMY_ALERT_OFFLINE | requires setting BEIGE_ALERT_CHANNEL - Able to receive enemy alerts when offline or invisible on discord (unless opt out, or player setting overrides)

Remove a role alias

Here is an example of unlinking the registered role

/role setalias locutusrole: REGISTERED removerole: true

Setting your API Key

API key found at the bottom of: https://politicsandwar.com/account/ Be sure to enable all access you wish the bot to have, and have a sufficient position in-game (e.g. leader) Needed for alliance functions and information access, such as calculating resource dispersal, sending mail Api Key Example

To set your API key, use:

/settings_default registerapikey

Clone this wiki locally