-
Notifications
You must be signed in to change notification settings - Fork 5
initial_setup
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
)
Click this link: https://discord.com/api/oauth2/authorize?client_id=672237266940198960&permissions=395606879321&scope=bot
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
Your alliance id
/settings_default registeralliance
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 settingALLIANCE_ID
- Access to milcom related commands -
ECON
- Has access to econ gov commands -
FOREIGN_AFFAIRS
| requires settingALLIANCE_ID
- Role required to see other alliance's embassy channel -
INTERNAL_AFFAIRS
| requires settingALLIANCE_ID
- Access to IA related commands -
MILCOM_NO_PINGS
| requires settingALLIANCE_ID
- Access to milcom related commands- doesn't receive pings -
ECON_STAFF
| requires settingALLIANCE_ID
- Has access to economy information commands -
FOREIGN_AFFAIRS_STAFF
| requires settingALLIANCE_ID
- Role for some basic FA commands -
INTERNAL_AFFAIRS_STAFF
| requires settingALLIANCE_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 settingDEPOSIT_ALERT_CHANNEL
- Gets pinged when there is a deposit -
ECON_WITHDRAW_ALERTS
| requires settingWITHDRAW_ALERT_CHANNEL
- Gets pinged when there is a withdrawal -
ECON_WITHDRAW_SELF
| requires settingMEMBER_CAN_WITHDRAW
- Can withdraw own funds -
ECON_GRANT_SELF
| requires settingMEMBER_CAN_WITHDRAW
- Role to allow member to grant themselves -
APPLICANT
| requires settingINTERVIEW_PENDING_ALERTS
- Applying to join the alliance in-game -
INTERVIEWER
| requires settingINTERVIEW_PENDING_ALERTS
- Role to get pinged when a user requests an interview to join the alliance -
MENTOR
| requires settingINTERVIEW_PENDING_ALERTS
- Role for mentoring applicants who have completed their interview -
GRADUATED
| requires settingINTERVIEW_PENDING_ALERTS
- Members with this role can have their interview channels archived -
RECRUITER
| requires settingRECRUIT_MESSAGE_OUTPUT
- Role to get pinged for recruitment messages (if enabled) -
TRADE_ALERT
| requires settingTRADE_ALERT_CHANNEL
- Gets pinged for trade alerts -
BEIGE_ALERT
| requires settingBEIGE_ALERT_CHANNEL
- Gets pinged when a nation leaves beige (in their score range), and they have a slot free -
BEIGE_ALERT_OPT_OUT
| requires settingBEIGE_ALERT_CHANNEL
- Overrides the beige alert role -
BOUNTY_ALERT
- Gets pings when bounties are placed in their score range -
BOUNTY_ALERT_OPT_OUT
| requires settingBOUNTY_ALERT_CHANNEL
- Opt out of received bounty alerts -
WAR_ALERT_OPT_OUT
| requires settingENEMY_ALERT_CHANNEL
- Opt out of received war target alerts -
AUDIT_ALERT_OPT_OUT
| requires settingMEMBER_AUDIT_ALERTS
- Opt out of received audit alerts -
BLITZ_PARTICIPANT
| requires settingALLIANCE_ID
- Opt in to blitz participation (clear this regularly) -
BLITZ_PARTICIPANT_OPT_OUT
| requires settingALLIANCE_ID
- Opt in to blitz participation (clear this regularly) -
TEMP
| requires settingALLIANCE_ID
- Role to signify temporary member, not elligable for grants -
MAIL
| requires settingAPI_KEY
- Can use mail commands -
BLOCKADED_ALERT
| requires settingBLOCKADED_ALERTS
- Gets a ping when you are blockaded -
UNBLOCKADED_ALERT
| requires settingUNBLOCKADED_ALERTS
- Gets a ping when you are unblockaded -
UNBLOCKADED_GOV_ROLE_ALERT
| requires settingUNBLOCKADED_ALERTS
- Pings this role when any member is fully unblockaded -
ESCROW_GOV_ALERT
| requires settingUNBLOCKADED_ALERTS
- Pings this role when any member is fully unblockaded and has an escrow balance -
TREASURE_ALERT
| requires settingTREASURE_ALERT_CHANNEL
- Gets alerts in the TREASURE_ALERT_CHANNEL if a treasure is spawning in their range -
TREASURE_ALERT_OPT_OUT
| requires settingTREASURE_ALERT_CHANNEL
- Does not receive treasure alerts (even with the treasure alert role) -
ENEMY_BEIGE_ALERT_AUDITOR
| requires settingENEMY_BEIGED_ALERT_VIOLATIONS
- Role to receive pings when an enemy gets beiged -
GROUND_MILITARIZE_ALERT
| requires settingAA_GROUND_UNIT_ALERTS
- Role to receive pings when alliances militarize -
AI_COMMAND_ACCESS
- Access to AI commands on the discord server -
ESPIONAGE_ALERTS
| requires settingDEFENSE_WAR_CHANNEL
- Role to receive pings when an alliance member gets spied -
ENEMY_ALERT_OFFLINE
| requires settingBEIGE_ALERT_CHANNEL
- Able to receive enemy alerts when offline or invisible on discord (unless opt out, or player setting overrides)
Here is an example of unlinking the registered role
/role setalias locutusrole: REGISTERED removerole: true
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
To set your API key, use:
/settings_default registerapikey