summaryrefslogtreecommitdiff
path: root/tgbot.py
diff options
context:
space:
mode:
Diffstat (limited to 'tgbot.py')
-rwxr-xr-xtgbot.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tgbot.py b/tgbot.py
index ba87df7..87d93e1 100755
--- a/tgbot.py
+++ b/tgbot.py
@@ -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())