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
20 changes: 10 additions & 10 deletions cogs/economy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
shop_data = ShopData("config/shop.json")
all_item_ids = shop_data.get_item_ids()
shopitem = shop_data.get_raw_data()
jobs = [
jobs = (
"Discord mod",
"YouTuber",
"Streamer",
"Developer",
"Scientist",
"Engineer",
"Doctor"
]
)

# Commands
class Economy(commands.Cog):
Expand Down Expand Up @@ -99,7 +99,7 @@ async def openlootbox(self, ctx: ApplicationContext, lootbox:str, amount:int):
)
@commands.cooldown(1, 15, commands.BucketType.user)
async def beg(self, ctx: ApplicationContext):
names = [
names = (
"A random person",
"Your friend",
"Your boss",
Expand All @@ -126,8 +126,8 @@ async def beg(self, ctx: ApplicationContext):
"Your maths teacher",
"Galaxy",
"Taylor Swift"
]
fail_responses = [
)
fail_responses = (
"Maybe another day.",
"Hell nah.",
"Sorry I don't have any cash on me.",
Expand All @@ -140,7 +140,7 @@ async def beg(self, ctx: ApplicationContext):
"I think I know what you're gonna do with that money.",
"Debloat notsniped's code and he will probably give you money.",
"If you win a chess match against Xyren she will give you money."
]
)
if (randint(1, 100) >= 50):
x = randint(10, 100)
currency.add(ctx.author.id, x)
Expand Down Expand Up @@ -220,7 +220,7 @@ async def bankrob(self, ctx: ApplicationContext, user:discord.User):
@commands.cooldown(1, 30, commands.BucketType.user)
async def hunt(self, ctx: ApplicationContext):
if items.fetch_item_count(ctx.author.id, "rifle") == 0: return await ctx.respond("I'd hate to see you hunt with your bare hands. Please buy a hunting rifle from the shop. ||/buy rifle||")
loot = ['rock', 'ant', 'skunk', 'boar', 'deer', 'dragon', 'nothing', 'died']
loot = ('rock', 'ant', 'skunk', 'boar', 'deer', 'dragon', 'nothing', 'died')
choice = random.choice(loot)
if choice != "nothing" and choice != "died":
items.add_item(ctx.author.id, choice)
Expand All @@ -237,7 +237,7 @@ async def hunt(self, ctx: ApplicationContext):
@commands.cooldown(1, 45, commands.BucketType.user)
async def fish(self, ctx: ApplicationContext):
if items.fetch_item_count(ctx.author.id, "fishingpole") == 0: return await ctx.respond("I don't think you can fish with your bare hands... or you can just put yo hands in the water bro **giga chad moment**\nAnyway it's just better to buy a fishing pole from the shop. ||/buy fishingpole||")
loot = ['shrimp', 'fish', 'rare fish', 'exotic fish', 'jellyfish', 'shark', 'nothing']
loot = ('shrimp', 'fish', 'rare fish', 'exotic fish', 'jellyfish', 'shark', 'nothing')
choice = random.choice(loot)
if choice != "nothing":
items.add_item(ctx.author.id, choice)
Expand All @@ -251,7 +251,7 @@ async def fish(self, ctx: ApplicationContext):
@commands.cooldown(1, 45, commands.BucketType.user)
async def dig(self, ctx: ApplicationContext):
if items.fetch_item_count(ctx.author.id, "shovel") == 0: return await ctx.respond("You're too good to have to dig with your bare hands..... at least I hope so. Please buy a shovel from the shop. ||/buy shovel||")
loot = [
loot = (
'coins',
'shovel',
'ant',
Expand All @@ -262,7 +262,7 @@ async def dig(self, ctx: ApplicationContext):
'rare lootbox',
'nothing',
'died',
]
)
choice = random.choice(loot)
if (choice == "coins"):
currency.add(ctx.author.id, random.randint('1000', '5000'))
Expand Down
2 changes: 1 addition & 1 deletion cogs/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def owoify(self, ctx: ApplicationContext, text: str):
text = text.replace("the", "da")
text = text.replace("you", "u")
text = text.replace("your", "ur")
text += random.choice([" uwu", " owo", " UwU", " OwO", " XDDD", " :D", " ;-;", " <3", " ^-^", " >-<"])
text += random.choice((" uwu", " owo", " UwU", " OwO", " XDDD", " :D", " ;-;", " <3", " ^-^", " >-<"))
await ctx.respond(text)

@commands.slash_command(
Expand Down
10 changes: 5 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def initial_setup():
"""Runs the initial setup for isobot's directories.\nThis creates missing directories, new log files, as well as new databases for any missing `.json` database files."""
# Create required client directories
try:
paths = ["database", "database/isobank", "config", "logs", "themes"]
paths = ("database", "database/isobank", "config", "logs", "themes")
for p in paths:
if not os.path.isdir(p):
logger.warn(f"'{p}' directory appears to be missing. Created new directory for '{p}'.", module="main/Setup", nolog=True)
Expand All @@ -41,7 +41,7 @@ def initial_setup():

# Generating database files
try:
databases = [
databases = (
"automod",
"currency",
"isocard",
Expand All @@ -56,7 +56,7 @@ def initial_setup():
"embeds",
"isobank/accounts",
"isobank/auth"
]
)
for f in databases:
if not os.path.isfile(f"database/{f}.json"):
logger.warn(f"[main/Setup] '{f}.json' was not found in database directory. Creating new database...", module="main/Setup", nolog=True)
Expand Down Expand Up @@ -578,7 +578,7 @@ async def credits(ctx: ApplicationContext):
await ctx.respond(embed=localembed)

# Initialization
active_cogs = [
active_cogs = (
"economy",
"maths",
"reddit",
Expand All @@ -594,7 +594,7 @@ async def credits(ctx: ApplicationContext):
# "osu", Disabled due to ossapi library metadata issues. (will probably remove osu cog anyway, because cog code is outdated with ossapi library)
"weather",
"isocard"
]
)
i = 1
cog_errors = 0
for x in active_cogs:
Expand Down