def now_playing(self, ctx):
"""Shows what's playing."""
if not ctx.guild.voice_client.is_playing():
return await ctx.send('Nothing\'s playing at the moment.')
state = self.state_for(ctx.guild)
src = state.to_loop if isinstance(state.vc.source, PCMVolumeTransformer) else state.vc.source.info
minutes, seconds = divmod(src['duration'], 60)
await ctx.send('**Now playing:** {0[title]} {0[webpage_url]} ({1:02d}:{2:02d})'.format(src, minutes, seconds))
评论列表
文章目录