Пример #1
0
async def check_member_kick(client: discord.Client, member: discord.Member):
    guild = member.guild

    print('!RAN')

    if not guild.me.guild_permissions.view_audit_log:
        return

    entry = await fetch_recent_audit_log_entry(client, member.guild, target=member, action=discord.AuditLogAction.kick, retry=3)
    if entry is None:
        return

    client.dispatch(EVENT_NAME, member, entry)
Пример #2
0
 def dispatch(self, client: discord.Client) -> None:
     client.dispatch(self.event_type, *self.args, *self.kwargs)