Fixed some bugs

This commit is contained in:
Choco
2024-02-20 20:08:49 +08:00
parent c049f4cbf6
commit efb5bf7b77
3 changed files with 18 additions and 17 deletions

View File

@@ -131,7 +131,7 @@ class Playlists(commands.Cog, name="playlist"):
player = await voicelink.connect_channel(ctx)
if result['playlist']['type'] == 'link':
tracks = await search_playlist(result['playlist']['uri'], ctx.author, timeNeed=False)
tracks = await search_playlist(result['playlist']['uri'], ctx.author, time_needed=False)
else:
if not result['playlist']['tracks']:
return await send(ctx, 'playlistNoTrack', result['playlist']['name'], ephemeral=True)
@@ -443,7 +443,7 @@ class Playlists(commands.Cog, name="playlist"):
return await send(ctx, 'playlistNotFound', name, ephemeral=True)
if result['playlist']['type'] == 'link':
tracks = await search_playlist(result['playlist']['uri'], ctx.author, timeNeed=False)
tracks = await search_playlist(result['playlist']['uri'], ctx.author, time_needed=False)
else:
if not result['playlist']['tracks']:
return await send(ctx, 'playlistNoTrack', result['playlist']['name'], ephemeral=True)
@@ -508,4 +508,4 @@ class Playlists(commands.Cog, name="playlist"):
return await send(ctx, "decodeError", ephemeral=True)
async def setup(bot: commands.Bot) -> None:
await bot.add_cog(Playlists(bot))
await bot.add_cog(Playlists(bot))