yuripeyamashita commited on
Commit
ebe584c
1 Parent(s): 4d05f6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -35,6 +35,7 @@ def api():
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()
@@ -75,7 +76,7 @@ def api():
75
  print(matrix)
76
 
77
  if not should_checkout:
78
- return
79
 
80
  matrix_copy = [[0 for _ in range(len(matrix))] for _ in range(len(matrix))]
81
 
@@ -200,7 +201,7 @@ def send_flex_text(token, bubble):
200
  def get_username(user_id: str):
201
  if user_id == "others":
202
  return "其他人"
203
- url = f"https://api.line.me/v2/bot/group/{GROUP_ID}/member/{user_id}"
204
  try:
205
  res_json = requests.get(url, headers={"Authorization": "Bearer " + LINE_CHANNEL_ACCESS_TOKEN}).json()
206
  return res_json.get("displayName")
 
35
  if "$$$" in payload.get("msg_text"):
36
  if "清除" in payload.get("msg_text"):
37
  message_list = {}
38
+ return "", 200
39
 
40
  if "結算" in payload.get("msg_text"):
41
  users_number = get_users_number()
 
76
  print(matrix)
77
 
78
  if not should_checkout:
79
+ return "", 200
80
 
81
  matrix_copy = [[0 for _ in range(len(matrix))] for _ in range(len(matrix))]
82
 
 
201
  def get_username(user_id: str):
202
  if user_id == "others":
203
  return "其他人"
204
+ url = f"https://api.line.me/v2/bot/group/{group_id}/member/{user_id}"
205
  try:
206
  res_json = requests.get(url, headers={"Authorization": "Bearer " + LINE_CHANNEL_ACCESS_TOKEN}).json()
207
  return res_json.get("displayName")