Skip to content

Instantly share code, notes, and snippets.

@vsecoder-old-account
Created December 27, 2020 11:12
Show Gist options
  • Save vsecoder-old-account/bba53963fd9e7964f4d665d76c39b2c3 to your computer and use it in GitHub Desktop.
Save vsecoder-old-account/bba53963fd9e7964f4d665d76c39b2c3 to your computer and use it in GitHub Desktop.
# -*- 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