You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
833 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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)