2022-10-29 14:04:56 +10:00
|
|
|
import time
|
2022-10-18 19:17:36 +10:00
|
|
|
import logging
|
2022-10-29 14:04:56 +10:00
|
|
|
|
2022-10-18 19:17:36 +10:00
|
|
|
from aiogram import Bot, Dispatcher, executor, types
|
2022-10-18 20:22:30 +10:00
|
|
|
from aiogram.types import ReplyKeyboardRemove, ReplyKeyboardMarkup, KeyboardButton
|
2022-10-18 19:17:36 +10:00
|
|
|
API_TOKEN = '5724991559:AAEuLvpLsgP6LHRGMSyFtQLlR5qPQUO4b_w'
|
|
|
|
|
|
|
|
logging.basicConfig(level=logging.DEBUG)
|
|
|
|
|
|
|
|
bot = Bot(token=API_TOKEN)
|
|
|
|
dp = Dispatcher(bot)
|
2022-10-29 14:04:56 +10:00
|
|
|
|
|
|
|
@dp.message_handler(commands=['start'])
|
2022-10-29 14:26:58 +10:00
|
|
|
async def start_func(message: types.Message):
|
2022-10-29 14:04:56 +10:00
|
|
|
user_id = message.from_user.id
|
|
|
|
user_full_name = message.from_user.full_name
|
|
|
|
logging.INFO(f'{user_id=} {user_full_name=}', {time.asctime()})
|
|
|
|
|
2022-10-29 14:26:58 +10:00
|
|
|
await bot.send_photo(types.input_file('PYTHON_BOT/ya-pidoras.jpg'))
|
2022-10-29 14:24:55 +10:00
|
|
|
#функция вызова пикчи
|
2022-10-18 19:17:36 +10:00
|
|
|
if __name__ == '__main__':
|
|
|
|
executor.start_polling(dp, skip_updates=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|