-
-
Notifications
You must be signed in to change notification settings - Fork 0
tracking(Notifications): add RSS feed support #53
Comments
Interesting idea. @Tylertron1998 something you may be interested in making after YT notifs is fully done? You're quite into the whole periodic checking and such now. |
Very interesting - could make for a good microservice. Though, it does beg the question if there should be one central event microservice that forwards events from other smaller microservices, such as youtube notifications, rss feeds, etc. |
Skyra.Notifier maybe? |
is that a good setup? In that case, there would be Skyra.Notifier, that takes in all notifications from all other services and forwards them to the actual bot - Skyra.Youtube which takes in notifications from youtube, and forwards it to Skyra.Notifier - and now Skyra.RSS - which takes RSS feed notifications and forwards it to Skyra.Notifier |
Sounds good to me |
Since we on the topic of what could use these services Skyra.twitch to announce if a channel is live, Skyra.Twitter to post new tweets. When you think about it, the notification service could be used to expand a lot of functionality. It also makes sense to delegate these to a separate service as once expanded upon, the notifications could take up a significant load of the bot if enough servers use the features. So keeping the main bot not bogged down by schedules and only handling posting a notification once received from the notification service would be appropriate. And since skyra has redis support, the communication could be done via redis pub/sub this can keep the bot event driven. |
Twitch notifications are already in Skyra, albeit it through TS. It can be moved to C# I guess, but it's lower priority than new features.
This is something that's been a long time request and I think the API for it is finally free so I think we can use it. Used to be it was a paid API with exorbitant prices. |
Is your feature request related to a problem? Please describe.
A schedule to periodically check rss feeds for new articles and post them in designated channels.
A command to add a RSS feed along the lines of
!rss add {link} {channel} {time}
etc etcDescribe the solution you'd like
A command will be needed to add/remove/list rss feeds for a server.
When an rss feed is added a schedule is started to fetch the current news and post new articles in the designated channel.
A new table would be needed to store the rss feeds
id | guild_id | channel_id | feed | period | last_time
A scheduleTask will need to be added to pick up these rss feeds, check for new articles which were published after the last time the schedule ran, post the newest, store the current time and reschedule based on the provided time.
Describe alternatives you've considered
None
Additional context
Command set
!rss add {link} {channel} {time}
-!rss add http://feeds.bbci.co.uk/news/world/rss.xml #news 15m
Start a schedules task to check the rss feed for new articles and post new ones in the channel supplied
Time could be optional with a default of 1 hour
Link and channel should be required.
!rss list
List all active rss feeds for the server
!rss remove {id}
- delete a rss feedDelete an rss feed for a server by its unique identifier.
Commands should be limited to moderator roles.
Open for discussion
The text was updated successfully, but these errors were encountered: