Wiki
Clone wikiLucidBot / Notifications
Notifications
The bot has a feature that allows people to be notified when something happens. It supports a bunch of different types of events, and can send notifications through different medias too.
Notification Types
All the currently supported notification types are listed below. The "Name" is what you use in the addnotification command to specify which notification type it is you want to add.
- New order added
*
- Name: orders - New aid request/offer added - Name: aid
- New NAP (non aggression pact) added - Name: nap
- New note added
*
- Name: note - New build added
*
- Name: build - New event added
*
- Name: event added - Wave date set - Name: wave added
- New target added
*
- Name: target - Army returns - Name: army
- A user checks in - Name: checkin
- Someone you waited for has logged in - Name: wait
- An alarm you set went off - Name: alarm
- A scheduled event is now happening
*
- Name: event - A scheduled wave is now happening - Name: wave
- News were pasted that contained a hit on your province - Name: incoming attack
- Dragon begun ravaging your kingdom - Name: dragon arrived
- Dragon sent to enemy kingdom - Name: dragon sent
- Dragon affecting your kingdom is slain - Name: dragon slain
- War declared - Name: war declared
- War ended - Name: war ended
- Self Spell Expiring - Name: selfspell expired
- Resources needed - Name: resources needed
*
: These notification types are controlled by bindings, meaning if, for example, an order is bound to Human Sages only, and you're not a Human Sage, you won't get a notification when that order is added, since it doesn't apply to you.
Notification Delivery Methods
All the different ways the bot can deliver notifications are listed below. Note that you can have all of them active at the same time if you want. The "Name" is what you use in the addnotification command to specify which notification method it is you want to use for the notification type you're adding.
- Send a pm on IRC - Name: pm
- Send an email - Name: email
- Send an sms - Name: sms
If you're going to be using anything other than pm, make sure you've actually set the necessary information first and that the bot administrator has set up the necessary facilities in the bot (see below for how to set things up correctly). You set information by using the contacts command.
Example
I want the bot to notice me via email and pm when my army comes back home and when it's time for a wave. What I do is:
* !contacts add email my-email-address@gmail.com
-
!addnotification army pm
-
!addnotification army email
-
!addnotification wave pm
-
!addnotification wave email
Assuming the bot administrator has setup the email account for the bot, I'll be notified of those 2 event types.
SMS Example
I want the bot to text me on my phone when my army returns and when war is declared. My phone number is 206-555-1234 and my phone provider is ATT. I lookup their email to sms gateway info HERE and do the following:
Steps:
-
!contacts add sms 2065551234@txt.att.net
-
!confirmsms true
-
!addnotification army sms
-
!addnotification war declared sms
Now when any of these events are detected by the bot, it will SMS me. This assumes that the below is done by the Bot Owner/Administrator
Required Setup
Email/SMS
These 2 both use email, so what needs to be setup is an smtp server that the bot can use. The easiest way to get this working is to create a gmail account for the bot to use and just use the defaults in the lucidbot.properties file (uncomment them first, meaning remove the #) and just insert whatever email address and password you set up. Make sure to uncomment ALL of the email related properties before restarting the bot.
Updated