discord-moodle-bot icon indicating copy to clipboard operation
discord-moodle-bot copied to clipboard

✨ Use the rich precense feature of discord to communicate the current update status.

Open tjarbo opened this issue 3 years ago • 4 comments

As a User I want to see directly in Discord when the Bot will fetch for updates next time. so that I can estimate if it will be better to trigger the bot manually.

Description:

The Rich Presence feature of Discord looks very cool and bots can communicate over it for example how to get started (e.g. "Listens for !help"). We can use this feature to display the current moodle-fetch status.

Let's define the following states:

Description Text
STATE-1 Bot is looking for updates "Schaut nach Updates!
STATE-2 Bot will look for updates again at 5:12 pm "Schaut um 17:12 wieder nach."

Links:

  • https://discord.js.org/#/docs/main/stable/class/ClientUser?scrollTo=setActivity

Idea by @Stektax https://github.com/tjarbo/discord-moodle-bot/issues/83#issuecomment-759320571

🟢 In scope:

  • Extend the discord implementation
  • Add a function which expects a time as parameter and sets the activity on Discord
  • Set the activity category to "WATCHING"

🔴 Not in scope:

  • I8n (English support)

What should be the result?

IF the bot starts to fetch new updates THEN the activity will be set to STATE-1

IF the bot finished fetching updates, THEN the activity will display the timestamp of the next fetch.

tjarbo avatar Jan 13 '21 18:01 tjarbo