Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -366,6 +366,9 @@ async def on_message(message):
|
|
366 |
message.content = message.content.replace(f"<@{user.id}>",
|
367 |
f"<@{str(user)}>")
|
368 |
try:
|
|
|
|
|
|
|
369 |
s = f":green[{message.author}]: :violet[{message.content}] :blue[{msgchannel_name}] :orange[{guild_name}]"
|
370 |
if message.author == client.user:
|
371 |
return
|
@@ -420,10 +423,7 @@ async def on_message(message):
|
|
420 |
context = f.read()
|
421 |
with open(f"{guild_name}.guild", "r") as f:
|
422 |
o = f.read()
|
423 |
-
|
424 |
-
bannedUsers = json.loads(info)["bannedUsers"]
|
425 |
-
imageModel = json.loads(info)["imageModel"]
|
426 |
-
if str(message.channel.id) in o.split("\n") or guild_name == "Direct" or message.author.id not in bannedUsers:
|
427 |
async with msgchannel.typing():
|
428 |
context += f"GPT4 Correct Assistant:"
|
429 |
load = random.choice(
|
|
|
366 |
message.content = message.content.replace(f"<@{user.id}>",
|
367 |
f"<@{str(user)}>")
|
368 |
try:
|
369 |
+
info = requests.get("https://raw.githubusercontent.com/aryananumula/lr/main/info.json").content
|
370 |
+
bannedUsers = json.loads(info)["bannedUsers"]
|
371 |
+
imageModel = json.loads(info)["imageModel"]
|
372 |
s = f":green[{message.author}]: :violet[{message.content}] :blue[{msgchannel_name}] :orange[{guild_name}]"
|
373 |
if message.author == client.user:
|
374 |
return
|
|
|
423 |
context = f.read()
|
424 |
with open(f"{guild_name}.guild", "r") as f:
|
425 |
o = f.read()
|
426 |
+
if str(message.channel.id) in o.split("\n") or guild_name == "Direct" and message.author.id not in bannedUsers:
|
|
|
|
|
|
|
427 |
async with msgchannel.typing():
|
428 |
context += f"GPT4 Correct Assistant:"
|
429 |
load = random.choice(
|