fix: Incorrect modify_track change.

This commit is contained in:
Lemon4ksan
2025-01-13 20:47:40 +03:00
parent bf2056b1d9
commit eb6c9b4665

View File

@@ -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: