fixed stuck in memory function. implemented random memory

This commit is contained in:
Lia Schöneweiß
2023-05-24 15:02:17 +02:00
committed by Remy Moll
parent 49339ebcb9
commit 0860196a53
5 changed files with 135 additions and 29 deletions

View File

@@ -5,7 +5,7 @@ import logging
import models
from commands import journal, status, turtle, memory
from commands.list import list
from cronjob import chat_photo
from cronjob import chat_photo, random_memory
logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
@@ -24,13 +24,14 @@ def main() -> None:
models.set_db(db_path)
application = Application.builder().token(token).build()
application.add_handler(journal.JournalHandler("journal", models).handler)
application.add_handler(list.ListHandler("list", models).handler)
application.add_handler(status.StatusHandler("status", models).handler)
application.add_handler(turtle.TurtleHandler().handler)
application.add_handler(memory.MemoryHandler("memory", models).handler)
random_memory.RandomMemoryJob(models, application.bot, application.job_queue)
# application.add_handler(CommandHandler("help", help_command))
# on non command i.e message - echo the message on Telegram
# application.add_handler(InlineQueryHandler(inline_query))