MetaCog.py 文件源码

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

项目:Inkxbot 作者: InkxtheSquid 项目源码 文件源码
def charinfo(self, *, characters: str):
        """Shows you information about a number of characters in emojis.
        Only up to 15 characters at a time.
        """

        if len(characters) > 15:
            await self.bot.say('Too many characters ({}/15)'.format(len(characters)))
            return

        fmt = '`\\U{0:>08}`: {1} - {2} \N{EM DASH} <http://www.fileformat.info/info/unicode/char/{0}>'

        def to_string(c):
            digit = format(ord(c), 'x')
            name = unicodedata.name(c, 'Name not found.')
            return fmt.format(digit, name, c)

        await self.bot.say('\n'.join(map(to_string, characters)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号