Open filip326 opened 1 year ago
https://github.com/Mickhat/FloBot/blob/e1a4fce7034810416868f02d2fd0065b019cbd17/src/action/giveaway.ts#L164
Here all open giveaways are fetched from the sqlite db and checked if due afterwards. It should be possible to fetch only the due giveaways.
in sqlite you can get the current utc timestampt with unixepoch() and could therefore get the due dates with WHERE timestamp < unixepoch() ig
unixepoch()
WHERE timestamp < unixepoch()
https://github.com/Mickhat/FloBot/blob/e1a4fce7034810416868f02d2fd0065b019cbd17/src/action/giveaway.ts#L164
Here all open giveaways are fetched from the sqlite db and checked if due afterwards. It should be possible to fetch only the due giveaways.