From 90740244d3fa976e58b3e8bf41709fbe5cf37c97 Mon Sep 17 00:00:00 2001 From: un1xx Date: Fri, 9 May 2025 19:31:47 +0530 Subject: [PATCH] fix error --- exts/banking.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/exts/banking.py b/exts/banking.py index 9a03bb8..2a52ed1 100644 --- a/exts/banking.py +++ b/exts/banking.py @@ -12,6 +12,7 @@ import discord import asyncpg import pnwkit from discord.ext import commands +from discord import app_commands from discord.utils import format_dt from numerize_denumerize import denumerize, numerize @@ -74,23 +75,23 @@ class Banking(commands.Cog): bot_key_api_key=os.getenv("pnwACCKEY"), aiohttp_session=aiohttp.ClientSession(loop=self.bot.loop), ) - self.FILL = None + self.WARCHEST_IDS = None async def cog_load(self): """Called when the cog is loaded.""" - await self.fetch_refill_ids() + await self.fetch_warchest_ids() - async def fetch_refill_ids(self): - """Fetch nation IDs from the refill table.""" + async def fetch_warchest_ids(self): + """Fetch nation IDs from the warchest table.""" try: async with self.bot.db_pool.acquire() as conn: - query = "SELECT id FROM refill" + query = "SELECT id FROM warchest" rows = await conn.fetch(query) self.FILL = [row[0] for row in rows] except Exception as e: - self.FILL = [] + self.WARCHEST_IDS = [] @commands.has_any_role("Government", "The Croak Council") @commands.command() @@ -200,7 +201,7 @@ class Banking(commands.Cog): nations.append(gator) for nation in nations: - if nation.id not in self.FILL: + if nation.id not in self.WARCHEST_IDS: continue cities = len(nation.cities) delta = BaseMul.calc(cities, nation)