From 5676d683f4c4134e9ccdfd9af0f4ed25af2d6a68 Mon Sep 17 00:00:00 2001 From: Sabi <120003982+cyanogus@users.noreply.github.com> Date: Fri, 30 Jun 2023 08:18:20 +0000 Subject: [PATCH 1/5] Remove some extra line of code --- cogs/economy.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cogs/economy.py b/cogs/economy.py index 7fb7654a..b31dbbca 100644 --- a/cogs/economy.py +++ b/cogs/economy.py @@ -165,7 +165,6 @@ async def beg(self, ctx: ApplicationContext): ] if (randint(1, 100) >= 50): x = randint(10, 100) - currency.get_wallet(ctx.author.id) += x currency.add(ctx.author.id, x) await ctx.respond(embed=discord.Embed(title=random.choice(names), description=f"Oh you poor beggar, here's {x} coin(s) for you. Hope it helps!")) else: await ctx.respond(embed=discord.Embed(title=random.choice(names), description=f'"{random.choice(fail_responses)}"')) From d5739721f4007b8a43d0c8325a063281f88eff2e Mon Sep 17 00:00:00 2001 From: Sabi <120003982+cyanogus@users.noreply.github.com> Date: Fri, 30 Jun 2023 08:19:16 +0000 Subject: [PATCH 2/5] Replace depreciated economy function with current one --- cogs/economy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/economy.py b/cogs/economy.py index b31dbbca..076f2d9e 100644 --- a/cogs/economy.py +++ b/cogs/economy.py @@ -596,7 +596,7 @@ async def withdraw(self, ctx: ApplicationContext, amount): async def networth(self, ctx: ApplicationContext, user: discord.User=None): if user == None: user = ctx.author try: - ntw = get_user_networth(user.id) + ntw = currency.get_user_networth(user.id) localembed = discord.Embed(name=f"{user.display_name}'s networth", description=f"{ntw} coins", color=color) await ctx.respond(embed=localembed) except KeyError: return await ctx.respond("Looks like that user isn't cached yet. Please try again later.", ephemeral=True) From 17886cd58e1283ec9feaab98200f6b5af3868c01 Mon Sep 17 00:00:00 2001 From: Sabi <120003982+cyanogus@users.noreply.github.com> Date: Fri, 30 Jun 2023 08:21:37 +0000 Subject: [PATCH 3/5] Add missing `self` parameter --- cogs/isobank.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/isobank.py b/cogs/isobank.py index 5da0cec3..9f82995f 100644 --- a/cogs/isobank.py +++ b/cogs/isobank.py @@ -26,7 +26,7 @@ def __init__(self, bot): description="Registers a new IsoBank account with your Discord ID" ) @option(name="pin", description="Your new account's authentication ID. Must be a 6-digit integer.", type=int) - async def isobank_register(ctx: ApplicationContext, pin:int): + async def isobank_register(self, ctx: ApplicationContext, pin:int): isobankauth.register(ctx.author.id, pin) await ctx.respond("Congratulations! Your new IsoBank account has been registered.", ephemeral=True) From 36756267155bb30fb8782f2acf49becf808e52ba Mon Sep 17 00:00:00 2001 From: Sabi <120003982+cyanogus@users.noreply.github.com> Date: Fri, 30 Jun 2023 08:22:22 +0000 Subject: [PATCH 4/5] Remove an unused import --- cogs/isocard.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cogs/isocard.py b/cogs/isocard.py index 543f2e09..1ca16000 100644 --- a/cogs/isocard.py +++ b/cogs/isocard.py @@ -3,7 +3,6 @@ # Imports import discord import json -import os import random import time from discord import option, ApplicationContext, SlashCommandGroup From fb57c52f9e96142e81a7a39e4c4e3486a35223a6 Mon Sep 17 00:00:00 2001 From: Sabi <120003982+cyanogus@users.noreply.github.com> Date: Fri, 30 Jun 2023 08:24:22 +0000 Subject: [PATCH 5/5] Remove unused imports --- cogs/minigames.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cogs/minigames.py b/cogs/minigames.py index f68ec03d..2f7b6083 100644 --- a/cogs/minigames.py +++ b/cogs/minigames.py @@ -2,11 +2,10 @@ # Imports import discord -import json import os.path import framework.isobot.currency from random import randint -from discord import option, ApplicationContext +from discord import ApplicationContext from discord.ext import commands # Variables