throw out methods we don't need, add stubs

This commit is contained in:
missytake 2025-08-27 11:16:15 +02:00
parent 6f522b1218
commit 29e4249f18
Signed by: missytake
GPG key ID: 04CC6658320518DF

View file

@ -1,7 +1,7 @@
import os import os
import deltachat import deltachat
from remember_remember_bot.util import ( from .util import (
chat_is_active, chat_is_active,
get_file_path, get_file_path,
get_lines_from_file, get_lines_from_file,
@ -27,16 +27,6 @@ def setup(email: str, password: str, db: str, debug: bool) -> deltachat.Account:
return ac 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): def activate_chat(msg: deltachat.Message):
"""Activate a Chat after the user sent /start""" """Activate a Chat after the user sent /start"""
file_path = get_file_path(msg.chat) 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()) remind_chat(msg.get_sender_contact().create_chat())
def store_file(msg: deltachat.Message): def add_keyword(msg: deltachat.Message):
"""Store a received file and reply without timer to the chat where it was stored""" """Add keywords the bot listens on"""
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) def list_keywords():
with open(new_filename, "w+") as write_file: """List current keywords"""
write_file.write(read_file.read())
reply(msg.chat, f"Thanks, I will use this file for daily reminders now.", quote=msg)
def rm_keyword(text: deltachat.Message):
"""Remove keywords from the bot"""
def send_help(msg: deltachat.Message): def send_help(msg: deltachat.Message):