Skip to content

Commit

Permalink
Return username if the user has no discriminator
Browse files Browse the repository at this point in the history
Thanks Discord
  • Loading branch information
4Kaylum committed Jul 5, 2023
1 parent 961fa72 commit 03ac03b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions novus/models/guild_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ def __init__(
__repr__ = generate_repr(('id', 'username', 'bot', 'guild',))

def __str__(self) -> str:
if self.discriminator == "0":
return self.username
return f"{self.username}#{self.discriminator}"

@property
Expand Down

0 comments on commit 03ac03b

Please sign in to comment.