Package com.mcawful.social
Class SocialPoller
java.lang.Object
com.mcawful.social.SocialPoller
Polls every
SocialPlatform for new activity and fires the social events
A poll type is polled when chat, Discord or repost rewards want it. Uses these keys in the platform's table:
poll_<type>: announce new items of the type in chat (true/false)polldelay_<type>: seconds between polls, never less thanSocialPollType.minDelaySeconds()reward_toggle: also poll the types that feed repost rewardslastpoll_<type>: when the type was last polled, in epoch secondswatermark_<type>: where the next poll startswatermarkaccount_<type>: the account the watermark belongs tolast_<type>: the newest announced item, as JSON
discordSettings, for platform bluesky and poll type mentions:
blueskyToggle: Discord announcements are onblueskyAnnounceMentions: announce new items of the type in Discord
STALE_POLLS delays (at least
STALE_SECONDS), so activity from while it was off is not announced or rewarded.- Author:
- mcawful
-
Method Summary
Modifier and TypeMethodDescriptionstatic SocialPollerinstance()Returns the instance, starting the poller on first usevoidkill()Stops polling
-
Method Details
-
instance
Returns the instance, starting the poller on first use- Returns:
- the instance
-
kill
public void kill()Stops polling
-