nep.py 文件源码

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

项目:KeekoBot 作者: DavidNeon 项目源码 文件源码
def Nep(self):
        """Displays a random Nep."""

        nep = choice(self.nep)

        nepsay = choice(self.nepsay)

        if not nep or not nepsay:
            await self.bot.say('Something went wrong')
            return

        colour = ''.join([choice('0123456789ABCDEF') for x in range(6)])
        colour = int(colour, 16)

        data = discord.Embed(
            title=nepsay, colour=discord.Colour(value=colour))
        data.set_image(url=nep)

        try:
            await self.bot.say(embed=data)
        except:
            await self.bot.say("I need the `Embed links` permission "
                               "to send this")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号