Araeynn commited on
Commit
c47e9fc
·
verified ·
1 Parent(s): 9bb5c5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -450,13 +450,13 @@ async def on_message(message):
450
  context = f.read()
451
  with open(f"{guild_name}.guild", "r") as f:
452
  o = f.read()
453
- if not os.path.exists(f"usrtime/{message.author}.usr"):
454
- with open(f"usrtime/{message.author}.usr", "w") as f:
455
  f.write(str(time.time()))
456
- with open(f"usrtime/{message.author}.usr", "w") as f:
457
- b = f.read()
458
- if str(message.channel.id) in o.split("\n") or guild_name == "Direct" and message.author.id not in bannedUsers and time.time() - int(b) < 5:
459
- with open(f"usrtime/{message.author}.usr", "w") as f:
460
  f.write(time.time())
461
  async with msgchannel.typing():
462
  context += f"GPT4 Correct Assistant:"
 
450
  context = f.read()
451
  with open(f"{guild_name}.guild", "r") as f:
452
  o = f.read()
453
+ if not os.path.exists(f"usrtime/{message.author}"):
454
+ with open(f"usrtime/{message.author}", "w") as f:
455
  f.write(str(time.time()))
456
+ with open(f"usrtime/{message.author}", "r") as f:
457
+ er = f.read()
458
+ if str(message.channel.id) in o.split("\n") or guild_name == "Direct" and message.author.id not in bannedUsers and time.time() - int(er) < 5:
459
+ with open(f"usrtime/{message.author}", "w") as f:
460
  f.write(time.time())
461
  async with msgchannel.typing():
462
  context += f"GPT4 Correct Assistant:"