добавлен блок chats из документации и start_polling к Dispatcher

This commit is contained in:
2025-06-18 17:00:03 +03:00
parent ff19f99704
commit 9a39dce1a6
45 changed files with 1262 additions and 150 deletions

View File

@@ -0,0 +1,29 @@
from typing import TYPE_CHECKING
from ..methods.types.deleted_pin_message import DeletedPinMessage
from ..enums.http_method import HTTPMethod
from ..enums.api_path import ApiPath
from ..connection.base import BaseConnection
if TYPE_CHECKING:
from ..bot import Bot
class DeletePinMessage(BaseConnection):
def __init__(
self,
bot: 'Bot',
chat_id: str,
):
self.bot = bot
self.chat_id = chat_id
async def request(self) -> DeletedPinMessage:
return await super().request(
method=HTTPMethod.DELETE,
path=ApiPath.CHATS + '/' + str(self.chat_id) + ApiPath.PIN,
model=DeletedPinMessage,
params=self.bot.params,
)