Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ def get_public_key():
"""Returns the bot's public key in `runtimeconfig.json`, if it exists."""
if config["public_key"]: return config["public_key"]
else: return "Public key has not been set."

def get_mode() -> bool:
"""Returns a boolean of the current runtime mode.\n\nReturns `True` if replit mode is active, returns `False` if replit mode is inactive."""
return config["replit"]
3 changes: 2 additions & 1 deletion api/runtimeconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"token": "",
"secret": "",
"public_key": "",
"runtime_options": []
"runtime_options": [],
"replit": true
}
7 changes: 6 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,12 @@ async def isocoin_shop(ctx: ApplicationContext):
if cog_errors == 0: print(f"[main/Cogs] {colors.green}All cogs successfully loaded.{colors.end}")
else: print(f"[main/Cogs] {colors.yellow}{cog_errors}/{len(active_cogs)} cogs failed to load.{colors.end}")
print("--------------------")
client.run(api.auth.get_token())
if api.auth.get_mode():
print(f"[main/CLIENT] Starting client in {colors.cyan}Replit mode{colors.end}...")
client.run(os.getenv("TOKEN"))
else:
print(f"[main/CLIENT] Starting client in {colors.orange}local mode{colors.end}...")
client.run(api.auth.get_token())



Expand Down