You could add to the farming task a number of minimum number of hours from last raid when the loot is parcial or empty.
Like imagine the loot came empty, so we don’t want to send another raid. But, if the raid where the loot was empty was 5h ago, maybe that village has some resources and we want to send a raid.
I hope you understand ahahah
Sugestion
Re: Sugestion
Yea I get what you mean.
I was thinking of adding a user-specified number of times the raid has to be for example empty in a row for the troop change to trigger, that would mean that the bot would confirm that the troop change is actually necessary.
That would probably help with what you mention but adding a max time condition is a good idea too. The only issue I see with that is that the bot would need to keep a separate server time clock for cases when the server time is far ahead or behind your system clock.
I was thinking of adding a user-specified number of times the raid has to be for example empty in a row for the troop change to trigger, that would mean that the bot would confirm that the troop change is actually necessary.
That would probably help with what you mention but adding a max time condition is a good idea too. The only issue I see with that is that the bot would need to keep a separate server time clock for cases when the server time is far ahead or behind your system clock.
Re: Sugestion
There's a module called pytz were you can work with timezones, like if you associate a timezone to the current logged server you could add this feature 
