python_bot/bot.py
Pavel_Duron de1883d17f
All checks were successful
continuous-integration/drone/push Build is passing
косяк в коде поправил
2022-10-29 14:12:41 +10:00

27 lines
713 B
Python

import time
import logging
from aiogram import Bot, Dispatcher, executor, types
from aiogram.types import ReplyKeyboardRemove, ReplyKeyboardMarkup, KeyboardButton
API_TOKEN = '5724991559:AAEuLvpLsgP6LHRGMSyFtQLlR5qPQUO4b_w'
logging.basicConfig(level=logging.DEBUG)
bot = Bot(token=API_TOKEN)
dp = Dispatcher(bot)
@dp.message_handler(commands=['start'])
async def start_func(message: types.Message)
user_id = message.from_user.id
user_full_name = message.from_user.full_name
logging.INFO(f'{user_id=} {user_full_name=}', {time.asctime()})
await bot.send_photo(types.input_file('PYTHON_BOT/ya-pidoras.jpg'))
if __name__ == '__main__':
executor.start_polling(dp, skip_updates=True)