diff options
| author | 2021-08-13 10:22:02 +0100 | |
|---|---|---|
| committer | 2021-08-22 20:24:00 +0100 | |
| commit | 59aeaab40655a3bc91264e24802d2bc6e02d3372 (patch) | |
| tree | 154777e8059db23659070fa2604353349f0d8ce4 | |
| parent | Remove redundant fetching of user code (diff) | |
Remove redundant getattr protection
| -rw-r--r-- | bot/exts/moderation/infraction/_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/moderation/infraction/_utils.py b/bot/exts/moderation/infraction/_utils.py index 827623936..9d94bca2d 100644 --- a/bot/exts/moderation/infraction/_utils.py +++ b/bot/exts/moderation/infraction/_utils.py @@ -53,10 +53,10 @@ async def post_user(ctx: Context, user: MemberOrUser) -> t.Optional[dict]: log.trace(f"Attempting to add user {user.id} to the database.") payload = { - 'discriminator': int(getattr(user, 'discriminator', 0)), + 'discriminator': int(user.discriminator), 'id': user.id, 'in_guild': False, - 'name': getattr(user, 'name', 'Name unknown'), + 'name': user.name, 'roles': [] } |