mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
Regenerate code
This commit is contained in:
parent
5d1c54aa17
commit
4189c3e798
77 changed files with 271 additions and 233 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import datetime
|
||||
from typing import List, Optional, Union
|
||||
|
||||
from ..methods import (
|
||||
|
|
@ -77,9 +78,6 @@ from ..types import (
|
|||
InlineKeyboardMarkup,
|
||||
InlineQueryResult,
|
||||
InputFile,
|
||||
InputMedia,
|
||||
InputMediaPhoto,
|
||||
InputMediaVideo,
|
||||
LabeledPrice,
|
||||
MaskPosition,
|
||||
Message,
|
||||
|
|
@ -97,7 +95,7 @@ from ..types import (
|
|||
from .base import BaseBot
|
||||
|
||||
|
||||
class Bot(ContextInstanceMixin, BaseBot):
|
||||
class Bot(BaseBot):
|
||||
"""
|
||||
Class where located all API methods
|
||||
"""
|
||||
|
|
@ -134,7 +132,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:rtype: :obj:`List[Update]`
|
||||
"""
|
||||
call = GetUpdates(
|
||||
offset=offset, limit=limit, timeout=timeout, allowed_updates=allowed_updates
|
||||
offset=offset, limit=limit, timeout=timeout, allowed_updates=allowed_updates,
|
||||
)
|
||||
return await self.emit(call)
|
||||
|
||||
|
|
@ -675,7 +673,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
async def send_media_group(
|
||||
self,
|
||||
chat_id: Union[int, str],
|
||||
media: List[Union[InputMediaPhoto, InputMediaVideo]],
|
||||
media: Union[str, InputFile],
|
||||
disable_notification: Optional[bool] = None,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
) -> List[Message]:
|
||||
|
|
@ -687,7 +685,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
|
||||
:type chat_id: :obj:`Union[int, str]`
|
||||
:param media: A JSON-serialized array describing photos and videos to be sent, must include 2–10 items
|
||||
:type media: :obj:`List[Union[InputMediaPhoto, InputMediaVideo]]`
|
||||
:type media: :obj:`Union[str, InputFile]`
|
||||
:param disable_notification: Sends the messages silently. Users will receive a notification with no sound.
|
||||
:type disable_notification: :obj:`Optional[bool]`
|
||||
:param reply_to_message_id: If the messages are a reply, ID of the original message
|
||||
|
|
@ -965,7 +963,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
)
|
||||
return await self.emit(call)
|
||||
|
||||
async def send_chat_action(self, chat_id: Union[int, str], action: str) -> bool:
|
||||
async def send_chat_action(self, chat_id: Union[int, str], action: str,) -> bool:
|
||||
"""
|
||||
Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
|
||||
Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use sendChatAction with action = upload_photo. The user will see a 'sending photo' status for the bot.
|
||||
|
|
@ -980,11 +978,11 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = SendChatAction(chat_id=chat_id, action=action)
|
||||
call = SendChatAction(chat_id=chat_id, action=action,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def get_user_profile_photos(
|
||||
self, user_id: int, offset: Optional[int] = None, limit: Optional[int] = None
|
||||
self, user_id: int, offset: Optional[int] = None, limit: Optional[int] = None,
|
||||
) -> UserProfilePhotos:
|
||||
"""
|
||||
Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
|
||||
|
|
@ -1000,10 +998,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns a UserProfilePhotos object.
|
||||
:rtype: :obj:`UserProfilePhotos`
|
||||
"""
|
||||
call = GetUserProfilePhotos(user_id=user_id, offset=offset, limit=limit)
|
||||
call = GetUserProfilePhotos(user_id=user_id, offset=offset, limit=limit,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def get_file(self, file_id: str) -> File:
|
||||
async def get_file(self, file_id: str,) -> File:
|
||||
"""
|
||||
Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
|
||||
Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.
|
||||
|
|
@ -1015,11 +1013,14 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: On success, a File object is returned.
|
||||
:rtype: :obj:`File`
|
||||
"""
|
||||
call = GetFile(file_id=file_id)
|
||||
call = GetFile(file_id=file_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def kick_chat_member(
|
||||
self, chat_id: Union[int, str], user_id: int, until_date: Optional[int] = None
|
||||
self,
|
||||
chat_id: Union[int, str],
|
||||
user_id: int,
|
||||
until_date: Optional[Union[int, datetime.datetime, datetime.timedelta]] = None,
|
||||
) -> bool:
|
||||
"""
|
||||
Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
|
||||
|
|
@ -1031,14 +1032,14 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:param user_id: Unique identifier of the target user
|
||||
:type user_id: :obj:`int`
|
||||
:param until_date: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
|
||||
:type until_date: :obj:`Optional[int]`
|
||||
:type until_date: :obj:`Optional[Union[int, datetime.datetime, datetime.timedelta]]`
|
||||
:return: In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc. Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = KickChatMember(chat_id=chat_id, user_id=user_id, until_date=until_date)
|
||||
call = KickChatMember(chat_id=chat_id, user_id=user_id, until_date=until_date,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def unban_chat_member(self, chat_id: Union[int, str], user_id: int) -> bool:
|
||||
async def unban_chat_member(self, chat_id: Union[int, str], user_id: int,) -> bool:
|
||||
"""
|
||||
Use this method to unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. Returns True on success.
|
||||
|
||||
|
|
@ -1051,7 +1052,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: The user will not return to the group or channel automatically, but will be able to join via link, etc. Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = UnbanChatMember(chat_id=chat_id, user_id=user_id)
|
||||
call = UnbanChatMember(chat_id=chat_id, user_id=user_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def restrict_chat_member(
|
||||
|
|
@ -1059,7 +1060,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
chat_id: Union[int, str],
|
||||
user_id: int,
|
||||
permissions: ChatPermissions,
|
||||
until_date: Optional[int] = None,
|
||||
until_date: Optional[Union[int, datetime.datetime, datetime.timedelta]] = None,
|
||||
) -> bool:
|
||||
"""
|
||||
Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.
|
||||
|
|
@ -1073,12 +1074,12 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:param permissions: New user permissions
|
||||
:type permissions: :obj:`ChatPermissions`
|
||||
:param until_date: Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever
|
||||
:type until_date: :obj:`Optional[int]`
|
||||
:type until_date: :obj:`Optional[Union[int, datetime.datetime, datetime.timedelta]]`
|
||||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = RestrictChatMember(
|
||||
chat_id=chat_id, user_id=user_id, permissions=permissions, until_date=until_date
|
||||
chat_id=chat_id, user_id=user_id, permissions=permissions, until_date=until_date,
|
||||
)
|
||||
return await self.emit(call)
|
||||
|
||||
|
|
@ -1138,7 +1139,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
return await self.emit(call)
|
||||
|
||||
async def set_chat_permissions(
|
||||
self, chat_id: Union[int, str], permissions: ChatPermissions
|
||||
self, chat_id: Union[int, str], permissions: ChatPermissions,
|
||||
) -> bool:
|
||||
"""
|
||||
Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members admin rights. Returns True on success.
|
||||
|
|
@ -1152,10 +1153,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = SetChatPermissions(chat_id=chat_id, permissions=permissions)
|
||||
call = SetChatPermissions(chat_id=chat_id, permissions=permissions,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def export_chat_invite_link(self, chat_id: Union[int, str]) -> str:
|
||||
async def export_chat_invite_link(self, chat_id: Union[int, str],) -> str:
|
||||
"""
|
||||
Use this method to generate a new invite link for a chat; any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as String on success.
|
||||
Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink – after this the link will become available to the bot via the getChat method. If your bot needs to generate a new invite link replacing its previous one, use exportChatInviteLink again.
|
||||
|
|
@ -1167,10 +1168,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns the new invite link as String on success.
|
||||
:rtype: :obj:`str`
|
||||
"""
|
||||
call = ExportChatInviteLink(chat_id=chat_id)
|
||||
call = ExportChatInviteLink(chat_id=chat_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def set_chat_photo(self, chat_id: Union[int, str], photo: InputFile) -> bool:
|
||||
async def set_chat_photo(self, chat_id: Union[int, str], photo: InputFile,) -> bool:
|
||||
"""
|
||||
Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
|
||||
|
||||
|
|
@ -1183,10 +1184,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = SetChatPhoto(chat_id=chat_id, photo=photo)
|
||||
call = SetChatPhoto(chat_id=chat_id, photo=photo,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def delete_chat_photo(self, chat_id: Union[int, str]) -> bool:
|
||||
async def delete_chat_photo(self, chat_id: Union[int, str],) -> bool:
|
||||
"""
|
||||
Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
|
||||
|
||||
|
|
@ -1197,10 +1198,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = DeleteChatPhoto(chat_id=chat_id)
|
||||
call = DeleteChatPhoto(chat_id=chat_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def set_chat_title(self, chat_id: Union[int, str], title: str) -> bool:
|
||||
async def set_chat_title(self, chat_id: Union[int, str], title: str,) -> bool:
|
||||
"""
|
||||
Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
|
||||
|
||||
|
|
@ -1213,11 +1214,11 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = SetChatTitle(chat_id=chat_id, title=title)
|
||||
call = SetChatTitle(chat_id=chat_id, title=title,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def set_chat_description(
|
||||
self, chat_id: Union[int, str], description: Optional[str] = None
|
||||
self, chat_id: Union[int, str], description: Optional[str] = None,
|
||||
) -> bool:
|
||||
"""
|
||||
Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
|
||||
|
|
@ -1231,7 +1232,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = SetChatDescription(chat_id=chat_id, description=description)
|
||||
call = SetChatDescription(chat_id=chat_id, description=description,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def pin_chat_message(
|
||||
|
|
@ -1255,11 +1256,11 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = PinChatMessage(
|
||||
chat_id=chat_id, message_id=message_id, disable_notification=disable_notification
|
||||
chat_id=chat_id, message_id=message_id, disable_notification=disable_notification,
|
||||
)
|
||||
return await self.emit(call)
|
||||
|
||||
async def unpin_chat_message(self, chat_id: Union[int, str]) -> bool:
|
||||
async def unpin_chat_message(self, chat_id: Union[int, str],) -> bool:
|
||||
"""
|
||||
Use this method to unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel. Returns True on success.
|
||||
|
||||
|
|
@ -1270,10 +1271,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = UnpinChatMessage(chat_id=chat_id)
|
||||
call = UnpinChatMessage(chat_id=chat_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def leave_chat(self, chat_id: Union[int, str]) -> bool:
|
||||
async def leave_chat(self, chat_id: Union[int, str],) -> bool:
|
||||
"""
|
||||
Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
|
||||
|
||||
|
|
@ -1284,10 +1285,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = LeaveChat(chat_id=chat_id)
|
||||
call = LeaveChat(chat_id=chat_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def get_chat(self, chat_id: Union[int, str]) -> Chat:
|
||||
async def get_chat(self, chat_id: Union[int, str],) -> Chat:
|
||||
"""
|
||||
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
|
||||
|
||||
|
|
@ -1298,10 +1299,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns a Chat object on success.
|
||||
:rtype: :obj:`Chat`
|
||||
"""
|
||||
call = GetChat(chat_id=chat_id)
|
||||
call = GetChat(chat_id=chat_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def get_chat_administrators(self, chat_id: Union[int, str]) -> List[ChatMember]:
|
||||
async def get_chat_administrators(self, chat_id: Union[int, str],) -> List[ChatMember]:
|
||||
"""
|
||||
Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
|
||||
|
||||
|
|
@ -1312,10 +1313,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
|
||||
:rtype: :obj:`List[ChatMember]`
|
||||
"""
|
||||
call = GetChatAdministrators(chat_id=chat_id)
|
||||
call = GetChatAdministrators(chat_id=chat_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def get_chat_members_count(self, chat_id: Union[int, str]) -> int:
|
||||
async def get_chat_members_count(self, chat_id: Union[int, str],) -> int:
|
||||
"""
|
||||
Use this method to get the number of members in a chat. Returns Int on success.
|
||||
|
||||
|
|
@ -1326,10 +1327,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns Int on success.
|
||||
:rtype: :obj:`int`
|
||||
"""
|
||||
call = GetChatMembersCount(chat_id=chat_id)
|
||||
call = GetChatMembersCount(chat_id=chat_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def get_chat_member(self, chat_id: Union[int, str], user_id: int) -> ChatMember:
|
||||
async def get_chat_member(self, chat_id: Union[int, str], user_id: int,) -> ChatMember:
|
||||
"""
|
||||
Use this method to get information about a member of a chat. Returns a ChatMember object on success.
|
||||
|
||||
|
|
@ -1342,10 +1343,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns a ChatMember object on success.
|
||||
:rtype: :obj:`ChatMember`
|
||||
"""
|
||||
call = GetChatMember(chat_id=chat_id, user_id=user_id)
|
||||
call = GetChatMember(chat_id=chat_id, user_id=user_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def set_chat_sticker_set(self, chat_id: Union[int, str], sticker_set_name: str) -> bool:
|
||||
async def set_chat_sticker_set(self, chat_id: Union[int, str], sticker_set_name: str,) -> bool:
|
||||
"""
|
||||
Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
|
||||
|
||||
|
|
@ -1358,10 +1359,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = SetChatStickerSet(chat_id=chat_id, sticker_set_name=sticker_set_name)
|
||||
call = SetChatStickerSet(chat_id=chat_id, sticker_set_name=sticker_set_name,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def delete_chat_sticker_set(self, chat_id: Union[int, str]) -> bool:
|
||||
async def delete_chat_sticker_set(self, chat_id: Union[int, str],) -> bool:
|
||||
"""
|
||||
Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
|
||||
|
||||
|
|
@ -1372,7 +1373,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = DeleteChatStickerSet(chat_id=chat_id)
|
||||
call = DeleteChatStickerSet(chat_id=chat_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def answer_callback_query(
|
||||
|
|
@ -1500,7 +1501,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
|
||||
async def edit_message_media(
|
||||
self,
|
||||
media: InputMedia,
|
||||
media: Union[str, InputFile],
|
||||
chat_id: Optional[Union[int, str]] = None,
|
||||
message_id: Optional[int] = None,
|
||||
inline_message_id: Optional[str] = None,
|
||||
|
|
@ -1512,7 +1513,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
Source: https://core.telegram.org/bots/api#editmessagemedia
|
||||
|
||||
:param media: A JSON-serialized object for a new media content of the message
|
||||
:type media: :obj:`InputMedia`
|
||||
:type media: :obj:`Union[str, InputFile]`
|
||||
:param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
|
||||
:type chat_id: :obj:`Optional[Union[int, str]]`
|
||||
:param message_id: Required if inline_message_id is not specified. Identifier of the message to edit
|
||||
|
|
@ -1584,10 +1585,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: On success, the stopped Poll with the final results is returned.
|
||||
:rtype: :obj:`Poll`
|
||||
"""
|
||||
call = StopPoll(chat_id=chat_id, message_id=message_id, reply_markup=reply_markup)
|
||||
call = StopPoll(chat_id=chat_id, message_id=message_id, reply_markup=reply_markup,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def delete_message(self, chat_id: Union[int, str], message_id: int) -> bool:
|
||||
async def delete_message(self, chat_id: Union[int, str], message_id: int,) -> bool:
|
||||
"""
|
||||
Use this method to delete a message, including service messages, with the following limitations:
|
||||
- A message can only be deleted if it was sent less than 48 hours ago.
|
||||
|
|
@ -1607,7 +1608,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = DeleteMessage(chat_id=chat_id, message_id=message_id)
|
||||
call = DeleteMessage(chat_id=chat_id, message_id=message_id,)
|
||||
return await self.emit(call)
|
||||
|
||||
# =============================================================================================
|
||||
|
|
@ -1652,7 +1653,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
)
|
||||
return await self.emit(call)
|
||||
|
||||
async def get_sticker_set(self, name: str) -> StickerSet:
|
||||
async def get_sticker_set(self, name: str,) -> StickerSet:
|
||||
"""
|
||||
Use this method to get a sticker set. On success, a StickerSet object is returned.
|
||||
|
||||
|
|
@ -1663,10 +1664,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: On success, a StickerSet object is returned.
|
||||
:rtype: :obj:`StickerSet`
|
||||
"""
|
||||
call = GetStickerSet(name=name)
|
||||
call = GetStickerSet(name=name,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def upload_sticker_file(self, user_id: int, png_sticker: InputFile) -> File:
|
||||
async def upload_sticker_file(self, user_id: int, png_sticker: InputFile,) -> File:
|
||||
"""
|
||||
Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
|
||||
|
||||
|
|
@ -1679,7 +1680,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns the uploaded File on success.
|
||||
:rtype: :obj:`File`
|
||||
"""
|
||||
call = UploadStickerFile(user_id=user_id, png_sticker=png_sticker)
|
||||
call = UploadStickerFile(user_id=user_id, png_sticker=png_sticker,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def create_new_sticker_set(
|
||||
|
|
@ -1760,7 +1761,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
)
|
||||
return await self.emit(call)
|
||||
|
||||
async def set_sticker_position_in_set(self, sticker: str, position: int) -> bool:
|
||||
async def set_sticker_position_in_set(self, sticker: str, position: int,) -> bool:
|
||||
"""
|
||||
Use this method to move a sticker in a set created by the bot to a specific position . Returns True on success.
|
||||
|
||||
|
|
@ -1773,10 +1774,10 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = SetStickerPositionInSet(sticker=sticker, position=position)
|
||||
call = SetStickerPositionInSet(sticker=sticker, position=position,)
|
||||
return await self.emit(call)
|
||||
|
||||
async def delete_sticker_from_set(self, sticker: str) -> bool:
|
||||
async def delete_sticker_from_set(self, sticker: str,) -> bool:
|
||||
"""
|
||||
Use this method to delete a sticker from a set created by the bot. Returns True on success.
|
||||
|
||||
|
|
@ -1787,7 +1788,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = DeleteStickerFromSet(sticker=sticker)
|
||||
call = DeleteStickerFromSet(sticker=sticker,)
|
||||
return await self.emit(call)
|
||||
|
||||
# =============================================================================================
|
||||
|
|
@ -1983,7 +1984,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
return await self.emit(call)
|
||||
|
||||
async def answer_pre_checkout_query(
|
||||
self, pre_checkout_query_id: str, ok: bool, error_message: Optional[str] = None
|
||||
self, pre_checkout_query_id: str, ok: bool, error_message: Optional[str] = None,
|
||||
) -> bool:
|
||||
"""
|
||||
Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
|
||||
|
|
@ -2000,7 +2001,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = AnswerPreCheckoutQuery(
|
||||
pre_checkout_query_id=pre_checkout_query_id, ok=ok, error_message=error_message
|
||||
pre_checkout_query_id=pre_checkout_query_id, ok=ok, error_message=error_message,
|
||||
)
|
||||
return await self.emit(call)
|
||||
|
||||
|
|
@ -2010,7 +2011,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
# =============================================================================================
|
||||
|
||||
async def set_passport_data_errors(
|
||||
self, user_id: int, errors: List[PassportElementError]
|
||||
self, user_id: int, errors: List[PassportElementError],
|
||||
) -> bool:
|
||||
"""
|
||||
Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
|
||||
|
|
@ -2025,7 +2026,7 @@ class Bot(ContextInstanceMixin, BaseBot):
|
|||
:return: The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
|
||||
:rtype: :obj:`bool`
|
||||
"""
|
||||
call = SetPassportDataErrors(user_id=user_id, errors=errors)
|
||||
call = SetPassportDataErrors(user_id=user_id, errors=errors,)
|
||||
return await self.emit(call)
|
||||
|
||||
# =============================================================================================
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InputFile, MaskPosition
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class AddStickerToSet(TelegramMethod[bool]):
|
||||
|
|
@ -29,9 +29,11 @@ class AddStickerToSet(TelegramMethod[bool]):
|
|||
"""A JSON-serialized object for position where the mask should be placed on faces"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"png_sticker"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"png_sticker",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="png_sticker", value=self.png_sticker)
|
||||
|
||||
return Request(method="addStickerToSet", data=data, files=files)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,6 @@ class AnswerCallbackQuery(TelegramMethod[bool]):
|
|||
"""The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="answerCallbackQuery", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InlineQueryResult
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class AnswerInlineQuery(TelegramMethod[bool]):
|
||||
|
|
@ -38,6 +38,6 @@ class AnswerInlineQuery(TelegramMethod[bool]):
|
|||
Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a ‘Connect your YouTube account’ button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="answerInlineQuery", data=data)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@ class AnswerPreCheckoutQuery(TelegramMethod[bool]):
|
|||
"""Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="answerPreCheckoutQuery", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import ShippingOption
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class AnswerShippingQuery(TelegramMethod[bool]):
|
||||
|
|
@ -26,6 +26,6 @@ class AnswerShippingQuery(TelegramMethod[bool]):
|
|||
"""Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="answerShippingQuery", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InputFile, MaskPosition
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class CreateNewStickerSet(TelegramMethod[bool]):
|
||||
|
|
@ -35,9 +35,11 @@ class CreateNewStickerSet(TelegramMethod[bool]):
|
|||
"""A JSON-serialized object for position where the mask should be placed on faces"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"png_sticker"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"png_sticker",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="png_sticker", value=self.png_sticker)
|
||||
|
||||
return Request(method="createNewStickerSet", data=data, files=files)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ class DeleteChatPhoto(TelegramMethod[bool]):
|
|||
"""Unique identifier for the target chat or username of the target channel (in the format @channelusername)"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="deleteChatPhoto", data=data)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ class DeleteChatStickerSet(TelegramMethod[bool]):
|
|||
"""Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="deleteChatStickerSet", data=data)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,6 @@ class DeleteMessage(TelegramMethod[bool]):
|
|||
"""Identifier of the message to delete"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="deleteMessage", data=data)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ class DeleteStickerFromSet(TelegramMethod[bool]):
|
|||
"""File identifier of the sticker"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="deleteStickerFromSet", data=data)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ class DeleteWebhook(TelegramMethod[bool]):
|
|||
__returning__ = bool
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="deleteWebhook", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InlineKeyboardMarkup, Message
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class EditMessageCaption(TelegramMethod[Union[Message, bool]]):
|
||||
|
|
@ -32,6 +32,6 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]):
|
|||
"""A JSON-serialized object for an inline keyboard."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="editMessageCaption", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InlineKeyboardMarkup, Message
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]):
|
||||
|
|
@ -32,6 +32,6 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]):
|
|||
"""A JSON-serialized object for a new inline keyboard."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="editMessageLiveLocation", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from ..types import InlineKeyboardMarkup, InputFile, Message
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InlineKeyboardMarkup, InputMedia, Message
|
||||
|
||||
|
||||
class EditMessageMedia(TelegramMethod[Union[Message, bool]]):
|
||||
|
|
@ -13,7 +13,7 @@ class EditMessageMedia(TelegramMethod[Union[Message, bool]]):
|
|||
|
||||
__returning__ = Union[Message, bool]
|
||||
|
||||
media: InputMedia
|
||||
media: Union[str, InputFile]
|
||||
"""A JSON-serialized object for a new media content of the message"""
|
||||
|
||||
chat_id: Optional[Union[int, str]] = None
|
||||
|
|
@ -29,6 +29,11 @@ class EditMessageMedia(TelegramMethod[Union[Message, bool]]):
|
|||
"""A JSON-serialized object for a new inline keyboard."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"media",}
|
||||
)
|
||||
|
||||
return Request(method="editMessageMedia", data=data)
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="media", value=self.media)
|
||||
|
||||
return Request(method="editMessageMedia", data=data, files=files)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InlineKeyboardMarkup, Message
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class EditMessageReplyMarkup(TelegramMethod[Union[Message, bool]]):
|
||||
|
|
@ -26,6 +26,6 @@ class EditMessageReplyMarkup(TelegramMethod[Union[Message, bool]]):
|
|||
"""A JSON-serialized object for an inline keyboard."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="editMessageReplyMarkup", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InlineKeyboardMarkup, Message
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class EditMessageText(TelegramMethod[Union[Message, bool]]):
|
||||
|
|
@ -35,6 +35,6 @@ class EditMessageText(TelegramMethod[Union[Message, bool]]):
|
|||
"""A JSON-serialized object for an inline keyboard."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="editMessageText", data=data)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ class ExportChatInviteLink(TelegramMethod[str]):
|
|||
"""Unique identifier for the target chat or username of the target channel (in the format @channelusername)"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="exportChatInviteLink", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import Message
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class ForwardMessage(TelegramMethod[Message]):
|
||||
|
|
@ -26,6 +26,6 @@ class ForwardMessage(TelegramMethod[Message]):
|
|||
"""Sends the message silently. Users will receive a notification with no sound."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="forwardMessage", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import Chat
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class GetChat(TelegramMethod[Chat]):
|
||||
|
|
@ -17,6 +17,6 @@ class GetChat(TelegramMethod[Chat]):
|
|||
"""Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getChat", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, List, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import ChatMember
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class GetChatAdministrators(TelegramMethod[List[ChatMember]]):
|
||||
|
|
@ -17,6 +17,6 @@ class GetChatAdministrators(TelegramMethod[List[ChatMember]]):
|
|||
"""Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getChatAdministrators", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import ChatMember
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class GetChatMember(TelegramMethod[ChatMember]):
|
||||
|
|
@ -20,6 +20,6 @@ class GetChatMember(TelegramMethod[ChatMember]):
|
|||
"""Unique identifier of the target user"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getChatMember", data=data)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ class GetChatMembersCount(TelegramMethod[int]):
|
|||
"""Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getChatMembersCount", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import File
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class GetFile(TelegramMethod[File]):
|
||||
|
|
@ -18,6 +18,6 @@ class GetFile(TelegramMethod[File]):
|
|||
"""File identifier to get info about"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getFile", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import GameHighScore
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class GetGameHighScores(TelegramMethod[List[GameHighScore]]):
|
||||
|
|
@ -27,6 +27,6 @@ class GetGameHighScores(TelegramMethod[List[GameHighScore]]):
|
|||
"""Required if chat_id and message_id are not specified. Identifier of the inline message"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getGameHighScores", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import User
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class GetMe(TelegramMethod[User]):
|
||||
|
|
@ -14,6 +14,6 @@ class GetMe(TelegramMethod[User]):
|
|||
__returning__ = User
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getMe", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import StickerSet
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class GetStickerSet(TelegramMethod[StickerSet]):
|
||||
|
|
@ -17,6 +17,6 @@ class GetStickerSet(TelegramMethod[StickerSet]):
|
|||
"""Name of the sticker set"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getStickerSet", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import Update
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class GetUpdates(TelegramMethod[List[Update]]):
|
||||
|
|
@ -31,6 +31,6 @@ class GetUpdates(TelegramMethod[List[Update]]):
|
|||
Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getUpdates", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import UserProfilePhotos
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]):
|
||||
|
|
@ -23,6 +23,6 @@ class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]):
|
|||
"""Limits the number of photos to be retrieved. Values between 1—100 are accepted. Defaults to 100."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getUserProfilePhotos", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import WebhookInfo
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class GetWebhookInfo(TelegramMethod[WebhookInfo]):
|
||||
|
|
@ -14,6 +14,6 @@ class GetWebhookInfo(TelegramMethod[WebhookInfo]):
|
|||
__returning__ = WebhookInfo
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="getWebhookInfo", data=data)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import datetime
|
||||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
|
|
@ -18,10 +19,10 @@ class KickChatMember(TelegramMethod[bool]):
|
|||
user_id: int
|
||||
"""Unique identifier of the target user"""
|
||||
|
||||
until_date: Optional[int] = None
|
||||
until_date: Optional[Union[int, datetime.datetime, datetime.timedelta]] = None
|
||||
"""Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="kickChatMember", data=data)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ class LeaveChat(TelegramMethod[bool]):
|
|||
"""Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="leaveChat", data=data)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@ class PinChatMessage(TelegramMethod[bool]):
|
|||
"""Pass True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="pinChatMessage", data=data)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,6 @@ class PromoteChatMember(TelegramMethod[bool]):
|
|||
"""Pass True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="promoteChatMember", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import datetime
|
||||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import ChatPermissions
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class RestrictChatMember(TelegramMethod[bool]):
|
||||
|
|
@ -22,10 +23,10 @@ class RestrictChatMember(TelegramMethod[bool]):
|
|||
permissions: ChatPermissions
|
||||
"""New user permissions"""
|
||||
|
||||
until_date: Optional[int] = None
|
||||
until_date: Optional[Union[int, datetime.datetime, datetime.timedelta]] = None
|
||||
"""Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="restrictChatMember", data=data)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -9,6 +8,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendAnimation(TelegramMethod[Message]):
|
||||
|
|
@ -56,9 +56,11 @@ class SendAnimation(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"animation", "thumb"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"animation", "thumb",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="animation", value=self.animation)
|
||||
self.prepare_file(data=data, files=files, name="thumb", value=self.thumb)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -9,6 +8,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendAudio(TelegramMethod[Message]):
|
||||
|
|
@ -57,9 +57,11 @@ class SendAudio(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"audio", "thumb"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"audio", "thumb",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="audio", value=self.audio)
|
||||
self.prepare_file(data=data, files=files, name="thumb", value=self.thumb)
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@ class SendChatAction(TelegramMethod[bool]):
|
|||
"""Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for location data, record_video_note or upload_video_note for video notes."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="sendChatAction", data=data)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -8,6 +7,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendContact(TelegramMethod[Message]):
|
||||
|
|
@ -46,6 +46,6 @@ class SendContact(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="sendContact", data=data)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -9,6 +8,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendDocument(TelegramMethod[Message]):
|
||||
|
|
@ -47,9 +47,11 @@ class SendDocument(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"document", "thumb"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"document", "thumb",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="document", value=self.document)
|
||||
self.prepare_file(data=data, files=files, name="thumb", value=self.thumb)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InlineKeyboardMarkup, Message
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendGame(TelegramMethod[Message]):
|
||||
|
|
@ -29,6 +29,6 @@ class SendGame(TelegramMethod[Message]):
|
|||
"""A JSON-serialized object for an inline keyboard. If empty, one ‘Play game_title’ button will be shown. If not empty, the first button must launch the game."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="sendGame", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InlineKeyboardMarkup, LabeledPrice, Message
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendInvoice(TelegramMethod[Message]):
|
||||
|
|
@ -83,6 +83,6 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
"""A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="sendInvoice", data=data)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -8,6 +7,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendLocation(TelegramMethod[Message]):
|
||||
|
|
@ -43,6 +43,6 @@ class SendLocation(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="sendLocation", data=data)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -8,6 +7,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendMessage(TelegramMethod[Message]):
|
||||
|
|
@ -43,6 +43,6 @@ class SendMessage(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="sendMessage", data=data)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -9,6 +8,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendPhoto(TelegramMethod[Message]):
|
||||
|
|
@ -44,9 +44,11 @@ class SendPhoto(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"photo"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"photo",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="photo", value=self.photo)
|
||||
|
||||
return Request(method="sendPhoto", data=data, files=files)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -8,6 +7,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendPoll(TelegramMethod[Message]):
|
||||
|
|
@ -40,6 +40,6 @@ class SendPoll(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="sendPoll", data=data)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -9,6 +8,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendSticker(TelegramMethod[Message]):
|
||||
|
|
@ -38,9 +38,11 @@ class SendSticker(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"sticker"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"sticker",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="sticker", value=self.sticker)
|
||||
|
||||
return Request(method="sendSticker", data=data, files=files)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -8,6 +7,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendVenue(TelegramMethod[Message]):
|
||||
|
|
@ -52,6 +52,6 @@ class SendVenue(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="sendVenue", data=data)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -9,6 +8,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendVideo(TelegramMethod[Message]):
|
||||
|
|
@ -59,9 +59,11 @@ class SendVideo(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"video", "thumb"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"video", "thumb",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="video", value=self.video)
|
||||
self.prepare_file(data=data, files=files, name="thumb", value=self.thumb)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -9,6 +8,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendVideoNote(TelegramMethod[Message]):
|
||||
|
|
@ -47,9 +47,11 @@ class SendVideoNote(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"video_note", "thumb"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"video_note", "thumb",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="video_note", value=self.video_note)
|
||||
self.prepare_file(data=data, files=files, name="thumb", value=self.thumb)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
|
|
@ -9,6 +8,7 @@ from ..types import (
|
|||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SendVoice(TelegramMethod[Message]):
|
||||
|
|
@ -47,9 +47,11 @@ class SendVoice(TelegramMethod[Message]):
|
|||
"""Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"voice"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"voice",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="voice", value=self.voice)
|
||||
|
||||
return Request(method="sendVoice", data=data, files=files)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ class SetChatDescription(TelegramMethod[bool]):
|
|||
"""New chat description, 0-255 characters"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="setChatDescription", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import ChatPermissions
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SetChatPermissions(TelegramMethod[bool]):
|
||||
|
|
@ -20,6 +20,6 @@ class SetChatPermissions(TelegramMethod[bool]):
|
|||
"""New default chat permissions"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="setChatPermissions", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InputFile
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SetChatPhoto(TelegramMethod[bool]):
|
||||
|
|
@ -20,9 +20,11 @@ class SetChatPhoto(TelegramMethod[bool]):
|
|||
"""New chat photo, uploaded using multipart/form-data"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"photo"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"photo",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="photo", value=self.photo)
|
||||
|
||||
return Request(method="setChatPhoto", data=data, files=files)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ class SetChatStickerSet(TelegramMethod[bool]):
|
|||
"""Name of the sticker set to be set as the group sticker set"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="setChatStickerSet", data=data)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ class SetChatTitle(TelegramMethod[bool]):
|
|||
"""New chat title, 1-255 characters"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="setChatTitle", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import Message
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SetGameScore(TelegramMethod[Union[Message, bool]]):
|
||||
|
|
@ -35,6 +35,6 @@ class SetGameScore(TelegramMethod[Union[Message, bool]]):
|
|||
"""Required if chat_id and message_id are not specified. Identifier of the inline message"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="setGameScore", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, List
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import PassportElementError
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SetPassportDataErrors(TelegramMethod[bool]):
|
||||
|
|
@ -21,6 +21,6 @@ class SetPassportDataErrors(TelegramMethod[bool]):
|
|||
"""A JSON-serialized array describing the errors"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="setPassportDataErrors", data=data)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ class SetStickerPositionInSet(TelegramMethod[bool]):
|
|||
"""New sticker position in the set, zero-based"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="setStickerPositionInSet", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InputFile
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class SetWebhook(TelegramMethod[bool]):
|
||||
|
|
@ -34,9 +34,11 @@ class SetWebhook(TelegramMethod[bool]):
|
|||
Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"certificate"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"certificate",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="certificate", value=self.certificate)
|
||||
|
||||
return Request(method="setWebhook", data=data, files=files)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InlineKeyboardMarkup, Message
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class StopMessageLiveLocation(TelegramMethod[Union[Message, bool]]):
|
||||
|
|
@ -26,6 +26,6 @@ class StopMessageLiveLocation(TelegramMethod[Union[Message, bool]]):
|
|||
"""A JSON-serialized object for a new inline keyboard."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="stopMessageLiveLocation", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import InlineKeyboardMarkup, Poll
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class StopPoll(TelegramMethod[Poll]):
|
||||
|
|
@ -23,6 +23,6 @@ class StopPoll(TelegramMethod[Poll]):
|
|||
"""A JSON-serialized object for a new message inline keyboard."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="stopPoll", data=data)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ class UnbanChatMember(TelegramMethod[bool]):
|
|||
"""Unique identifier of the target user"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="unbanChatMember", data=data)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ class UnpinChatMessage(TelegramMethod[bool]):
|
|||
"""Unique identifier for the target chat or username of the target channel (in the format @channelusername)"""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={})
|
||||
data: Dict[str, Any] = self.dict()
|
||||
|
||||
return Request(method="unpinChatMessage", data=data)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Dict
|
||||
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import File, InputFile
|
||||
from .base import Request, TelegramMethod
|
||||
|
||||
|
||||
class UploadStickerFile(TelegramMethod[File]):
|
||||
|
|
@ -20,9 +20,11 @@ class UploadStickerFile(TelegramMethod[File]):
|
|||
"""Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px."""
|
||||
|
||||
def build_request(self) -> Request:
|
||||
data: Dict[str, Any] = self.dict(exclude_unset=True, exclude={"png_sticker"})
|
||||
data: Dict[str, Any] = self.dict(
|
||||
exclude={"png_sticker",}
|
||||
)
|
||||
|
||||
files: Dict[str, Any] = {}
|
||||
files: Dict[str, InputFile] = {}
|
||||
self.prepare_file(data=data, files=files, name="png_sticker", value=self.png_sticker)
|
||||
|
||||
return Request(method="uploadStickerFile", data=data, files=files)
|
||||
|
|
|
|||
|
|
@ -23,11 +23,9 @@ from .inline_query_result import InlineQueryResult
|
|||
from .inline_query_result_article import InlineQueryResultArticle
|
||||
from .inline_query_result_audio import InlineQueryResultAudio
|
||||
from .inline_query_result_cached_audio import InlineQueryResultCachedAudio
|
||||
from .inline_query_result_cached_document import \
|
||||
InlineQueryResultCachedDocument
|
||||
from .inline_query_result_cached_document import InlineQueryResultCachedDocument
|
||||
from .inline_query_result_cached_gif import InlineQueryResultCachedGif
|
||||
from .inline_query_result_cached_mpeg4_gif import \
|
||||
InlineQueryResultCachedMpeg4Gif
|
||||
from .inline_query_result_cached_mpeg4_gif import InlineQueryResultCachedMpeg4Gif
|
||||
from .inline_query_result_cached_photo import InlineQueryResultCachedPhoto
|
||||
from .inline_query_result_cached_sticker import InlineQueryResultCachedSticker
|
||||
from .inline_query_result_cached_video import InlineQueryResultCachedVideo
|
||||
|
|
@ -43,7 +41,7 @@ from .inline_query_result_venue import InlineQueryResultVenue
|
|||
from .inline_query_result_video import InlineQueryResultVideo
|
||||
from .inline_query_result_voice import InlineQueryResultVoice
|
||||
from .input_contact_message_content import InputContactMessageContent
|
||||
from .input_file import InputFile
|
||||
from .input_file import BufferedInputFile, FSInputFile, InputFile
|
||||
from .input_location_message_content import InputLocationMessageContent
|
||||
from .input_media import InputMedia
|
||||
from .input_media_animation import InputMediaAnimation
|
||||
|
|
@ -69,13 +67,10 @@ from .passport_element_error_data_field import PassportElementErrorDataField
|
|||
from .passport_element_error_file import PassportElementErrorFile
|
||||
from .passport_element_error_files import PassportElementErrorFiles
|
||||
from .passport_element_error_front_side import PassportElementErrorFrontSide
|
||||
from .passport_element_error_reverse_side import \
|
||||
PassportElementErrorReverseSide
|
||||
from .passport_element_error_reverse_side import PassportElementErrorReverseSide
|
||||
from .passport_element_error_selfie import PassportElementErrorSelfie
|
||||
from .passport_element_error_translation_file import \
|
||||
PassportElementErrorTranslationFile
|
||||
from .passport_element_error_translation_files import \
|
||||
PassportElementErrorTranslationFiles
|
||||
from .passport_element_error_translation_file import PassportElementErrorTranslationFile
|
||||
from .passport_element_error_translation_files import PassportElementErrorTranslationFiles
|
||||
from .passport_element_error_unspecified import PassportElementErrorUnspecified
|
||||
from .passport_file import PassportFile
|
||||
from .photo_size import PhotoSize
|
||||
|
|
@ -102,7 +97,8 @@ from .webhook_info import WebhookInfo
|
|||
|
||||
__all__ = (
|
||||
"TelegramObject",
|
||||
"InputFile",
|
||||
"BufferedInputFile",
|
||||
"FSInputFile",
|
||||
"Update",
|
||||
"WebhookInfo",
|
||||
"User",
|
||||
|
|
@ -141,6 +137,7 @@ __all__ = (
|
|||
"InputMediaAnimation",
|
||||
"InputMediaAudio",
|
||||
"InputMediaDocument",
|
||||
"InputFile",
|
||||
"Sticker",
|
||||
"StickerSet",
|
||||
"MaskPosition",
|
||||
|
|
@ -200,5 +197,11 @@ __all__ = (
|
|||
)
|
||||
|
||||
# Load typing forward refs for every TelegramObject
|
||||
for entity in __all__[2:]:
|
||||
globals()[entity].update_forward_refs(**globals())
|
||||
for _entity_name in __all__:
|
||||
_entity = globals()[_entity_name]
|
||||
if not hasattr(_entity, "update_forward_refs"):
|
||||
continue
|
||||
_entity.update_forward_refs(**globals())
|
||||
|
||||
del _entity
|
||||
del _entity_name
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from pydantic import Field
|
|||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .message import Message
|
||||
from .user import User
|
||||
from .message import Message
|
||||
|
||||
|
||||
class CallbackQuery(TelegramObject):
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ from typing import TYPE_CHECKING, Optional
|
|||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .chat_permissions import ChatPermissions
|
||||
from .message import Message
|
||||
from .chat_photo import ChatPhoto
|
||||
from .chat_permissions import ChatPermissions
|
||||
|
||||
|
||||
class Chat(TelegramObject):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING, Optional, Union
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
|
|
@ -19,7 +20,7 @@ class ChatMember(TelegramObject):
|
|||
"""Information about the user"""
|
||||
status: str
|
||||
"""The member's status in the chat. Can be 'creator', 'administrator', 'member', 'restricted', 'left' or 'kicked'"""
|
||||
until_date: Optional[int] = None
|
||||
until_date: Optional[Union[int, datetime.datetime, datetime.timedelta]] = None
|
||||
"""Restricted and kicked only. Date when restrictions will be lifted for this user; unix time"""
|
||||
can_be_edited: Optional[bool] = None
|
||||
"""Administrators only. True, if the bot is allowed to edit administrator privileges of that user"""
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from pydantic import Field
|
|||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .location import Location
|
||||
from .user import User
|
||||
from .location import Location
|
||||
|
||||
|
||||
class ChosenInlineResult(TelegramObject):
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ from .base import TelegramObject
|
|||
|
||||
if TYPE_CHECKING:
|
||||
from .photo_size import PhotoSize
|
||||
from .animation import Animation
|
||||
from .message_entity import MessageEntity
|
||||
from .animation import Animation
|
||||
|
||||
|
||||
class Game(TelegramObject):
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ from typing import TYPE_CHECKING, Optional
|
|||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .callback_game import CallbackGame
|
||||
from .login_url import LoginUrl
|
||||
from .callback_game import CallbackGame
|
||||
|
||||
|
||||
class InlineKeyboardButton(TelegramObject):
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from pydantic import Field
|
|||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .location import Location
|
||||
from .user import User
|
||||
from .location import Location
|
||||
|
||||
|
||||
class InlineQuery(TelegramObject):
|
||||
|
|
|
|||
|
|
@ -8,26 +8,26 @@ from pydantic import Field
|
|||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .contact import Contact
|
||||
from .audio import Audio
|
||||
from .inline_keyboard_markup import InlineKeyboardMarkup
|
||||
from .game import Game
|
||||
from .passport_data import PassportData
|
||||
from .voice import Voice
|
||||
from .contact import Contact
|
||||
from .game import Game
|
||||
from .venue import Venue
|
||||
from .location import Location
|
||||
from .animation import Animation
|
||||
from .user import User
|
||||
from .video import Video
|
||||
from .message_entity import MessageEntity
|
||||
from .sticker import Sticker
|
||||
from .document import Document
|
||||
from .audio import Audio
|
||||
from .invoice import Invoice
|
||||
from .video_note import VideoNote
|
||||
from .chat import Chat
|
||||
from .successful_payment import SuccessfulPayment
|
||||
from .location import Location
|
||||
from .photo_size import PhotoSize
|
||||
from .chat import Chat
|
||||
from .sticker import Sticker
|
||||
from .animation import Animation
|
||||
from .poll import Poll
|
||||
from .inline_keyboard_markup import InlineKeyboardMarkup
|
||||
from .user import User
|
||||
from .message_entity import MessageEntity
|
||||
from .successful_payment import SuccessfulPayment
|
||||
from .passport_data import PassportData
|
||||
from .video import Video
|
||||
from .video_note import VideoNote
|
||||
|
||||
|
||||
class Message(TelegramObject):
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ from typing import TYPE_CHECKING, List
|
|||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .encrypted_credentials import EncryptedCredentials
|
||||
from .encrypted_passport_element import EncryptedPassportElement
|
||||
from .encrypted_credentials import EncryptedCredentials
|
||||
|
||||
|
||||
class PassportData(TelegramObject):
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from pydantic import Field
|
|||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .order_info import OrderInfo
|
||||
from .user import User
|
||||
from .order_info import OrderInfo
|
||||
|
||||
|
||||
class PreCheckoutQuery(TelegramObject):
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ from typing import TYPE_CHECKING, Optional
|
|||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .callback_query import CallbackQuery
|
||||
from .inline_query import InlineQuery
|
||||
from .shipping_query import ShippingQuery
|
||||
from .pre_checkout_query import PreCheckoutQuery
|
||||
from .message import Message
|
||||
from .inline_query import InlineQuery
|
||||
from .chosen_inline_result import ChosenInlineResult
|
||||
from .callback_query import CallbackQuery
|
||||
from .message import Message
|
||||
from .poll import Poll
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue