Fix StarAmount mapping

This commit is contained in:
Yuu 2025-04-27 01:51:13 +02:00
parent 482629ac18
commit 7626999302

View file

@ -2,6 +2,8 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from pydantic import Field
from .base import TelegramObject
@ -12,7 +14,7 @@ class StarAmount(TelegramObject):
Source: https://core.telegram.org/bots/api#staramount
"""
amount: int
amount: int = Field(..., alias="star_count")
"""Integer amount of Telegram Stars, rounded to 0; can be negative"""
nanostar_amount: Optional[int] = None
"""*Optional*. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if *amount* is non-positive"""