мак с група

This commit is contained in:
huker667 committed 2026-09-16 01:16:39 +03:00
1 parent b73f17c762
commit bbe3ee1670
2 files changed
+7 -6

No files matched your search

+3 -2
View File
@@ -1046,10 +1046,11 @@ async def group_set_callback(callback: CallbackQuery):
elif key in ["lurk_chance", "lurk_reply_chance"]: elif key in ["lurk_chance", "lurk_reply_chance"]:
g_config = get_group_config(group_id) g_config = get_group_config(group_id)
new_val = g_config[key] + int(val) new_val = g_config[key] + int(val)
max_val = 30 if key == "lurk_chance" else 10
if new_val < 0: if new_val < 0:
new_val = 0 new_val = 0
if new_val > 100: if new_val > max_val:
new_val = 100 new_val = max_val
set_group_setting(group_id, **{key: new_val}) set_group_setting(group_id, **{key: new_val})
await group_settings_handler(callback, dataalo=f"group%{group_id}") await group_settings_handler(callback, dataalo=f"group%{group_id}")
+4 -4
View File
@@ -629,7 +629,7 @@ async def group_settings_handler(event: Union[Message, CallbackQuery], dataalo="
), ),
InlineKeyboardButton( InlineKeyboardButton(
text="−", text="−",
callback_data=f"gset%{group_id}%{user_id}%lurk_chance%-2" callback_data=f"gset%{group_id}%{user_id}%lurk_chance%-5"
), ),
InlineKeyboardButton( InlineKeyboardButton(
text=f"глядит {g_config['lurk_chance']}%", text=f"глядит {g_config['lurk_chance']}%",
@@ -637,13 +637,13 @@ async def group_settings_handler(event: Union[Message, CallbackQuery], dataalo="
), ),
InlineKeyboardButton( InlineKeyboardButton(
text="+", text="+",
callback_data=f"gset%{group_id}%{user_id}%lurk_chance%+2" callback_data=f"gset%{group_id}%{user_id}%lurk_chance%+5"
), ),
], ],
[ [
InlineKeyboardButton( InlineKeyboardButton(
text="−", text="−",
callback_data=f"gset%{group_id}%{user_id}%lurk_reply_chance%-1" callback_data=f"gset%{group_id}%{user_id}%lurk_reply_chance%-2"
), ),
InlineKeyboardButton( InlineKeyboardButton(
text=f"пишет {g_config['lurk_reply_chance']}%", text=f"пишет {g_config['lurk_reply_chance']}%",
@@ -651,7 +651,7 @@ async def group_settings_handler(event: Union[Message, CallbackQuery], dataalo="
), ),
InlineKeyboardButton( InlineKeyboardButton(
text="+", text="+",
callback_data=f"gset%{group_id}%{user_id}%lurk_reply_chance%+1" callback_data=f"gset%{group_id}%{user_id}%lurk_reply_chance%+2"
), ),
], ],
] ]