Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit log actions member_move and member_disconnect have no target #4222

Closed
3 tasks done
classabbyamp opened this issue Jun 21, 2020 · 2 comments
Closed
3 tasks done
Labels
discord limitation This can't be fixed because it's a discord limitation

Comments

@classabbyamp
Copy link

Summary

AuditLogAction.member_move and .member_disconnect have no target, when I would expect an abc.User-based object.

Reproduction Steps

async for entry in guild.audit_logs(action=discord.AuditLogAction.member_move):
    print(type(entry.target))    # will print <class 'NoneType'>

async for entry in guild.audit_logs(action=discord.AuditLogAction.member_disconnect):
    print(type(entry.target))    # will print <class 'NoneType'>

Expected Results

entry.target is a User or Member.

Actual Results

entry.target is None

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

System Information

@Taarek
Copy link
Contributor

Taarek commented Jun 21, 2020

Not a Discord.py bug.

Discord simply does not provide this information.
This is what Discord returns for disconnect, the same applies to move:

{
    "audit_log_entries": [
        {
            "id": "724117578582065223",
            "user_id": "182226567043219456",
            "target_id": null,
            "action_type": 27,
            "options": {
                "count": "1"
            }
        }
    ],
    "users": [
        {
            "id": "182226567043219456",
            "username": "Tarek",
            "avatar": "cc97d72d834660ab1b1dcd62945b3da0",
            "discriminator": "1337",
            "public_flags": 780
        }
    ],
    "integrations": [],
    "webhooks": []
}

@classabbyamp
Copy link
Author

Ok, thank you

@dpy-manager-bot dpy-manager-bot added the discord limitation This can't be fixed because it's a discord limitation label Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discord limitation This can't be fixed because it's a discord limitation
Projects
None yet
Development

No branches or pull requests

3 participants