Добавлено в User @property full_name

This commit is contained in:
Денис Семёнов 2025-07-27 02:11:04 +03:00
parent 7ed540683c
commit 7925087ac7

View File

@ -35,6 +35,13 @@ class User(BaseModel):
avatar_url: Optional[str] = None
full_avatar_url: Optional[str] = None
commands: Optional[List[BotCommand]] = None
@property
def full_name(self):
if self.last_name is None:
return self.first_name
return f'{self.first_name} {self.last_name}'
class Config:
json_encoders = {