Created
December 27, 2020 11:12
-
-
Save vsecoder-old-account/bba53963fd9e7964f4d665d76c39b2c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# импорт модулей библиотеки aiogram | |
from aiogram import Bot, types | |
from aiogram.dispatcher import Dispatcher | |
from aiogram.utils import executor | |
# token бота | |
bot_token = '<token>' | |
# Создание бота | |
bot = Bot(token=bot_token) | |
dp = Dispatcher(bot) | |
# Обработчик команды /start | |
@dp.message_handler(commands=['start']) | |
async def welcome(message: types.Message): | |
await bot.send_message(message.chat.id, 'Здравствуйте!') | |
# запуск бота | |
if __name__ == "__main__": | |
executor.start_polling(dp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment