Update chatbot/plugins/chat.py
Browse files- chatbot/plugins/chat.py +2 -3
chatbot/plugins/chat.py
CHANGED
@@ -936,12 +936,11 @@ def create_keyboard(
|
|
936 |
)
|
937 |
return keyboard
|
938 |
|
939 |
-
@Client.on_callback_query()
|
940 |
async def vote(client, callback_query):
|
941 |
message_id = callback_query.message.id
|
942 |
user_id = callback_query.from_user.id
|
943 |
-
action =
|
944 |
-
|
945 |
if message_id not in like_counts:
|
946 |
like_counts[message_id] = set()
|
947 |
if message_id not in unlike_counts:
|
|
|
936 |
)
|
937 |
return keyboard
|
938 |
|
939 |
+
@Client.on_callback_query(r"^(like|unlike)$")
|
940 |
async def vote(client, callback_query):
|
941 |
message_id = callback_query.message.id
|
942 |
user_id = callback_query.from_user.id
|
943 |
+
action = callback.matches[0].group(1)
|
|
|
944 |
if message_id not in like_counts:
|
945 |
like_counts[message_id] = set()
|
946 |
if message_id not in unlike_counts:
|