【问题标题】:How do you check if a user has completed Membership Screening in discord.py rewrite如何检查用户是否已在 discord.py rewrite 中完成会员筛选
【发布时间】:2022-01-05 17:09:06
【问题描述】:

在 Discord 中,有一个名为“会员筛选”的服务器设置。使用 MEE6 机器人,它可以选择仅在用户接受成员资格筛选后自动赋予角色。在 discord.py rewrite 中,如何让它等待用户接受成员资格筛选,然后再执行操作?谢谢

【问题讨论】:

    标签: discord discord.py


    【解决方案1】:

    使用Member.pending属性检查会员是否已完成会员验证。
    您也可以使用on_member_update 事件在成员完成验证时赋予角色。 例如:

    @bot.event
    async def on_member_update(before, after):
        if before.pending and not after.pending:
            pass  # give a role
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-11-13
      • 2019-12-29
      • 1970-01-01
      • 2021-04-02
      • 1970-01-01
      • 2020-12-01
      • 2020-03-28
      相关资源
      最近更新 更多