utils.py 文件源码

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

项目:GAFBot 作者: DiNitride 项目源码 文件源码
def about(self, ctx, user: discord.Member = None):
        """
        Shows information about a user
        """
        if user is None:
            user = ctx.author
        with ctx.channel.typing():
            embed = discord.Embed(colour=discord.Colour(0x30f9c7), description="ID: {}".format(user.id),
                                  timestamp=datetime.datetime.now())
            embed.set_thumbnail(
                url=user.avatar_url)
            embed.set_author(name=user)
            embed.set_footer(text="All about {}".format(user))
            embed.add_field(name="Bot?", value=user.bot)
            embed.add_field(name="Roles", value="{}".format(len(user.roles) - 1))
            embed.add_field(name="Account Creation Date", value=user.created_at)
            embed.add_field(name="Date Joined Guild", value=user.joined_at)
            embed.add_field(name="Game", value=user.game)
            embed.add_field(name="Status", value=user.status)
            embed.add_field(name="Voice State", value=user.voice)
            embed.add_field(name="Display Name", value=user.display_name)
            await ctx.send(embed=embed)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号