diff --git a/src/remember_remember_bot/commands.py b/src/remember_remember_bot/commands.py index 889fe35..45f25b5 100644 --- a/src/remember_remember_bot/commands.py +++ b/src/remember_remember_bot/commands.py @@ -1,7 +1,7 @@ import os import deltachat -from remember_remember_bot.util import ( +from .util import ( chat_is_active, get_file_path, get_lines_from_file, @@ -27,16 +27,6 @@ def setup(email: str, password: str, db: str, debug: bool) -> deltachat.Account: return ac -def remind_chat(chat: deltachat.Chat): - """Remind a chat from the last sent file, with all lines which fit today's date.""" - if chat_is_active(chat): - file_path = get_file_path(chat) - lines = get_lines_from_file(file_path) - message_text = "\n".join(today_lines(lines)) - print(message_text) - chat.send_text(message_text) - - def activate_chat(msg: deltachat.Message): """Activate a Chat after the user sent /start""" file_path = get_file_path(msg.chat) @@ -55,14 +45,16 @@ def activate_chat(msg: deltachat.Message): remind_chat(msg.get_sender_contact().create_chat()) -def store_file(msg: deltachat.Message): - """Store a received file and reply without timer to the chat where it was stored""" - new_filename = "./files/" + str(msg.chat.id) - with open(msg.filename, "r") as read_file: - os.makedirs(os.path.dirname(new_filename), exist_ok=True) - with open(new_filename, "w+") as write_file: - write_file.write(read_file.read()) - reply(msg.chat, f"Thanks, I will use this file for daily reminders now.", quote=msg) +def add_keyword(msg: deltachat.Message): + """Add keywords the bot listens on""" + + +def list_keywords(): + """List current keywords""" + + +def rm_keyword(text: deltachat.Message): + """Remove keywords from the bot""" def send_help(msg: deltachat.Message):