04-16-2019, 04:37 PM
Pobbot/Pirbot
What it is:
Pobbot is a Discord bot that monitors base health (from https://discoverygc.com/forums/bases.php) and determines if the base is repairing, degrading, low health or under attack. It sends alerts to the configured channel.
How to set up:
1. Add the bot to your Discord server by using this link:
https://discordapp.com/api/oauth2/author...&scope=bot
The bot needs Send Message and Mention Everyone permissions. Manage Messages permission optional but reccommended.
2.Decide which channel on your server you want Pobbot to communicate on, make sure that it has access to this channel.
In the channel send the command !addpobbot
(You can remove Pobbot from a channel by using !rempobbot)
3. Now you need to add some bases to monitor.
You can add bases individually by using !addbase <basename>
You can add multiple bases by using !addbase <basename>,<basename>,<basename> etc.
(You can remove bases by using !rembase <basename>)
4. Optionally, you can set the level of your alerts, for example you might only want to know if it's under attack or Low health. By default All alerts are switched on. The command for this is:
!level <attack/low/degrade/all/off>
attack - Alerts when an attack is detected only
low - The above + Will alert when the base health is less than 10% and not repairing or under attack
degrade - The above + Will alert when the base health starts declining due to wear and tear
All - All of the above, plus alerts when a base starts repairing
Off - no alerts
Supported commands:
!addpobbot - tells the bot to use the channel
!rempobbot - tells the bot to stop using the channel
!add base name,name,name etc. - adds the bases you want to be monitored
!rem base name - removes the selected base
!baseloc name,system -tells pobbot where a base is, if it gets attacked it tells you who was in the system
!poblevel attack/low/degrade/all/off - What level of alerting you want (see 4. above)
!mention here/everyone/UserID/&RoleID - When an attack/low health alert is sent who you want it to mention
!base - Shows a report of all the bases you are monitoring
!config - returns the configuration applied to the channel
!help - list of available commands
PIRBOT:
This module has been added to Pobbot. Pirbot scans the player list, categorises players and can send alerts if you set thresholds. If you are going to use it I’d suggest putting it in it’s own channel just to be neater, but it isn't a requirement. Pirbot sends a message for each category, and then edits these messages instead of sending new ones. If you don’t want to use this, just don’t use any of the commands below.
- !add enemies tag/name
- Adds players to your enemies category. These will be displayed in your enemies category if they are in your ZoI.
- !add regions/systems name
- Set up a ZoI, then your enemies will only show/alert if within this. If not defined, then your ZoI is sirius-wide.
- !add restricted name
- Add a restricted zone (for example Alaska, Thuringia etc.) It will display players/alert if players are here. Players which are in your “Friends” category will not be included.
- !add friends tag/name
- Friends will show in your Friends category if online (I may add a ZoI option for this), they won’t be included in the Restricted Zone category.
- !add faction tag/name
- If you set this and have set alert thresholds they will only alert if a player with this tag/name are online
- With all add commands you can add multiple items at a time by using commas. Example:
!add enemies LN,LSF,LPI
- !rem base/enemies/regions/systems/restricted/friends/faction tag/name
- You can only remove one item at a time. If you really mess up !rempobbot will remove your channel's configuration so that you can start again.
- !pirlevel on/off
- Enables/Disables the display of the Friends category
- Default = on
- !enemynumber number
- An alert is sent if number of enemies >= this number
- Default = 0 (off)
- !restrictnumber number
- An alert is sent if the number of players in restricted zone >= this number
- Default = 0 (off)
- !leavelog on/off
-Send a message when somebody leaves your restricted area (so that you can track who has been there).
- Default = off
- !active
-Tells you the most active zones in Sirius, if you have defined a ZoI, it will tell you what players are in this ZoI
- !bump
Removes the existing messages for the three categories, and sends new messages for them which are then updated. Useful if people chat in this channel so that you don't have to scroll up.
!wiki item Returns a link for the discovery wiki site with your search item.
!ai message - just a bit of fun really, send it a message and see how it responds. This is managed by a Rheinlander so may be a bit biased.
Can I run it myself or modify it?
This bot is open source:
https://github.com/dr-lameos/Pobbot
Note: this is my first javascript project, and first Discord bot, so I'm aware it's not as neat and pretty as it could be - be nice.
Known Limitations:
- This bot relies on the forum page (https://discoverygc.com/forums/bases.php) working. If it stops updating or isn't accessible the bot will also not work. When the page starts working again you may get some false alerts
- This bot scans the forum page every 15 minutes 10 seconds - so there may be a delay in receiving notification of attack.
- This bot detects if a base is Under Attack if the health reduces by more than 0.005% between scans.
- This bot may restart overnight with Server updates - when this happens it takes two scans for the bot to know if health is going up or down. During this period you may have limited data, or it might send a reminder of degrading bases/low health bases.
- Some bases have got spaces after their names, for example 'Medway Dock '. They can still be added by doing:
!addbase Medway Dock ,
This will also add an empty base, so then do this to get rid of it:
!rembase
- It is in beta - there probably are bugs.
This bot is free, but if you'd like to donate you can send credits to:
Lameos.Bank1
If you're feeling especially generous you can send bitcoin to:
16FppmC7Kbs3BQm3ePVyYErfi8nB8yAJLw
(other crypto is also gratefully accepted - PM me if you want)