increase frequency to min 5 minutes

This commit is contained in:
cupcakearmy 2019-12-23 01:48:38 +01:00
parent 3a6f90ffec
commit 2ffff5ab0f
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ def send_update_to_user(user: str, auto, codes=None):
enabled = code_data[Section.Enabled.value]
# print(code, last_run + frequency, now, last_run + frequency - now)
if auto and (last_run + frequency > now or not enabled):
if auto and (not enabled or last_run + frequency > now):
continue
code_data[Section.LastRun.value] = current_timestamp()

View File

@ -148,7 +148,7 @@ def single(update, context):
def show_single_frequency(update: Update, context: CallbackContext):
keyboard = [
[InlineKeyboardButton('2 minutes', callback_data='2m'), InlineKeyboardButton(
[InlineKeyboardButton('5 minutes', callback_data='5m'), InlineKeyboardButton(
'30 minutes', callback_data='30m')],
[InlineKeyboardButton('hour', callback_data='1h'), InlineKeyboardButton(
'4 hours', callback_data='4h')],