commit d07d241fdac4536832314916c124c29a36fac6f9 Author: Alexander Date: Wed Feb 14 18:52:22 2024 +0100 first commit diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..dd7c2f8 --- /dev/null +++ b/.env.sample @@ -0,0 +1 @@ +TELEGRAM_TOKEN= diff --git a/fuckup_bot.py b/fuckup_bot.py new file mode 100644 index 0000000..eb2bbb0 --- /dev/null +++ b/fuckup_bot.py @@ -0,0 +1,27 @@ +import aiogram +from aiogram import Bot, Dispatcher, types +from aiogram.contrib.fsm_storage.memory import MemoryStorage +import os +from dotenv import load_dotenv + +load_dotenv() +TELEGRAM_TOKEN = os.getenv('TELEGRAM_TOKEN') + +ERROR_MESSAGE = "У нас возникли технические неполадки.\nПопробуйте повторить попытку через 15 минут!" + +bot = Bot(token=TELEGRAM_TOKEN) +dp = Dispatcher(bot, storage=MemoryStorage()) + + +@dp.message_handler() +async def echo(message: types.Message): + await message.answer(ERROR_MESSAGE) + + +@dp.callback_query_handler() +async def process_callback(callback: types.CallbackQuery): + await bot.answer_callback_query(callback.id, text=ERROR_MESSAGE) + +if __name__ == '__main__': + print('Butt plug activated') + aiogram.executor.start_polling(dp) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8b8156b --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +aiogram==2.24