Music.py 文件源码

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

项目:Luna 作者: Moonlington 项目源码 文件源码
def join(self, *, channel: discord.Channel):
        """Joins a voice channel."""
        try:
            await self.bot.create_voice_client(channel)
        except discord.InvalidArgument:
            out = await self.bot.say('This is not a voice channel...')
            await asyncio.sleep(5)
            try:
                await self.bot.delete_messages([ctx.message, out])
            except:
                pass
        except discord.ClientException:
            out = await self.bot.say('Already in a voice channel...')
            await asyncio.sleep(5)
            try:
                await self.bot.delete_messages([ctx.message, out])
            except:
                pass
        else:
            out = await self.bot.say('Ready to play audio in ' + channel.name)
            await asyncio.sleep(5)
            try:
                await self.bot.delete_messages([ctx.message, out])
            except:
                pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号