dio.py 文件源码

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

项目:GrandeCogs 作者: HarukiGrande 项目源码 文件源码
def alias(self, ctx, alias):
        """Create D.io link"""
        key = self.loadapi["ApiKey"]
        inv = await self.bot.create_invite(ctx.message.server, unique=False)
        async with aiohttp.ClientSession() as session:
            async with session.get('https://discord.io/api?api={0}&url={1}'.format(key, inv) + "&custom=" + alias + '&format=text') as resp:
                print(resp.status)
                try:
                    await self.bot.say(await resp.text())
                except discord.errors.HTTPException:
                    await self.bot.say("Link already exists, or the alias is reserved for Pro users.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号