aboutsummaryrefslogtreecommitdiff
path: root/handlers/msg.py
diff options
context:
space:
mode:
authorIgor Tolmachov <me@igorek.dev>2022-04-20 02:00:20 +0900
committerIgor Tolmachov <me@igorek.dev>2022-04-20 02:00:20 +0900
commit6ef5acdce17b95ed5166a32aa479eae0cb7f8cad (patch)
treec3baca11b8eb0f8ff62e9125f448fe13e71c7ec3 /handlers/msg.py
parente2ec80ca3d1cb6c7329c21d4934245e26ec9e74a (diff)
downloadkarpov_ai_bot-6ef5acdce17b95ed5166a32aa479eae0cb7f8cad.tar.gz
karpov_ai_bot-6ef5acdce17b95ed5166a32aa479eae0cb7f8cad.zip
Рефакторинг
Добавлена система заявок в группу
Diffstat (limited to 'handlers/msg.py')
-rw-r--r--handlers/msg.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/handlers/msg.py b/handlers/msg.py
index 58f3213..12dfa6c 100644
--- a/handlers/msg.py
+++ b/handlers/msg.py
@@ -1,17 +1,20 @@
1from shared.instances import dp
2from aiogram import types as t 1from aiogram import types as t
2
3from shared.instances import dp
3from utils import filters as f 4from utils import filters as f
4 5
5 6
6async def сосалка(msg: t.Message): 7async def сосалка(msg: t.Message):
7 text = msg.text or msg.caption 8 text = msg.text or msg.caption
8 if text.startswith('/'): 9 if text.startswith("/"):
9 return False 10 return False
10 with open('samples.txt', 'a+') as file: 11 with open("samples.txt", "a+") as file:
11 file.write(text.lower().replace('§', '') + '§') 12 file.write(text.lower().replace("§", "") + "§")
12 return False 13 return False
13 14
14 15
15@dp.message_handler(f.message.is_chat, f.message.has_text, сосалка, content_types=[t.ContentType.ANY]) 16@dp.message_handler(
17 f.message.is_chat, f.message.has_text, сосалка, content_types=[t.ContentType.ANY]
18)
16async def ХУЙ(): 19async def ХУЙ():
17 pass 20 pass