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()
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user