1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 11:34:18 +00:00

Fix missing import

This commit is contained in:
Steffo 2019-01-03 18:13:05 +01:00
parent bd066e3ca7
commit b8c39f93e2

View file

@ -486,7 +486,7 @@ def cmd_newevent(bot: Bot, update: Update):
try:
parsed_time = parse_timestring(timestring)
if parsed_time < datetime.datetime.now():
raise PastDateError()
raise errors.PastDateError()
except ValueError:
bot.send_message(update.message.chat.id, "⚠ Non è stato possibile leggere la data.\n"
"Sintassi corretta:\n"
@ -494,7 +494,7 @@ def cmd_newevent(bot: Bot, update: Update):
"|{numero}{w|d|h|m}> <nome>\n"
"[descrizione]```", parse_mode="Markdown")
return
except PastDateError:
except errors.PastDateError:
bot.send_message(update.message.chat.id, "⚠ La data inserita è una data passata.\n"
"per favore inserisci una data futura.\n", parse_mode="Markdown")
return