This is aimed to be a simple tool that Liv can try out to see whether it's worth having, or worth fleshing out somehow, or things like that. Here is how it works:
If you type !hubs notify set [datetime] with a date the bot can parse (e.g. 7/18/19 19:00), the bot will make a message saying that a meetup notification has been scheduled, and pin the message. Note that the timezone is assumed to be the bot's default timezone if not otherwise specified -- in our deployment, that's PT.
When the date comes, the bot will unpin the message and send a message notifying @ here to join the hub.
It's OK to pile up multiple notifications like this. The bot will send a message at each future time. If you're curious what notifications there are, you should look at the pinned messages.
Notifications fire at the start of the minute and only have a one-minute resolution, so if you make a notification at 19:30:06 it will just message you are 19:30:00 (by our clock) anyway.
If the bot is down (unlikely, but possible) when the notification is supposed to fire, you won't get it, and it won't fire when the bot comes back up, so you probably shouldn't rely on using these notifications to remind you to take your medication every morning for the rest of your life because someday eventually you won't take it.
If you type !hubs notify clear, the bot will delete any pinned notification messages and cancel the corresponding pending notifications.
Right now, the bot won't respect pins/unpins/deletions of notification messages that you do manually until it restarts (which happens at arbitrary times, when we deploy stuff), so you probably shouldn't do that if you want to keep the pending notification behavior legible. You might also get odd results if you do things like take away and give back the bot's permissions at strategic times, and so on. I'm really only trying to handle the reasonable cases here so that we can test this out.
Note that the bot needs "manage messages" permission in order to pin or unpin messages, so none of this will work if you don't grant it in the channels you want it to operate in.
This is aimed to be a simple tool that Liv can try out to see whether it's worth having, or worth fleshing out somehow, or things like that. Here is how it works:
!hubs notify set [datetime]
with a date the bot can parse (e.g.7/18/19 19:00
), the bot will make a message saying that a meetup notification has been scheduled, and pin the message. Note that the timezone is assumed to be the bot's default timezone if not otherwise specified -- in our deployment, that's PT.!hubs notify clear
, the bot will delete any pinned notification messages and cancel the corresponding pending notifications.Right now, the bot won't respect pins/unpins/deletions of notification messages that you do manually until it restarts (which happens at arbitrary times, when we deploy stuff), so you probably shouldn't do that if you want to keep the pending notification behavior legible. You might also get odd results if you do things like take away and give back the bot's permissions at strategic times, and so on. I'm really only trying to handle the reasonable cases here so that we can test this out.
Note that the bot needs "manage messages" permission in order to pin or unpin messages, so none of this will work if you don't grant it in the channels you want it to operate in.