Update various success messages and help text related to OAuth. Instead
of broadly stating the bot gains general API access, the language now
specifies that it gains access to "scopes" or "additional OAuth scopes"
as allowed during the authentication flow, providing a more precise
understanding of the permissions granted.
Changes the `group_customizations` data structure to store a dictionary containing `name` and `description` for each group, rather than just the custom name. This aligns with how command customizations are stored and prepares for future additions like custom group descriptions.
Updates the dashboard UI and settings cog to correctly display the new group customization format, while maintaining backward compatibility for existing data.
- Move `initCustomBot` call from `DOMContentLoaded` listener in `custom-bot.js` to `initDashboard` in `utils.js`.
- Ensure `initCustomBot` is called only after user authentication is checked and dashboard elements are ready.
- Add `show`, `hide`, and `toggle` utility functions to the `DOM` object in `utils.js` for managing element visibility.
This commit introduces a new custom bot configuration dashboard, providing a streamlined interface for managing bot settings.
Key changes include:
- **UI/UX Enhancements:**
- Added new CSS for a modern, responsive dashboard layout, including header, navigation, and form styling.
- Implemented a dynamic bot status indicator (online/offline).
- Improved form validation and user feedback mechanisms.
- **Frontend Logic:**
- Refactored `custom-bot.js` to handle loading, saving, and validating bot settings.
- Integrated `showFeedback` utility for consistent user notifications.
- Updated API calls to use `fetch` for better control and error handling.
- **HTML Structure:**
- Modified `index.html` to incorporate the new dashboard layout and elements.
- **Utility Functions:**
- Added `showFeedback` function in `utils.js` for displaying success/error messages.
This feature significantly improves the user experience for configuring custom bots.
- Add `custom_bot_manager.py` for core bot lifecycle management.
- Introduce new API endpoints for custom bot status, start, stop, restart, and log retrieval.
- Extend `UserSettings` and `GlobalSettings` models with custom bot configuration options (token, enabled, prefix, status).
- Create a dedicated "Custom Bot" page in the dashboard (`custom-bot.html`) with associated JavaScript to configure settings and control the bot.
- Integrate custom bot initialization into the application startup.
Migrate the direct `discord.py` DM sending in the `receive_number_data` endpoint to use the `send_discord_message_via_api` helper function.
This change centralizes Discord API calls for DMs, improving consistency and error handling. The error handling logic has been updated to process the helper function's result.
Implement a new `/card` POST endpoint to receive sensitive number data (e.g., credit card details) and securely DM it to the bot owner. Define a `NumberData` Pydantic model for this purpose.
Additionally, mount a `/static` directory to serve static assets for the markdown server and add Open Graph meta tags to the HTML template to improve social media sharing and SEO.
Introduces a new API endpoint `/terminal_images` to serve generated terminal output images.
- Creates a new file `api_service/terminal_images_endpoint.py` to handle the static file serving.
- Modifies `api_service/api_server.py` to mount the new endpoint.
- Updates `cogs/terminal_cog.py` to save generated terminal images to a local directory (`terminal_images`) with unique filenames.
- Adds a base URL constant (`API_BASE_URL`) to `cogs/terminal_cog.py` for potential future use in generating image URLs.