update
This commit is contained in:
1 parent
ec137c60c0
commit
939b79243f
1 file changed
+6
-7
+6
-7
@@ -42,13 +42,12 @@ class WarMonitor(commands.Cog):
|
|||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
sub = pnwkit.Subscription(
|
bot.loop.create_task(self.war_subscription_task())
|
||||||
kit=self.kit,
|
|
||||||
model="war",
|
async def war_subscription_task(self):
|
||||||
event="create",
|
subscription = await self.kit.subscribe("war", "create")
|
||||||
filters=None,
|
async for war in subscription:
|
||||||
callbacks=self.war_logger,
|
await self.war_logger(war)
|
||||||
)
|
|
||||||
|
|
||||||
async def war_logger(self, war: pnwkit.War):
|
async def war_logger(self, war: pnwkit.War):
|
||||||
# offensive wars
|
# offensive wars
|
||||||
|
|||||||
Reference in new issue
Block a user