This commit is contained in:
un1xx committed 2025-04-16 23:05:05 +05:30
1 parent ec137c60c0
commit 939b79243f
1 file changed
+6 -7
+6 -7
View File
@@ -42,13 +42,12 @@ class WarMonitor(commands.Cog):
@commands.Cog.listener()
async def on_ready(self):
sub = pnwkit.Subscription(
kit=self.kit,
model="war",
event="create",
filters=None,
callbacks=self.war_logger,
)
bot.loop.create_task(self.war_subscription_task())
async def war_subscription_task(self):
subscription = await self.kit.subscribe("war", "create")
async for war in subscription:
await self.war_logger(war)
async def war_logger(self, war: pnwkit.War):
# offensive wars