This repository has been archived on 2024-07-28. You can view files and clone it, but cannot push or open issues or pull requests.
moderator-bot/load.py

26 lines
535 B
Python

from aiogram import Bot, Dispatcher
from aiogram import types
from aiogram.bot.api import TelegramAPIServer
from aiogram.contrib.fsm_storage.memory import MemoryStorage
import config
import utils
from database.database import Database
database = Database()
storage = MemoryStorage()
# Create client connection
tgc = utils.TelegramClient(config.api_id, config.api_hash, config.token)
bot = Bot(
token=config.token,
server=TelegramAPIServer.from_base(config.telegram_api_server),
)
dp = Dispatcher(bot, storage=storage)