Hydaelyn Role-Players
[Balmung] Balmung Discord RP Event Notification Bot - Printable Version

+- Hydaelyn Role-Players (https://ffxiv-roleplayers.com/mybb18)
+-- Forum: Resources (https://ffxiv-roleplayers.com/mybb18/forumdisplay.php?fid=17)
+--- Forum: Roleplay Events (https://ffxiv-roleplayers.com/mybb18/forumdisplay.php?fid=20)
+--- Thread: [Balmung] Balmung Discord RP Event Notification Bot (/showthread.php?tid=19401)



Balmung Discord RP Event Notification Bot - Erah'sae - 05-17-2017

I figured since I mentioned it in another thread I'd just bite the bullet and post it here instead of replying to the pm's about it. Guess this makes it 'quasi-official public alpha release time'.

Note: this is still running on a development server, expect some outages, screwiness, and bugs.

To add the discord bot to a channel you must have "Manage Channel" permissions and follow the below link. 
https://discordapp.com/oauth2/authorize?client_id=240846820584980480&scope=bot&permissions=0

Once it's there, give it a roll to prevent it from talking in channels you don't want it interacting with.

Use the !help command for more information about the bot. It is suggested to pick a channel and use the following commands:

Code:
!addnotifications
!adddaily

Please note setting your time zone is fidgety, it requires the 'exact' name of the timezone.Here are some standard ones:

Code:
● GMT Standard Time           - TZ Offset: 1   - Time Now: 5:11 PM
● Pacific Standard Time       - TZ Offset: -7  - Time Now: 9:11 AM
● US Mountain Standard Time   - TZ Offset: -7  - Time Now: 9:11 AM
● Central Standard Time       - TZ Offset: -5  - Time Now: 11:11 AM
● US Eastern Standard Time    - TZ Offset: -4  - Time Now: 12:11 PM

So to set the bot in your channel to Pacific time you would use:
Code:
!setTZ Pacific Standard Time


I'll make the !help command look pretty and post it later when I'm not at the office.

I make no guarantees of the bots up-time, and the like. (RIP my bandwidth.)

Edit: To get a look at the bot before inviting it to your discord a test bed discord can be joined by following the below link:
https://discord.gg/Rd6jJvA

It is also the easiest place to get intouch with me for help.


RE: Balmung Discord RP Event Notification Bot - Haven's Fox - 05-17-2017

Thanks for setting this up in your spare time! With so many people having discord servers this is pretty awesome to keep members engaged easier! Big Grin


RE: Balmung Discord RP Event Notification Bot - Kilieit - 05-17-2017

I've been using this for a while and it is WONDERFUL. Can strongly recommend.

The one thing I will say is that (at time of posting!) for daily blasts, you really want it set to a timezone that is UTC-5 or behind, because I had mine set to UTC+0 for a while and it kept missing events from the daily blast because they were after midnight UTC+0, therefore "the next day", but the "next day"'s blast didn't go out until 5am UTC+0... after the events had already ended.

Took me a while to work out what was going on there - I figure it's an artefact of the already-fiddly timezone setting method - so I thought I'd pass on my recommendation of setting it / keeping it set to UTC-5 or behind!


RE: Balmung Discord RP Event Notification Bot - Virella - 05-17-2017

Thank you so much for running this!


RE: Balmung Discord RP Event Notification Bot - Erah'sae - 05-17-2017

(05-17-2017, 12:44 PM)Kilieit Wrote: I've been using this for a while and it is WONDERFUL. Can strongly recommend.

The one thing I will say is that (at time of posting!) for daily blasts, you really want it set to a timezone that is UTC-5 or behind, because I had mine set to UTC+0 for a while and it kept missing events from the daily blast because they were after midnight UTC+0, therefore "the next day", but the "next day"'s blast didn't go out until 5am UTC+0... after the events had already ended.

Took me a while to work out what was going on there - I figure it's an artefact of the already-fiddly timezone setting method - so I thought I'd pass on my recommendation of setting it / keeping it set to UTC-5 or behind!

Hrm, that's something I didn't think of...

It currently runs on a US Central Time clock (I'm lazy and it's running on a dev box set to us central local time.)
I should change it to do the daily notifications at midnight on the server time zone...

I'm glad you noticed this before I moved it to a UTC+0 production server.  That would have been hilarious.


RE: Balmung Discord RP Event Notification Bot - ExAtomos - 05-17-2017

This is an excellent resource!!

Remember, everyone, the Calendar Bot is populated by YOUR input! If you want to adequately advertise your event, be sure to fill out the form here.


RE: Balmung Discord RP Event Notification Bot - Varinh - 05-17-2017

This is really cool. I'll be implementing it to my Discord friends' channel immediately. Thanks for the time and work put into making this handy tool!


RE: Balmung Discord RP Event Notification Bot - Erah'sae - 08-15-2017

Figured I'd start pushing the change logs to this as well:

Balmung RP Bot Change Log v0.9.27:

- Added fudge dice to the !roll command. Use !roll #f to roll # fudge dice.
- Experimenting with some new timer / event generation code to better handle issues with non-US TZs
- Hardened the bot against discord related hiccups causing malformed messages to be received.
- Several other memory optimizations and channel message relay optimizations have been put into place.


RE: Balmung Discord RP Event Notification Bot - Erah'sae - 08-18-2017

Fudge, Timezones are Hard
or Balmung RP Discord Bot version 0.9.5

No really, they’re a pain in the tail.

The discord bot should now properly give a full 24 hours of events reguardless of your timezone and respecting daylights savings time borders for anywhere in Microsoft’s TimeZoneInfo database.

In addition the ‘daily’ notifications (set by !adddaily and !removedaily) will now broadcast at midnight local time to a channel instead of midnight at US Central.   This will include events happening at 'midnight’ of the next day just to make sure you don’t miss anything.

In other news, !roll feature has been updated to support 'Fudge’ dice used in the Fate based systems (like Fate-14).

Use !roll #f to roll # number of fudge dice. 

Ex: 
[12:18 PM] erroch: !roll 4f 
[12:18 PM] BalmungRPBot: @erroch, rolling 4f: Value: 1 Dice:  [-1] [1] [0] [1]

If you like what we’re doing with this stuff, feel free to support future work on our Patreon.

Enjoy! 
~ Erah’sae

PS: Yeah, the fudge dice were in for the last update, but I've improved them enough to mention this time. 1's happen with the same frequency as -1's now. Tested over near 20 million iterations with a deviation of about 1.5% between the +1, -1, and 0.


RE: Balmung Discord RP Event Notification Bot - Erah'sae - 09-06-2017

I am not saying it was legacy code...
Balmung RP Discord Bot version 0.9.7


But it was legacy code.
So, I started writing the bot back in earlier days of Discord.  The platform’s grown and changed as lot and since a lot of stuff kept working, I hadn’t really gotten around to changing a lot of the underlying code.  Well, something broke in my dealing with deleted channels, and that in turn broke other things like the daily event feed, etc.

Long and short, the bot’s been updated to handle this (and other unforeseen eventualities)

Along with this, I’ve robustified the thread handling on the bot so it should better handler larger volumes of messages with fewer slowdowns.  Dealing with the Google Calendar API is still ‘slow’ until it’s cached, but everything else is a bit snappier.



RE: Balmung Discord RP Event Notification Bot - Erah'sae - 09-11-2017

Minor Discord Bot Update (0.9.8.1)

Added an “&purge x” command which removed then last x messages from the current channel.  Both the bot and the user need the Manage Messages permissions in the channel for this to work.


RE: Balmung Discord RP Event Notification Bot - Erah'sae - 09-22-2017

Discord broke the bot if you use categories.


Discord broke how the bot iterates channels with it’s ‘categories’ update.  If you have channels in categories, the bot won’t be able to find them to send it’s messages until I can sort out something.

Fun.

I’ll try and get it fixed this weekend.


RE: Balmung Discord RP Event Notification Bot - Erah'sae - 09-23-2017

The bot now supports categories

I just rolled out an update for the discord bot that now supports channel categories and should now be a little bit more sound against discord meddling with the channel types / hierarchy in the future.

[Image: tumblr_njixhd1uKx1suekw5o1_500.gif]

Carry on and enjoy!
~ Erah’sae / Erroch