Skip to content

Conversation

@YoannDev90
Copy link
Owner

This pull request makes several improvements to bot shutdown and message purge handling across multiple bot modules. The main focus is on ensuring bots close gracefully, removing unnecessary forced exits, and improving the management of auto-purge tasks for admin and logger bots. Additionally, minor robustness improvements and code cleanups are made for image generation and command handling.

Graceful Bot Shutdown

Auto-Purge Task Management

  • Refactors admin and logger bots to manage auto-purge tasks with a global variable, ensuring tasks are started and stopped correctly on bot lifecycle events. Adds close_bot() methods to handle task cancellation and bot closure. [1] [2] [3] [4]
  • Improves error handling in purge loops and message deletion, combining exception handling for Discord errors and ensuring tasks are cancelled gracefully. [1] [2] [3]

Command and Admin Improvements

  • Updates /clear and auto-purge command logic to simplify error handling, improve robustness, and clarify user feedback messages.
  • Refactors /restart and /stop admin commands to use a stop.json file for signaling process management, removing direct bot closure and exit calls for better external control. [1] [2]

Minor Robustness & Cleanup

  • Sets a default image size in the image generation endpoint for consistency.

These changes collectively improve the reliability, maintainability, and operational control of bot processes and automated message management.

…chanism added for HackClub, OpenRouter, and IO Intelligence APIs.
…m; add signal handling for shutdown events and monitor stop.json for commands.
@YoannDev90 YoannDev90 merged commit c3b34c0 into main Oct 17, 2025
3 checks passed
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.

2 participants