Commit Graph

155 Commits

Author SHA1 Message Date
Choco
df5373353c Refactor track recommendation logic and add TrackRecType enum
Moved recommendation query generation from Node to Track using the new TrackRecType enum, simplifying and centralizing platform-specific recommendation formatting. Updated related methods to use Track.get_recommendations, removed Node.get_recommendations, and improved enum handling for search platform matching. Also exposed TrackRecType in voicelink.__init__.
2025-10-09 11:12:02 +08:00
Choco
c28f17ea43 Update playlist link validation and info text
Standardized playlist link validation messages across all language files and code, removing specific references to Spotify and YouTube. Updated README and help view to reflect broader platform support and clarified instructions. Removed unused YouTube regex and related thumbnail logic from objects.py.
2025-10-08 12:19:56 +08:00
Choco
12be1ede64 Improve error logging in process_methods
Replaces traceback printing with structured logging using ipc_client._logger.error, providing better context and exception details when method processing fails.
2025-10-08 11:24:16 +08:00
Choco
7d8bec787c Refactor modals to use BaseModal and update node stats
Replaced custom ExecuteModal and AddNodeModal classes with a generic BaseModal for code execution and node creation. Updated Node class to initialize _stats attribute. Adjusted logic in NodesPanel to check for node stats before displaying memory info.
2025-10-06 16:10:53 +08:00
Choco
b503385542 Refactor modal usage and error handling in views
Replaced custom Modal class with BaseModal in embed_builder.py for consistency and maintainability. Updated modal instantiation to use custom_id and improved value handling. Removed redundant on_error methods from help.py, pagination.py, and search.py, and delegated error handling to superclass in controller.py for cleaner error management.
2025-10-06 15:56:30 +08:00
Choco
7f6135801d Add items property to Pagination and refactor QueueView
Introduced an 'items' property to the Pagination class for direct access to the underlying items list. Refactored QueueView to use this new property, improving code clarity and consistency.
2025-10-05 22:39:07 +08:00
Choco
5c98e60f91 Set default current view in DynamicViewManager
Initializes _current_view to the 'home' view if present, instead of None. Also removes unused BaseModal import and fixes type annotation for Pagination in QueueView.
2025-10-05 22:28:01 +08:00
Choco
90c2f22496 Fix music controller being removed after song playback 2025-10-03 14:56:30 +08:00
Choco
50298d2709 Resolve MongoDB handler not updating cache 2025-10-03 14:55:29 +08:00
Choco
81a8603e1d Added default language in language handler 2025-10-02 12:28:50 +08:00
Choco
20df3703c3 Refactor localization keys 2025-10-02 00:10:25 +08:00
Choco
d439204146 Added get cached settings method in mongodbhandler 2025-10-02 00:06:09 +08:00
Choco
aee2ec5f3b fixed some bugs and remove presences intents 2025-10-02 00:05:26 +08:00
Choco
3831c87f9b Add default_search_platform option for customizable search platform 2025-09-29 21:15:23 +08:00
Choco
f6722e538a Moved ipc_client into voicelink 2025-09-29 19:54:51 +08:00
Choco
ef54f96f51 Migrate scripts to voicelink, rewrite handlers and views 2025-09-29 19:39:19 +08:00
Choco
355d0e1186 Refactor language retrieval functions
Removed get_lang_non_async and replaced its usage with a new internal _get_lang function. Updated get_lang to use _get_lang for consistency. Updated Player class to use _get_lang directly, improving code clarity and reducing duplication.
2025-09-23 10:47:44 +08:00
Choco
f1fa4606ed Fix track existence check in Node.get_tracks
Corrects a variable name in the track existence check from 'track' to 'tracks', ensuring the method properly returns an empty list when no tracks are found.
2025-09-16 14:49:52 +08:00
Choco
5c973a76b9 Improve message handling and permission checks
Added a 'requires_fetch' parameter to the send function to ensure messages are fetched when needed. Enhanced command interaction checks to verify bot permissions for reading and sending messages in channels. Updated player controller logic to use the new fetch behavior for controller messages.
2025-08-24 22:47:52 +08:00
Choco
8edc26a6d0 Standardize permission and message keys in code and locales
Updated various permission and message keys in the codebase and all language files for consistency. Also added missing keys and fixed minor typos in several language files.
2025-08-10 12:44:05 +08:00
Choco
07b2576729 Fix send function context handling and queueType key
Updated the send function to correctly handle TempCtx and only include 'ephemeral' if supported by the send function. Also fixed the key from 'queue_type' to 'queueType' in the Player's IPC message for consistency with expected API.
2025-08-06 10:48:44 +08:00
Choco
e97a604aed Added silent mode to the controller 2025-08-04 11:07:59 +08:00
Choco
d9fb58ef92 Use snake_case for all database keys 2025-08-04 10:57:54 +08:00
Choco
c7d19b9383 Change variable name 2025-07-03 16:11:01 +08:00
Choco
026b262752 return empty list if track not found 2025-06-11 14:34:24 +08:00
Choco
8b81c05d98 Disable yt ratelimit if there are no tokens provided 2025-05-14 09:37:33 +08:00
Choco
47972a4eb5 Added peek next in loop type 2025-05-13 16:53:07 +08:00
Choco
2219820e55 Supported local languages in placeholder 2025-05-13 16:52:47 +08:00
Choco
ac56a22caa Updated the transformer 2025-04-17 12:17:10 +08:00
Choco
1b54e83cea Fixed some bugs 2025-04-10 11:37:14 +08:00
Choco
8007555759 Rewrite get_track function 2025-03-25 15:11:04 +08:00
Choco
461f1180b2 Fixed some bugs 2025-03-22 19:22:46 +08:00
Choco
5498c60466 Replaced internal spotify with lavalink 2025-03-22 18:42:28 +08:00
Choco
3a3675eb59 Reconnect the player after restarted 2025-03-07 17:20:57 +08:00
Choco
0ab2438abe Fixed typo 2025-03-07 14:24:52 +08:00
Choco
2c16543e0c Fixed track source 2025-03-04 12:01:37 +08:00
Choco
5b88f89894 Changed yt-ratelimit to optional 2025-02-26 16:17:55 +08:00
Choco
59034d8f5a Prevent usage of active token 2025-02-22 12:35:24 +08:00
Choco
f5af35a6a1 Added yt ratelimiter 2025-02-21 11:26:24 +08:00
Choco
3c0515adbf Added mit license 2025-01-28 12:12:40 +08:00
Choco
1910c7e0b6 Fixed bugs 2025-01-24 10:26:01 +08:00
Choco
e933fd3645 Fixed Node Reconnection Functionality 2025-01-22 15:00:23 +08:00
Choco
1bf3f406f0 Refactor IPC client payload
change naming style from snake_case to camelCase
2025-01-21 15:29:25 +08:00
Choco
6dfedf0e44 Fixed bugs and optimized code 2025-01-07 15:13:06 +08:00
Choco
5a22a930f5 Fixed loading issue for some Spotify playlists 2025-01-06 21:33:49 +08:00
Choco
31812d0b1d Merge branch 'beta' into Lrclib-Lyrics 2024-12-16 11:51:49 +08:00
Choco
19cb196763 Added Lrclib lyrics support 2024-12-16 11:18:26 +08:00
Choco
cdd5313293 Fixed controller not found in request channel 2024-12-09 16:49:22 +08:00
Choco
3d377fd5ab Added music controller into request channel 2024-12-09 16:42:55 +08:00
Choco
9d505caf7f Updated voicelink enum 2024-11-19 11:32:02 +08:00