Use wait time from the util library

master
jmjl 2024-02-13 10:22:26 +00:00
parent c15be36df5
commit a6967ece6f
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
import pinhook.plugin
import importlib
import subprocess
import util.tilde
@pinhook.plugin.command('&tw',help_text='Alias -- &tildewait')
@pinhook.plugin.command('&tildewait', help_text='See how much time you have to wait for ju\'s game')
@ -17,7 +18,7 @@ def tilde_wait(msg):
usertime = timestamp
found = True
if found:
timecalc = int(float(usertime)) + 60*60*4 - int(float(importlib.import_module('time').time()))
timecalc = int(float(usertime)) + util.tilde.WAIT_TIME - int(float(importlib.import_module('time').time()))
if timecalc > 1:
return pinhook.plugin.message("{}: wait {} until playing again (talking about {})".format(
msg.nick, importlib.import_module('datetime').timedelta(seconds=timecalc), '\u200b'.join(nicktouse)