mirror of
https://github.com/deadcxap/YandexMusicDiscordBot.git
synced 2026-01-10 09:41:46 +03:00
fix: Incorrect modify_track change.
This commit is contained in:
@@ -82,15 +82,12 @@ class VoiceGuildsDatabase(BaseGuildsDatabase):
|
|||||||
"""
|
"""
|
||||||
guild = self.get_guild(gid)
|
guild = self.get_guild(gid)
|
||||||
|
|
||||||
if type not in ('next_tracks', 'previous_tracks'):
|
if type not in ('next', 'previous'):
|
||||||
raise ValueError(f"Type must be either 'next' or 'previous', not '{type}'")
|
raise ValueError(f"Type must be either 'next' or 'previous', not '{type}'")
|
||||||
explicit_type: Literal['next_tracks', 'previous_tracks'] = type + '_tracks' # type: ignore[assignment]
|
explicit_type: Literal['next_tracks', 'previous_tracks'] = type + '_tracks' # type: ignore[assignment]
|
||||||
tracks = guild[explicit_type]
|
tracks = guild[explicit_type]
|
||||||
pop_track = None
|
pop_track = None
|
||||||
|
|
||||||
if not tracks:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if isinstance(track, list):
|
if isinstance(track, list):
|
||||||
tracks_list = []
|
tracks_list = []
|
||||||
for _track in track:
|
for _track in track:
|
||||||
|
|||||||
Reference in New Issue
Block a user