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

24 lines
563 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
from apscheduler.schedulers.asyncio import AsyncIOScheduler
import config
import utils
storage = MemoryStorage()
# Create client connection
tgc = utils.TelegramClient(config.api_id, config.api_hash, config.token)
scheduler = AsyncIOScheduler()
bot = Bot(
token=config.token,
server=TelegramAPIServer.from_base(config.telegram_api_server),
)
dp = Dispatcher(bot, storage=storage)