diff options
Diffstat (limited to 'handlers')
| -rw-r--r-- | handlers/msg.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/handlers/msg.py b/handlers/msg.py new file mode 100644 index 0000000..a57885b --- /dev/null +++ b/handlers/msg.py | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | from aiogram import types as t | ||
| 2 | |||
| 3 | from shared.instances import dp | ||
| 4 | from utils import filters as f | ||
| 5 | |||
| 6 | |||
| 7 | async def сосалка(msg: t.Message): | ||
| 8 | text = msg.text or msg.caption | ||
| 9 | if text.startswith("/"): | ||
| 10 | return False | ||
| 11 | with open(f"data/{msg.chat.id}", "a+") as file: | ||
| 12 | file.write(text.replace("§", "") + "§") | ||
| 13 | return False | ||
| 14 | |||
| 15 | |||
| 16 | @dp.message_handler(f.message.has_text, сосалка, content_types=[t.ContentType.ANY]) | ||
| 17 | async def ХУЙ(): | ||
| 18 | pass | ||
