Enhanced Bot Presence: Dynamic Activities and Status Updates #345
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.
Streamlining Discord Bot Presence with Dynamic Activity and Status Management
Quick Overview
This update enables the Discord bot to randomly display one of 81 pre-defined activities every ~35 seconds and adjust its online status (Online, Idle, DND, Invisible) accordingly.
Introduction
Building on that quick overview, the addition of this cog to the bot's architecture allows for a wider range of displayed activities—such as Playing, Watching, Competing, Listening—each accompanied by an appropriate status.
Core Features
Technical Overview
The core logic resides in a
discord.Cog
class, equipped with both activity and status services. It maintains an inventory of 81 different activities, each annotated with its type and an optional corresponding status. These activities are randomized and displayed in rotation.Operational Mechanics
ActivityType
, descriptor, and an optional status.Exemplary Code Snippet
Testing
I tested it for 5+ minutes on a Windows 10 Machine, and for 5+ minutes on a Ubuntu 22 Machine.
One last thing I just realized, ultimately some mention of it in README will have to take place in due time if it's implemented.