diff options
author | ue86388 <dmitrii.morozov@sbb.ch> | 2024-04-17 09:47:40 +0200 |
---|---|---|
committer | ue86388 <dmitrii.morozov@sbb.ch> | 2024-04-17 09:47:40 +0200 |
commit | 7aef5a4c10c55db744dcb1d95488b5e461af0bc2 (patch) | |
tree | 8a510fed081f563e362553b8a561073f18c7ab89 /tgbot.py | |
parent | 3089066696ce90eb1a4c0b381e9fc414ec00db85 (diff) |
Record stats manually and format todaystats
Diffstat (limited to 'tgbot.py')
-rwxr-xr-x | tgbot.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -89,6 +89,10 @@ async def getTodayStats(message): current_stats = [await friend.fetch_stats() for friend in friends] await reply(message, formatUserStatsDifference(persisted_stats, current_stats)) +@bot.message_handler(commands = ['recordstats']) +async def recordStats(message): + await record_user_stats() + @bot.message_handler(commands = ['find']) async def findUser(message): arg = message.text.split() @@ -150,7 +154,7 @@ async def run_record_stats(): t = time.localtime() if t.tm_hour == 5: # only at 05:00 await record_user_stats() - await asyncio.sleep(60 * 60 * 60) # 1 hour + await asyncio.sleep(60 * 60) # 1 hour async def run_all(): await asyncio.gather(run_tgbot(), run_fortniteStatusWrapper(), run_fortniteClient(), run_record_stats()) |