Mickhat / FloBot

7 stars 1 forks source link

Check if giveaway is due in sqlite, not ts #24

Open filip326 opened 1 year ago

filip326 commented 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.

EinsKatze commented 2 weeks ago

in sqlite you can get the current utc timestampt with unixepoch() and could therefore get the due dates with WHERE timestamp < unixepoch() ig