第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

AttributeError: 'Member' 對象沒有屬性 'public_flags'

AttributeError: 'Member' 對象沒有屬性 'public_flags'

海綿寶寶撒 2022-12-20 15:26:08
@commands.command()async def profile(self, ctx, *, user: discord.Member = None):    """Profile"""    if user == None:      user = ctx.author    server = ctx.guild    #error in this    print(ctx.author.public_flags)    #    ..........我想知道用戶示例的公共標志:Hypesquad balance
查看完整描述

2 回答

?
MMTTMM

TA貢獻1869條經(jīng)驗 獲得超4個贊

使用discord.User.profile

@commands.command()

async def profile(self, ctx, *, user: discord.Member = None):

    """Profile"""

    if user == None:

      user = ctx.author

    server = ctx.guild

    # this for example prints if the user has discord nitro

    print(await ctx.author.profile().nitro)

配置文件包含的信息在這里


查看完整回答
反對 回復 2022-12-20
?
catspeake

TA貢獻1111條經(jīng)驗 獲得超0個贊

我找到了答案。從 github 安裝最新的 discord.py


@commands.command()

async def profile(self, ctx, *, user: discord.Member = None):

    """Profile"""

    if user == None:

      user = ctx.author

    server = ctx.guild

    print(ctx.author.public_flags.all())

    ..........


查看完整回答
反對 回復 2022-12-20
  • 2 回答
  • 0 關注
  • 98 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號