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
7 changes: 3 additions & 4 deletions cogs/automod.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
# Imports
import discord
import json
import os
from discord import option, ApplicationContext
from discord.ext import commands

# Variables
wdir = os.getcwd()

color = discord.Color.random()

with open(f'{wdir}/database/automod.json', 'r', encoding="utf-8") as f: automod_config = json.load(f)
with open('database/automod.json', 'r', encoding="utf-8") as f: automod_config = json.load(f)

def save():
with open(f'{wdir}/database/automod.json', 'w+', encoding="utf-8") as f: json.dump(automod_config, f, indent=4)
with open('database/automod.json', 'w+', encoding="utf-8") as f: json.dump(automod_config, f, indent=4)

# Commands
class Automod(commands.Cog):
Expand Down
14 changes: 6 additions & 8 deletions cogs/economy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# Imports
import discord
import os.path
import json
import random
import math
Expand Down Expand Up @@ -31,10 +30,9 @@ def get_item_names(self) -> list:
return json_list

# Variables
wdir = os.getcwd()
color = discord.Color.random()
currency = framework.isobot.currency.CurrencyAPI("database/currency.json", "logs/currency.log")
shop_data = ShopData(f"{wdir}/config/shop.json")
shop_data = ShopData("config/shop.json")
all_item_ids = shop_data.get_item_ids()
jobs = [
"Discord mod",
Expand All @@ -46,13 +44,13 @@ def get_item_names(self) -> list:
"Doctor"
]

with open(f"{wdir}/database/items.json", 'r') as f: items = json.load(f)
with open(f"{wdir}/config/shop.json", 'r') as f: shopitem = json.load(f)
with open(f"{wdir}/database/user_data.json", 'r') as f: userdat = json.load(f)
with open("database/items.json", 'r') as f: items = json.load(f)
with open("config/shop.json", 'r') as f: shopitem = json.load(f)
with open("database/user_data.json", 'r') as f: userdat = json.load(f)

def save():
with open(f"{wdir}/database/items.json", 'w+') as f: json.dump(items, f, indent=4)
with open(f"{wdir}/database/user_data.json", 'w+') as f: json.dump(userdat, f, indent=4)
with open("database/items.json", 'w+') as f: json.dump(items, f, indent=4)
with open("database/user_data.json", 'w+') as f: json.dump(userdat, f, indent=4)

# Functions
def new_userdat(id: int):
Expand Down
4 changes: 1 addition & 3 deletions cogs/isobank.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@
# Imports
import discord
import json
import os.path
from discord import option, ApplicationContext
from discord.ext import commands
import framework.isobank.manager

# Variables
wdir = os.getcwd()
color = discord.Color.random()

# Isobot Framework
isobankauth = framework.isobank.authorize.IsobankAuth(f"{wdir}/database/isobank/auth.json", f"{wdir}/database/isobank/accounts.json")
isobankauth = framework.isobank.authorize.IsobankAuth("database/isobank/auth.json", "database/isobank/accounts.json")

# Commands
class IsoBank(commands.Cog):
Expand Down
6 changes: 2 additions & 4 deletions cogs/levelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@
# Imports
import discord
import json
import os.path
from discord import option, ApplicationContext
from discord.ext import commands

# Variables
wdir = os.getcwd()
color = discord.Color.random()

with open(f"{wdir}/database/levels.json", 'r', encoding="utf-8") as f: levels = json.load(f)
with open("database/levels.json", 'r', encoding="utf-8") as f: levels = json.load(f)

def save():
with open(f"{wdir}/database/levels.json", 'w+', encoding="utf-8") as f: json.dump(levels, f, indent=4)
with open("database/levels.json", 'w+', encoding="utf-8") as f: json.dump(levels, f, indent=4)

# Functions
def get_xp(id: int) -> int:
Expand Down
2 changes: 0 additions & 2 deletions cogs/minigames.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

# Imports
import discord
import os.path
import framework.isobot.currency
from random import randint
from discord import ApplicationContext
from discord.ext import commands

# Variables
wdir = os.getcwd()
color = discord.Color.random()
currency = framework.isobot.currency.CurrencyAPI("database/currency.json", "logs/currency.log")

Expand Down
1 change: 0 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#Variables
client = discord.Bot()
color = discord.Color.random()
wdir = os.getcwd()
with open('database/items.json', 'r', encoding="utf-8") as f: items = json.load(f)
with open('config/shop.json', 'r', encoding="utf-8") as f: shopitem = json.load(f)
with open('database/presence.json', 'r', encoding="utf-8") as f: presence = json.load(f)
Expand Down