first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
TELEGRAM_TOKEN=
|
||||
@@ -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)
|
||||
@@ -0,0 +1 @@
|
||||
aiogram==2.24
|
||||
Reference in New Issue
Block a user