Discord/modules/utils_sync.py

9 lines
205 B
Python
Raw Normal View History

2023-05-08 17:39:46 +03:00
from discord import Member, User
2023-05-04 17:09:47 +03:00
2023-05-04 17:14:23 +03:00
def guild_name(member: Member | User) -> str:
2023-05-08 17:39:46 +03:00
if isinstance(member, User):
return member.name
2024-12-16 00:36:48 +02:00
return member.name if member.nick is None else member.nick