cog.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:dogbot 作者: slice 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号