yuripeyamashita
commited on
Commit
•
4d05f6a
1
Parent(s):
f76a4e9
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,9 @@ def api():
|
|
33 |
raise ValueError("Unsend Success")
|
34 |
|
35 |
if "$$$" in payload.get("msg_text"):
|
|
|
|
|
|
|
36 |
if "結算" in payload.get("msg_text"):
|
37 |
users_number = get_users_number()
|
38 |
|
@@ -154,9 +157,11 @@ def api():
|
|
154 |
def get_payload_dict(raw_payload) -> dict:
|
155 |
# print(raw_payload)
|
156 |
global group_id
|
|
|
|
|
157 |
group_id = events.get("source", {}).get("groupId")
|
158 |
print(group_id)
|
159 |
-
|
160 |
return {"token": events.get("replyToken"),
|
161 |
"quote_token": events.get("message", {}).get("quoteToken"),
|
162 |
"group_id": events.get("source", {}).get("groupId"),
|
|
|
33 |
raise ValueError("Unsend Success")
|
34 |
|
35 |
if "$$$" in payload.get("msg_text"):
|
36 |
+
if "清除" in payload.get("msg_text"):
|
37 |
+
message_list = {}
|
38 |
+
|
39 |
if "結算" in payload.get("msg_text"):
|
40 |
users_number = get_users_number()
|
41 |
|
|
|
157 |
def get_payload_dict(raw_payload) -> dict:
|
158 |
# print(raw_payload)
|
159 |
global group_id
|
160 |
+
events = raw_payload.get("events", [{}])[0]
|
161 |
+
|
162 |
group_id = events.get("source", {}).get("groupId")
|
163 |
print(group_id)
|
164 |
+
|
165 |
return {"token": events.get("replyToken"),
|
166 |
"quote_token": events.get("message", {}).get("quoteToken"),
|
167 |
"group_id": events.get("source", {}).get("groupId"),
|