Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.