Ce fichier entrait en conflit avec le dossier instance/ (base SQLite +
config persistante), gitignoré, et causait "unable to open database
file" au démarrage après un git pull sur les déploiements existants.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Removed the `on_presentation_message` function to streamline role assignment processes.
- Updated the `assign_rules_arrival_on_join` function to clarify its purpose, focusing solely on assigning the arrival role upon member join.
- Adjusted success message generation for role validation to enhance clarity and user experience.
- Modified configuration settings and web templates to reflect the updated role assignment behavior, ensuring accurate user guidance.
- Introduced a new function `assign_rules_arrival_on_join` to assign the arrival role to members upon joining, based on configuration settings.
- Updated the `on_member_join` event to call the new function, enhancing the user experience by providing immediate role assignment.
- Modified configuration options in the web application to allow enabling or disabling this feature.
- Updated the configurations template to reflect the new role assignment behavior, ensuring clarity for users.
- Introduced a new helper function `_rules_ack_success_text` to streamline the success message generation for role acknowledgment.
- Enhanced error handling in `handle_rules_accept` to ensure proper member fetching and context validation.
- Simplified the success message response logic, improving code readability and maintainability.
- Added a new module for managing rules acknowledgment, including a persistent button for users to accept the rules.
- Updated the database schema to change the `value` column type in the `Configuration` model to `TEXT` for better handling of longer rule descriptions.
- Enhanced the web application to include configuration options for rules acknowledgment, allowing customization of the rules message and button label.
- Integrated the rules acknowledgment feature into the Discord bot, enabling automatic role assignment upon acceptance and handling of presentation messages for validated roles.
- Updated the configurations template to support new settings related to rules acknowledgment.
- Changed permissions for the `/ban`, `/kick`, and `/timeout` commands to require `manage_messages` instead of their previous specific permissions.
- Updated context menu commands for banning, kicking, and timing out authors to align with the new permission structure, ensuring consistent moderation capabilities across commands.
- Eliminated the `Inspecter l'auteur` context menu command due to Discord's limitation on global message commands.
- Updated related documentation to reflect the removal of this command, ensuring clarity for users regarding available moderation functionalities.
- Added new moderation commands: `/warn` and `/inspect`, improving user interaction for warnings and user inspections.
- Refactored the `send_warning_confirmation` function to streamline the warning process and improve message formatting.
- Updated command handling to ensure proper user feedback and error handling during moderation actions.
- Improved the overall structure of moderation-related functions for better maintainability.
- Introduced a new slash command `/say` for sending messages in specific channels, improving moderation capabilities.
- Updated the ProtonDB command to include an alias `/pdb`, streamlining user interaction.
- Refactored command descriptions and improved error handling for better user experience.
- Replaced the deprecated ProtonDB command handling with a new slash command and context menu for improved user experience.
- Updated moderation command descriptions to reflect the new ProtonDB functionalities.
- Introduced a new module for ProtonDB interactions, enhancing the bot's capability to search and display game compatibility information.
- Removed deprecated timeout and ban command handling from the message processing logic.
- Added new moderation slash commands for ban, kick, and timeout functionalities.
- Updated the command tree initialization to include the new moderation commands for better organization and usability.
- Removed the mention of "@here" from the notification message to streamline the announcement format.
- Ensured the message remains clear and informative for users regarding the available game bundle.
- Removed the `guild_member_stats` table and related logic from the database and models, as well as the associated webapp routes and templates.
- Cleaned up the Discord bot initialization by eliminating unused imports and functions related to member statistics.
- Updated logging configuration in `run-web.py` to streamline the startup process and improve thread management.
- Introduced a new module `rate_limit_logging.py` to log HTTP headers for Discord API rate limits (HTTP 429).
- Updated the Discord bot initialization in `__init__.py` to include a custom HTTP trace configuration for better rate limit handling.
- Adjusted logging levels in `run-web.py` to reduce verbosity for rate limit headers.
- Added logic to prevent duplicate logging from Discord-related modules by clearing their handlers and ensuring propagation.
- Refactored thread management to start the Discord bot first, followed by the web server and Twitch bot with a delay to avoid concurrency issues at startup.
- Created a new table `guild_member_stats` to track message counts and voice activity for users in each guild.
- Updated the database schema and models to include the new table.
- Added a new permission entry for `discord_members` in the `webapp_page_permission` table.
- Enhanced the webapp to include links and settings for managing Discord member statistics.
- Added buttons to adjust font size and toggle sound notifications in the shoutbox.
- Updated sound notification logic to improve user experience when new messages arrive.
- Refactored font size handling to persist user preferences using local storage.
- Improved layout for better responsiveness and usability across devices.
- Adjusted the layout of the Twitch moderation template to enhance visual clarity and responsiveness, including changes to element sizes and spacing.
- Updated the display of live status and link filter sections for a more compact and streamlined appearance.
- Improved text sizes and alignment for better readability across different devices.
- Introduced a new helper function `_format_stream_uptime` to calculate and format the stream uptime based on the start time.
- Updated the Twitch moderation route to include the formatted stream uptime in the rendered template.
- Enhanced the Twitch moderation template layout for better responsiveness and visual clarity, including adjustments to the live status display and overall structure.
- Modified the conditional check in the ProtonDB template to allow for enabling features based on both ProtonDB and Twitch settings.
- This change enhances the flexibility of the configuration for users integrating ProtonDB with Twitch.
- Added a cooldown mechanism to the ProtonDB command to prevent spamming.
- Introduced a new configuration option for setting the cooldown duration in seconds.
- Updated the ProtonDB template to include the new cooldown setting for Twitch users.
- Introduced a helper function `_search` to encapsulate the ProtonDB search logic within the app context.
- Updated the command execution to use the new helper function, enhancing code clarity and maintainability.
- Introduced `cmd_pdb` command in TwitchBot for ProtonDB integration.
- Registered new command for Twitch and updated chat command list.
- Added configuration options for enabling ProtonDB on Twitch in the webapp.
- Updated ProtonDB template to include new settings and permissions for Twitch users.
Le constructeur de la classe Twitch n'est pas une coroutine et ne doit pas être appelé avec asyncio.run(). Cela causait une ValueError lors de la demande de token Twitch.
Co-authored-by: Cursor <cursoragent@cursor.com>
Intégration de toutes les fonctionnalités développées dans la branche twitchbot :
- Système de modération Twitch complet
- Filtre de liens intelligent
- Notifications d'événements Twitch
- Système Freeloot Discord
- Salons automatiques Discord
- Authentification utilisateur
- Gestion des utilisateurs
- Interfaces d'administration étendues
Conflits résolus en faveur des versions de twitchbot pour :
- templates/commandes.html
- templates/configurations.html
- templates/humeurs.html
- templates/index.html
- templates/live-alert.html
- templates/moderation.html
- templates/protondb.html
- templates/template.html
Co-authored-by: Cursor <cursoragent@cursor.com>
Nouvelles fonctionnalités :
- Système de modération Twitch complet (bans, timeouts, avertissements)
- Filtre de liens intelligent pour Twitch avec whitelist/blacklist
- Notifications d'événements Twitch (follows, subs, raids, etc.)
- Système Freeloot Discord avec flux RSS dédié
- Salons automatiques Discord (création/suppression dynamique)
- Authentification utilisateur pour l'interface web (login/register)
- Gestion des utilisateurs et permissions
- Interface de modération Twitch dans la webapp
- Interface de gestion des événements Twitch
- Configuration des paramètres utilisateur
- Migration BDD pour les mots bannis
Améliorations de l'interface :
- Refonte complète des templates (configurations, commandes, humeurs, etc.)
- Nouvelle page de settings utilisateur
- Page de gestion des utilisateurs (admin)
- Page d'erreur 403 personnalisée
- Amélioration de la navigation et du design global
- Intégration de nouvelles sections dans le menu principal
Modifications techniques :
- Ajout de nouveaux modèles en base de données
- Extension des helpers database
- Mise à jour des dépendances (requirements.txt)
- Amélioration de la gestion des annonces Twitch
- Refactorisation du code pour meilleure maintenabilité
Co-authored-by: Cursor <cursoragent@cursor.com>