chat photo improvements.

This commit is contained in:
Lia Schöneweiß
2023-05-24 15:52:33 +02:00
committed by Remy Moll
parent 0860196a53
commit 1613e05b61
3 changed files with 66 additions and 49 deletions

View File

@@ -11,8 +11,7 @@ logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
level=logging.INFO
)
import asyncio
logging.getLogger("httpx").setLevel(logging.WARNING)
logger = logging.getLogger(__name__)
@@ -31,15 +30,8 @@ def main() -> None:
application.add_handler(memory.MemoryHandler("memory", models).handler)
random_memory.RandomMemoryJob(models, application.bot, application.job_queue)
chat_photo.SetChatPhotoJob(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))
# on every start set a new chat photo
# loop = asyncio.get_event_loop()
asyncio.ensure_future(chat_photo.set_random(application.bot))
# Run the bot until the user presses Ctrl-C
application.run_polling()