add /help message

This commit is contained in:
missytake 2023-12-10 14:46:42 +01:00
parent fb621074d0
commit d548ebf3b8
2 changed files with 13 additions and 1 deletions

View file

@ -68,6 +68,16 @@ def store_file(msg: deltachat.Message):
msg.chat.set_ephemeral_timer(timer) msg.chat.set_ephemeral_timer(timer)
def send_help(msg: deltachat.Message):
"""Reply to the user with a help message."""
help_text = """
/start\tStart getting daily reminders.
/stop\tStop getting daily reminders.
/file\t(with an attachment) Add a list of entries which I can remind you of at specific dates.
"""
reply(msg.chat, help_text, quote=msg)
def reply( def reply(
chat: deltachat.Chat, chat: deltachat.Chat,
text: str, text: str,

View file

@ -2,7 +2,7 @@ import time
import deltachat import deltachat
from remember_remember_bot.commands import remind_chat, activate_chat, reply, store_file from remember_remember_bot.commands import remind_chat, activate_chat, reply, store_file, send_help
from remember_remember_bot.util import check_new_day, update_day from remember_remember_bot.util import check_new_day, update_day
@ -30,4 +30,6 @@ def handle_incoming_message(msg: deltachat.Message):
store_file(msg) store_file(msg)
else: else:
activate_chat(msg) activate_chat(msg)
else:
send_help(msg)
msg.mark_seen() msg.mark_seen()