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)