diff --git a/modules/utils_sync.py b/modules/utils_sync.py index 3b6660f..3f80df6 100644 --- a/modules/utils_sync.py +++ b/modules/utils_sync.py @@ -1,6 +1,6 @@ -from typing import Any +from typing import Any, Union -from discord import Member +from discord import Member, User from ujson import dumps, loads @@ -36,7 +36,9 @@ def config_set_sync(key: str, value: Any, *path: str) -> None: return -def guild_name(member: Member): +def guild_name(member: Union[Member, User]) -> str: + if isinstance(member, User): + return member.name if member.nick == None: return member.name else: