From a3c481760b5960ae2d5be1d385f923af0bd907bf Mon Sep 17 00:00:00 2001 From: Oleg A Date: Thu, 5 Nov 2020 16:00:27 +0300 Subject: [PATCH] AIOG-T-71 new `ChatLocation` class --- aiogram/types/chat_location.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 aiogram/types/chat_location.py diff --git a/aiogram/types/chat_location.py b/aiogram/types/chat_location.py new file mode 100644 index 00000000..0438c544 --- /dev/null +++ b/aiogram/types/chat_location.py @@ -0,0 +1,16 @@ +from . import base +from . import fields +from .location import Location + + +class ChatLocation(base.TelegramObject): + """ + Represents a location to which a chat is connected. + + https://core.telegram.org/bots/api#chatlocation + """ + location: Location = fields.Field() + address: base.String = fields.Field() + + def __init__(self, location: Location, address: base.String): + super().__init__(location=location, address=address)