aboutsummaryrefslogtreecommitdiff
path: root/handlers/pin.py
diff options
context:
space:
mode:
Diffstat (limited to 'handlers/pin.py')
-rw-r--r--handlers/pin.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/handlers/pin.py b/handlers/pin.py
index 17995ee..e4d21db 100644
--- a/handlers/pin.py
+++ b/handlers/pin.py
@@ -1,6 +1,6 @@
1from aiogram import types as t 1from aiogram import types as t
2 2
3from shared.instances import bot, config, dp 3from shared.instances import bot, chats, dp
4from utils import filters as f 4from utils import filters as f
5 5
6 6
@@ -18,7 +18,7 @@ async def pin_command(msg: t.Message) -> None:
18 "Да", 18 "Да",
19 "Нет", 19 "Нет",
20 ], 20 ],
21 config.get_config(msg.chat.id).pin.anonym, 21 chats.get(msg.chat.id).pin.anonym,
22 reply_markup=t.InlineKeyboardMarkup().add( 22 reply_markup=t.InlineKeyboardMarkup().add(
23 t.InlineKeyboardButton( 23 t.InlineKeyboardButton(
24 "Проверить опрос", 24 "Проверить опрос",
@@ -37,7 +37,7 @@ async def check_poll(clb: t.CallbackQuery) -> None:
37 poll = clb.message.poll 37 poll = clb.message.poll
38 msg = clb.message 38 msg = clb.message
39 pin = int(clb.data.split(":")[1]) 39 pin = int(clb.data.split(":")[1])
40 min_answers = config.get_config(msg.chat.id).pin.answer_count 40 min_answers = chats.get(msg.chat.id).pin.answer_count
41 41
42 if poll.total_voter_count < min_answers: 42 if poll.total_voter_count < min_answers:
43 await clb.answer( 43 await clb.answer(