general.py 文件源码

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

项目:SESTREN 作者: SirThane 项目源码 文件源码
def discrim(self, ctx, *, member: discord.Member=None):
        """Finds a username that you can use to change discriminator

        [p]discrim"""
        if not member:
            member = ctx.author

        d = member.discriminator
        f = discord.utils.find(lambda x: x.discriminator == d and not x.id == member.id,
                               self.bot.get_all_members())
        if f is not None:
            em = discord.Embed(title="Discrim",
                               description="Change your name to `{}` and then back to `{}` to get a new discriminator"
                                           "".format(f.name, member.name), colour=0x00FF00)
            await ctx.send(embed=em)
        else:
            em = discord.Embed(title="Sorry",
                               description="I couldn't find another person with your discriminator", colour=0xFF0000)
            await ctx.send(embed=em)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号