目前我的“播放”命令如下所示:
@commands.command(name='play')
async def play(self, ctx: commands.Context, *, search: str):
if not ctx.voice_state.voice:
await ctx.invoke(self._join)
async with ctx.typing():
try:
source = await YTDLSource.create_source(ctx, search, loop=self.bot.loop)
except YTDLError as e:
await ctx.send('An error occurred while processing this request: {}'.format(str(e)))
else:
song = Song(source)
await ctx.voice_state.songs.put(song)
await ctx.send('Enqueued {}'.format(str(source)))
它工作得很好,但是当我尝试通过链接对播放列表进行排队时,它只播放第一首单曲,没有别的。所以我想知道如何使播放列表正常工作。