добавлен блок chats из документации и start_polling к Dispatcher
This commit is contained in:
29
maxapi/methods/delete_pin_message.py
Normal file
29
maxapi/methods/delete_pin_message.py
Normal 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,
|
||||
)
|
||||
Reference in New Issue
Block a user