mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 01:15:31 +00:00
Refactoring. AIOGramBot -> Bot and allow to use 'from aiogram import Bot'
This commit is contained in:
parent
16cda7af67
commit
92b3e027db
6 changed files with 23 additions and 15 deletions
|
|
@ -1,9 +1,13 @@
|
|||
"""
|
||||
Babel is required.
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
from aiogram.bot import AIOGramBot
|
||||
from aiogram import Bot
|
||||
from aiogram.dispatcher import Dispatcher
|
||||
from aiogram.types.message import ParseMode
|
||||
from aiogram.types import ParseMode
|
||||
from aiogram.utils.markdown import *
|
||||
|
||||
API_TOKEN = 'BOT TOKEN HERE'
|
||||
|
|
@ -11,7 +15,7 @@ API_TOKEN = 'BOT TOKEN HERE'
|
|||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
bot = AIOGramBot(token=API_TOKEN, loop=loop)
|
||||
bot = Bot(token=API_TOKEN, loop=loop)
|
||||
dp = Dispatcher(bot)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import asyncio
|
||||
import logging
|
||||
|
||||
from aiogram.bot import AIOGramBot
|
||||
from aiogram import Bot
|
||||
from aiogram.dispatcher import Dispatcher
|
||||
|
||||
API_TOKEN = 'BOT TOKEN HERE'
|
||||
|
|
@ -9,7 +9,7 @@ API_TOKEN = 'BOT TOKEN HERE'
|
|||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
bot = AIOGramBot(token=API_TOKEN, loop=loop)
|
||||
bot = Bot(token=API_TOKEN, loop=loop)
|
||||
dp = Dispatcher(bot)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue