coc.py
coc.py copied to clipboard
WarEvents are not working for anything other than war_attack
In documentation it is mentioned that you can use it for state (war) as well but it's just not working. Is it not implemented in the code?
In documentation it is mentioned that you can use it for state (war) as well but it's just not working. Is it not implemented in the code?
Can you share your script what you tried🙂 this way we can figure out what's getting wrong
Inside in the init function of COG class
self.bot.coc.add_events(self.on_war_state_change)
and the function
@coc.WarEvents.state()
async def on_war_state_change(self, prev_war, new_war: coc.ClanWar):
print(new_war.state)
The function was just for checking it, but it wasn't working. And I checked manually the clans on coc where the state changed.
Inside in the init function of COG class
self.bot.coc.add_events(self.on_war_state_change)
and the function
@coc.WarEvents.state()
async def on_war_state_change(self, prev_war, new_war: coc.ClanWar):
print(new_war.state)
The function was just for checking it, but it wasn't working. And I checked manually the clans on coc where the state changed.
Sorry I cannot give any more code.
Even you could give an example of using war events other than war_attack that would be splended.
Sorry I cannot give any more code.
without proper code i cannot help you mate, because i dont know where are you messing things.
Even you could give an example of using war events other than war_attack that would be splended.
all the examples in example folder are tested by me and its used by many others 😃 .
Closed as no response and not reproducible