izuemon commited on
Commit
95afb4d
·
verified ·
1 Parent(s): 3c9ecd7

Update chatgpt.py

Browse files
Files changed (1) hide show
  1. chatgpt.py +2 -3
chatgpt.py CHANGED
@@ -98,7 +98,7 @@ def main():
98
  messages = fetch_channel_messages()
99
 
100
  if not messages:
101
- time.sleep(10)
102
  continue
103
 
104
  # createdAt が最大のメッセージを「最後のメッセージ」とする
@@ -113,7 +113,6 @@ def main():
113
 
114
  # 最後のメッセージがアシスタントなら GPT に送らず待機
115
  if latest_person_id == ASSISTANT_PERSON_ID:
116
- print("最後のメッセージがアシスタントのため待機")
117
  processed.add(msg_id)
118
  time.sleep(10)
119
  continue
@@ -133,7 +132,7 @@ def main():
133
  except Exception as e:
134
  print("エラー:", e)
135
 
136
- time.sleep(15)
137
 
138
  if __name__ == "__main__":
139
  main()
 
98
  messages = fetch_channel_messages()
99
 
100
  if not messages:
101
+ time.sleep(5)
102
  continue
103
 
104
  # createdAt が最大のメッセージを「最後のメッセージ」とする
 
113
 
114
  # 最後のメッセージがアシスタントなら GPT に送らず待機
115
  if latest_person_id == ASSISTANT_PERSON_ID:
 
116
  processed.add(msg_id)
117
  time.sleep(10)
118
  continue
 
132
  except Exception as e:
133
  print("エラー:", e)
134
 
135
+ time.sleep(5)
136
 
137
  if __name__ == "__main__":
138
  main()