voice.py 文件源码

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

项目:Excalibot 作者: endreman0 项目源码 文件源码
def make(self, ctx, *, voice: discord.VoiceChannel):
        """Creates a text channel and links it to the given voice channel."""
        msg = await ctx.send('Creating text channel for {}'.format(voice.name))
        text = await ctx.guild.create_text_channel('voice-' + voice.name.lower().replace(' ', '-'), reason='Voice link requested by {}'.format(ctx.author))
        with ctx.session:
            role = await self._create_role(ctx.guild, text, voice, 'Voice link requested by {}'.format(ctx.author))
            link = ctx.session.add(TextVoiceLink(role_id=role.id, text_id=text.id, voice_id=voice.id))
        await ctx.send(content='Created {} and linked it to "{}"'.format(text.mention, voice.name))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号