Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display guild count in bot status #525

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

tktcorporation
Copy link
Owner

@tktcorporation tktcorporation commented Dec 29, 2024

This pull request includes several important changes to the src/handler and src/infrastructure modules, primarily focusing on improving the management of slash commands and updating the activity status functionality. The most significant changes are listed below:

Slash Commands Management:

  • Added a new function get_commands to the SlashCommands enum to simplify the registration of commands.
  • Updated the ready event handler to use the new get_commands function for setting global commands, replacing the previous hardcoded list.

Activity Status Updates:

  • Modified the set_help_message_to_activity function to accept a Context and a message string, updating the bot's activity status accordingly.
  • Refactored the ready event handler to periodically update the activity status with the current number of active guilds.

Infrastructure Enhancements:

  • Made the tmp_path function public in the path_router module to facilitate its usage in other parts of the codebase.
  • Added a new pub use statement for tmp_path in the infrastructure module.

Copy link

Related issue

@tktcorporation tktcorporation force-pushed the 197/feature/guild-count branch from 0ebfded to 4d9fd1e Compare December 29, 2024 10:25
- Add guild count to bot status message

- Update status every 5 minutes using tmp_path()

- Clean up unused imports and test placeholders

The bot now shows the number of guilds it's active in as part of its status message, making it easier to track its usage across servers. The count is updated every 5 minutes by checking the number of directories in the tmp path.
@tktcorporation tktcorporation force-pushed the 197/feature/guild-count branch from 4d9fd1e to f6539c9 Compare December 29, 2024 10:36
@tktcorporation tktcorporation merged commit ef031a3 into master Dec 29, 2024
8 of 9 checks passed
@tktcorporation tktcorporation deleted the 197/feature/guild-count branch December 29, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant