Browse Source

Remove @ prefix from usernames

Discord seemed to have backtracked on this display
pull/10109/head
Rapptz 2 years ago
committed by dolfies
parent
commit
1348362699
  1. 2
      discord/member.py
  2. 2
      discord/team.py
  3. 6
      discord/user.py
  4. 2
      discord/widget.py

2
discord/member.py

@ -243,7 +243,7 @@ class Member(discord.abc.Messageable, discord.abc.Connectable, _UserTag):
.. describe:: str(x)
Returns the member's handle (e.g. ``@user`` or ``user#discriminator``).
Returns the member's handle (e.g. ``name`` or ``name#discriminator``).
Attributes
----------

2
discord/team.py

@ -497,7 +497,7 @@ class TeamMember(User):
.. describe:: str(x)
Returns the team member's handle (e.g. ``@user`` or ``user#discriminator``).
Returns the team member's handle (e.g. ``name`` or ``name#discriminator``).
.. versionadded:: 1.3

6
discord/user.py

@ -278,7 +278,7 @@ class BaseUser(_UserTag):
def __str__(self) -> str:
if self.discriminator == '0':
return f'@{self.name}'
return self.name
return f'{self.name}#{self.discriminator}'
def __eq__(self, other: object) -> bool:
@ -611,7 +611,7 @@ class ClientUser(BaseUser):
.. describe:: str(x)
Returns the user's handle (e.g. ``@user`` or ``user#discriminator``).
Returns the user's handle (e.g. ``name`` or ``name#discriminator``).
.. versionchanged:: 2.0
:attr:`Locale` is now a :class:`Locale` instead of a Optional[:class:`str`].
@ -949,7 +949,7 @@ class User(BaseUser, discord.abc.Connectable, discord.abc.Messageable):
.. describe:: str(x)
Returns the user's handle (e.g. ``@user`` or ``user#discriminator``).
Returns the user's handle (e.g. ``name`` or ``name#discriminator``).
Attributes
-----------

2
discord/widget.py

@ -121,7 +121,7 @@ class WidgetMember(BaseUser):
.. describe:: str(x)
Returns the widget member's handle (e.g. ``@user`` or ``user#discriminator``).
Returns the widget member's handle (e.g. ``name`` or ``name#discriminator``).
Attributes
-----------

Loading…
Cancel
Save