aboutsummaryrefslogtreecommitdiff
path: root/handlers/gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'handlers/gen.py')
-rw-r--r--handlers/gen.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/handlers/gen.py b/handlers/gen.py
index d324049..43301c5 100644
--- a/handlers/gen.py
+++ b/handlers/gen.py
@@ -3,7 +3,7 @@ import os
3import mc 3import mc
4from aiogram import types as t 4from aiogram import types as t
5 5
6from shared import instances as ins 6from shared import config
7from shared.instances import bot, dp 7from shared.instances import bot, dp
8from utils import filters as f 8from utils import filters as f
9 9
@@ -43,7 +43,8 @@ async def изменить_шанс_срания(msg: t.Message):
43 try: 43 try:
44 chance = int(msg.get_args().split()[0]) 44 chance = int(msg.get_args().split()[0])
45 if 0 <= chance <= 100: 45 if 0 <= chance <= 100:
46 ins.gen_chance[msg.chat.id] = chance 46 config.chances[msg.chat.id] = chance
47 config.save()
47 else: 48 else:
48 raise RuntimeError() 49 raise RuntimeError()
49 50
@@ -53,7 +54,7 @@ async def изменить_шанс_срания(msg: t.Message):
53 "Я хз что не так, но я знаю что ты дебил \n /chance <ЧИСЛО ОТ 0 ДО 100>" 54 "Я хз что не так, но я знаю что ты дебил \n /chance <ЧИСЛО ОТ 0 ДО 100>"
54 ) 55 )
55 else: 56 else:
56 await msg.answer(f"Я сру с шансом в: {ins.gen_chance.get(msg.chat.id, 10)}%") 57 await msg.answer(f"Я сру с шансом в: {config.chances.get(msg.chat.id, 10)}%")
57 58
58 59
59@dp.message_handler(f.message.chance, content_types=[t.ContentType.ANY]) 60@dp.message_handler(f.message.chance, content_types=[t.ContentType.ANY])