From a6967ece6f40f23d97add40b7b79d60bb5151c31 Mon Sep 17 00:00:00 2001 From: Julian Marcos Date: Tue, 13 Feb 2024 10:22:26 +0000 Subject: [PATCH] Use wait time from the util library --- plugins/tildewait.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/tildewait.py b/plugins/tildewait.py index 463474f..d45788e 100644 --- a/plugins/tildewait.py +++ b/plugins/tildewait.py @@ -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)