.
Size: a a a
.
АГ
T
АГ
d
ᅠ
d
from aiogram import Bot, Dispatcher
from aiogram.utils import exceptions, executor
class Telegram:
def __init__(self, token, chat_msg_id, chat_error_id):
self.bot = Bot(token=token)
self.dp = Dispatcher(self.bot)
self.chat_msg = chat_msg_id
self.chat_error = chat_error_id
async def send_msg(self, msg: str, chat_id):
await self.bot.send_message(chat_id, msg)
def send_complete_message(self, msg: str):
executor.start(self.dp, self.send_msg(msg, self.chat_msg))
def send_error_message(self, msg: str):
executor.start(self.dp, self.send_msg(msg, self.chat_error))
ᅠ
from aiogram import Bot, Dispatcher
from aiogram.utils import exceptions, executor
class Telegram:
def __init__(self, token, chat_msg_id, chat_error_id):
self.bot = Bot(token=token)
self.dp = Dispatcher(self.bot)
self.chat_msg = chat_msg_id
self.chat_error = chat_error_id
async def send_msg(self, msg: str, chat_id):
await self.bot.send_message(chat_id, msg)
def send_complete_message(self, msg: str):
executor.start(self.dp, self.send_msg(msg, self.chat_msg))
def send_error_message(self, msg: str):
executor.start(self.dp, self.send_msg(msg, self.chat_error))
d
d
d
T
T
d
d
ᅠ
d
T
d
T