113 Commits

Author SHA1 Message Date
d89645ca28
Refactor: Store group customizations as objects
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.
2025-05-26 16:23:47 -06:00
f6e70a85c0
feat: Provide default values for required fields in user settings during global settings update 2025-05-26 15:37:15 -06:00
cab07d09db
feat: Refactor utility exports for improved accessibility in the dashboard 2025-05-26 15:28:59 -06:00
cfb768cc33
feat: Initialize custom bot from dashboard and add DOM utilities
- 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.
2025-05-26 15:25:55 -06:00
c61ccd5ca4
feat: Add endpoint to retrieve authenticated user information and enhance global settings model 2025-05-26 15:22:12 -06:00
0677b7e168
feat: Implement custom bot configuration dashboard
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.
2025-05-26 15:19:26 -06:00
97e4de1383
refactor: Enhance dashboard initialization and error handling to fix white screen issue and improve user experience 2025-05-21 18:37:54 -06:00
2e6136caec
refactor: Improve custom bot management by adding import error handling and updating bot initialization logic 2025-05-21 18:20:33 -06:00
77973d5573
refactor: Enhance database connection handling by prioritizing API server's pool and adding error handling 2025-05-21 18:16:39 -06:00
172f5907b3
feat: Implement custom bot management dashboard
- 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.
2025-05-21 18:11:17 -06:00
0c2e599f77
refactor: Implement fallback mechanisms for guild retrieval and improve error handling in dashboard API 2025-05-21 17:29:03 -06:00
1be8ed88f9
refactor: Improve DM sending process in receive_number_data by using background tasks and adding REST API fallback 2025-05-21 17:12:35 -06:00
1d10cc4c40
fix: Simplify error logging in receive_number_data by removing traceback details 2025-05-21 17:10:48 -06:00
3dbed19952
Fix: Enhance error logging in receive_number_data with traceback details 2025-05-21 17:09:07 -06:00
e34013ec96
feat: Add backward compatibility aliases for NumberData fields and improve Discord message handling 2025-05-21 17:05:33 -06:00
69b53811ad
Refactor: Use API helper for Discord DM sending in receive_number_data
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.
2025-05-21 17:01:44 -06:00
3dc3a2d9ae
refactor: Replace multiprocessing with threading for API and markdown servers to avoid conflicts 2025-05-21 16:59:15 -06:00
5ea3ef1e45
feat: Add /card API endpoint and static file serving
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.
2025-05-21 16:45:20 -06:00
c9d6cc40a6
feat: Add terminal image endpoint and save images
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.
2025-05-17 19:29:05 -06:00
8a2d68ed6f
feat: Enhance exception handling for openrouterkey endpoint with improved path processing and logging 2025-05-14 17:43:24 -06:00
161707f71d
feat: Improve exception handling for openrouterkey endpoint with enhanced path checks and logging 2025-05-14 17:41:29 -06:00
f5cfa7a00a
feat: Enhance exception handling for openrouterkey endpoint with case-insensitive path checks 2025-05-14 17:38:21 -06:00
fede9ae99e
feat: Rename openrouter_key endpoint to openrouterkey for consistency 2025-05-14 17:33:30 -06:00
e720d14853
123 2025-05-14 17:32:17 -06:00
d53808268d
feat: Rename endpoint to /openrouter_key and update function name for consistency 2025-05-14 17:23:54 -06:00
1a67e2bd9d
feat: Implement private endpoint for retrieving OpenRouter API key with authorization check 2025-05-14 17:18:01 -06:00
c06a81503f
feat: Enhance route logging to include mounted apps and unknown route types for better debugging 2025-05-14 17:16:12 -06:00
7799588aaa
feat: Add logging for available routes in the main app for debugging purposes 2025-05-14 17:14:05 -06:00
65ccfeba91
feat: Change endpoint to GET for retrieving OpenRouter API key with basic security check 2025-05-14 17:10:12 -06:00
eef8800716
feat: Add private endpoint to retrieve OpenRouter API key with authorization check 2025-05-14 17:07:34 -06:00
f341ea0aa7
123 2025-05-13 07:39:54 -06:00
edf5e76c7f
as 2025-05-10 22:13:37 -06:00
ae3080b0de
asd 2025-05-10 11:14:46 -06:00
1efa9dc052
aaa 2025-05-09 18:48:16 -06:00
e9289a7d3a
123 2025-05-09 18:10:44 -06:00
4ae5720065
as 2025-05-09 17:58:49 -06:00
1a54a2802b
1 2025-05-09 17:56:19 -06:00
5300c059c4
a 2025-05-09 17:47:01 -06:00
561bff3dda
a 2025-05-09 17:46:04 -06:00
31905f4f50
1 2025-05-09 17:44:26 -06:00
55b647fe65
a 2025-05-09 17:43:24 -06:00
97c90a51f6
1 2025-05-09 17:41:38 -06:00
20d4d353d3
ksm 2025-05-09 17:38:38 -06:00
8af8c96210
fuck my life 2025-05-09 17:34:41 -06:00
e3decb81d8
123 2025-05-09 17:21:40 -06:00
6bc445f249
asd 2025-05-09 17:18:22 -06:00
1c1b61c4a8
asd 2025-05-09 17:09:04 -06:00
ee84d5fcec
asd 2025-05-09 16:42:38 -06:00
80083bd14a
asd 2025-05-09 14:17:17 -06:00
a62fe7aca6
Add endpoint to return user-agent from request headers 2025-05-08 21:11:42 -06:00