166 Commits

Author SHA1 Message Date
Choco
47ec3d212a Refactor controller UI and bump version
Refactor interactive controller components and tweak command signatures.

- Make lyrics command accept keyword-only args (adds a leading * for title/artist).
- Bump version to v2.7.3b3.
- Import dispatch_message and add send_embed helper to ControlButton for embed responses.
- Introduce ControlSelect (base for selects) and refactor Tracks/Effects to inherit it, pass player explicitly and fix placeholder/player usage.
- Namespace localization keys (e.g. player.controls.forward/rewind) and defer interaction responses where appropriate.
- Replace direct send_localized_message calls with ControlSelect/ControlButton send wrappers to honor controller message settings.
- Add additional on_error handling for VoicelinkException and ensure non-ephemeral message deletion behavior follows controller settings.

These changes improve consistency for UI components, interaction handling, and localization usage.
2026-04-15 11:57:08 +08:00
Choco
ce6ef5d11e Defer interaction responses in commands
Call await ctx.defer() for discord.Interaction in play, search and playtop to avoid interaction timeouts during long operations. Also move the MongoDB get_user playlist fetch in check_playlist to after the defer so DB work doesn't occur before the interaction is deferred. (cogs/basic.py, cogs/playlist.py)
2026-04-05 23:55:50 +08:00
Choco
56a6b67470 Make messages ephemeral and bump discord.py
Make certain bot responses ephemeral to avoid spamming channels (debug command and missing-permission reply). Bump discord.py from 2.7.0 to 2.7.1 in requirements. Remove an unused Config().get_playlist_config() assignment in updatePlaylist to clean up dead code.
2026-03-30 11:01:53 +08:00
Choco
ae8dfbc1b6 Fixed translation to meet the discord requirements 2026-03-22 13:58:40 +08:00
Choco
8bb34326d1 Add settings reset command for per-setting defaults
Introduces a settings reset subcommand with choices so admins can clear one guild override at a time via MongoDB $unset, with live player sync for volume and duplicate-track defaults. Adds settings.actions.resetDone across language files and optional reset aliases (restore, defaults) in settings examples.
2026-03-22 12:09:34 +08:00
Choco
19618a1726 Add per-player inactive cleanup timer and config
Adds configurable inactive cleanup timing and per-player timer logic so idle players disconnect or pause according to 24/7 and voice-channel state, replacing immediate teardown when the queue finishes.
2026-03-21 23:40:12 +08:00
Choco
dfa0616271 Fix playlist creation message key
Corrects the localization key from 'playlist.actions.create' to 'playlist.actions.created' when sending a message after playlist creation.
2026-01-06 10:56:11 +08:00
Choco
8fdceef4db Add user selection modal for playlist sharing
Introduces a modal dialog to select a user when sharing a playlist, improving the user experience. Updates the PlaylistView to use the new BaseModal for sharing, and enhances BaseModal to support select components and store their values.
2025-11-29 11:20:21 +08:00
Choco
9201ee730f fix: use correct disabled_vote key
Updated references to 'common.status.disabled_vote' to use 'disabled_vote' directly in the settings cog. This simplifies the settings structure and ensures consistency when toggling and displaying the voting system status.
2025-11-23 18:33:15 +08:00
Choco
d5186319a0 Add playlist permission management commands
Introduces a new 'permission' command to grant or revoke read, write, or remove permissions for playlists. Refactors playlist access checks to support granular permissions and shared playlist operations, and updates localized messages for permission actions.
2025-11-20 23:34:51 +08:00
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
7479f9bfe2 Show track length in autocomplete choices
Track autocomplete choices now display the formatted track length for both current tracks and history, improving user clarity when selecting tracks.
2025-10-08 12:19:40 +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
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
7a4f85a74d Merge branch 'beta' into refactor-views 2025-09-26 13:29:27 +08:00
Choco
2c98dfd763 Update command docstrings and localization keys
Improved docstrings for 'play' and 'search' commands in basic.py for clarity. Updated localization keys and translations in es-419.json, es-ES.json, and zh-CN.json to fix punctuation, naming consistency, and minor translation errors.
2025-09-24 17:58:15 +08:00
Choco
9f43cce969 Merge branch 'beta' into refactor-views 2025-09-19 23:30:46 +08:00
Choco
1633f14b64 Refactor playlist view and update language files
Refactored playlist viewing logic for improved modularity and maintainability, introducing PlaylistViewManager and DynamicViewManager. Updated language files to standardize playlist view titles and descriptions, and removed unnecessary emojis. Updated requirements.txt to discord.py 2.6.3. Enhanced send function to support file attachments.
2025-09-19 23:29:42 +08:00
Choco
851871e123 Update play and search command descriptions and translations
Revised the docstrings for the play and search commands in basic.py for clarity. Updated corresponding translation strings in es-419.json, es-ES.json, and zh-TW.json to match the new descriptions.
2025-09-19 21:39:51 +08:00
Choco
2c9aae7861 Refactor queue view and add pagination utilities
Replaced ListView with QueueView for queue/history display, introducing improved pagination and modal support via new utilities in views/utils/. Updated imports and references in cogs/basic.py and views/__init__.py. Removed views/list.py and added views/queue.py, views/utils/pagination.py, and views/utils/modal.py for modular pagination and modal handling.
2025-09-16 14:53:22 +08:00
Choco
e7aa431ae2 Handle Playlist type in track search results
Added a check to handle cases where the returned tracks are a Playlist object, ensuring the correct list of tracks is used for app command choices.
2025-08-11 17:44:46 +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
d9fb58ef92 Use snake_case for all database keys 2025-08-04 10:57:54 +08:00
Choco
c8fa4e561a Added silent messaging feature 2025-07-23 10:46:52 +08:00
Choco
7c5caa8d6d Updated the search platform from spotify to youtube 2025-07-03 16:10:41 +08:00
Choco
3699590c0e Fixed some bugs 2025-04-05 22:06:10 +08:00
Choco
7c14bb56a7 Rewrite play_autocomplete function 2025-03-25 15:20:43 +08:00
Choco
5498c60466 Replaced internal spotify with lavalink 2025-03-22 18:42:28 +08:00
Choco
3a1440c875 Update listeners.py 2025-03-16 11:07:12 +08:00
Choco
ba4f1d349f Prevent rejoin channel that without members 2025-03-10 12:59:36 +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
f5af35a6a1 Added yt ratelimiter 2025-02-21 11:26:24 +08:00
Choco
f4b3ebe2ae Updated the player checker 2025-01-21 15:33:43 +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
11fcbfa222 Added warning logs if missing translation 2024-12-10 09:59:46 +08:00
Choco
7d83c02cf3 Added missing intent error message 2024-12-09 17:02:11 +08:00
Choco
3d377fd5ab Added music controller into request channel 2024-12-09 16:42:55 +08:00
Choco
94c5fd4c27 Added request song channel feature 2024-12-05 13:33:29 +08:00
Choco
9d505caf7f Updated voicelink enum 2024-11-19 11:32:02 +08:00
Choco
b26daaaeb7 Fixed the play autocomplete 2024-10-25 16:56:05 +08:00
Choco
aa4017e090 Supported clear queue endpoint in ipc 2024-09-09 11:34:45 +08:00
Choco
f58deb2f8b Fixed some bugs 2024-09-07 13:08:28 +08:00
Choco
b26d7af14b Improved codes 2024-09-04 17:16:39 +08:00
Choco
1dc753f4d4 Updated version tag 2024-08-30 17:17:52 +08:00
Choco
b0ff4fb6c3 Added voice status (#33)
* Updated the placeholder name for clarity

* Added voice status

* Dump bot version

* Added global template for voice status

* Added new placeholder

* Updated settings view
2024-08-30 15:27:37 +08:00