From e6c5285b864a98d65b7f93ca2a9d9af0aa0925cc Mon Sep 17 00:00:00 2001 From: un1xx Date: Mon, 21 Apr 2025 22:04:43 +0530 Subject: [PATCH] update --- exts/REPL.py | 7 +++++++ exts/war_monitor.py | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/exts/REPL.py b/exts/REPL.py index eed3ea1..fbd6417 100644 --- a/exts/REPL.py +++ b/exts/REPL.py @@ -14,6 +14,7 @@ from contextlib import redirect_stdout import aiofiles import aiohttp import discord +import pnwkit from discord.ext import commands from utils.paginator import Paginator @@ -27,6 +28,12 @@ class REPL(commands.Cog): self._last_result = None self.sessions = set() self.session = aiohttp.ClientSession(loop=bot.loop) + self.kit = pnwkit.QueryKit( + api_key=os.getenv("pnwAPIKEY"), + bot_key=os.getenv("pnwBOTKEY"), + bot_key_api_key=os.getenv("pnwACCKEY"), + aiohttp_session=aiohttp.ClientSession(loop=self.bot.loop), + ) def cleanup_code(self, content): "Automatically removes code blocks from the code." diff --git a/exts/war_monitor.py b/exts/war_monitor.py index 9740799..98abfd9 100644 --- a/exts/war_monitor.py +++ b/exts/war_monitor.py @@ -496,9 +496,11 @@ class WarMonitor(commands.Cog): async def inrange(self, ctx: CustomCtx): category = await self.bot.fetch_channel(CATEGORY) if ctx.channel not in category.text_channels: - await ctx.send(f"this command only works inside {category.name}") + await ctx.send(f"this command only works inside {category.name}", delete_after=5) return id = int(ctx.channel.name.split("-")[-1]) + if not id: + return await ctx.send("> can only use in tracked war channels with IDs in their name.") await self.calc_inrange(id, ctx.channel) async def setup(bot: Brahmos):