| Total Complexity | 1 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 2 | |||
| 3 | |||
| 4 | from utils.misc.throttling import rate_limit |
||
| 5 | from aiogram import types |
||
| 6 | from loader import dp |
||
| 7 | import asyncio |
||
| 8 | |||
| 9 | |||
| 10 | """ |
||
| 11 | |||
| 12 | Created on 15.09.2021 |
||
| 13 | |||
| 14 | @author: Nikita |
||
| 15 | |||
| 16 | |||
| 17 | """ |
||
| 18 | |||
| 19 | |||
| 20 | @rate_limit(5, 'document') |
||
| 21 | @dp.message_handler(content_types=types.ContentTypes.DOCUMENT) |
||
| 22 | async def bot_start(message: types.Message): |
||
| 23 | |||
| 24 | await types.ChatActions.typing() |
||
| 25 | |||
| 26 | doc = message.document |
||
| 27 | filename = doc.file_name |
||
| 28 | |||
| 29 | await message.answer(text=filename[::-1]) |
||
| 30 | |||
| 31 | await asyncio.sleep(1) |
||
| 32 | |||
| 33 | await message.answer_sticker( |
||
| 34 | sticker='CAACAgIAAxkBAAIEnWFCAzRDD0iWcjsKtAYZ1GY417JlAAKbDQAComVgStTV03Zsw0QpIAQ') |
||
| 35 |