From 0d9548dfe1fdf5cba16f64e63954f48bd5882394 Mon Sep 17 00:00:00 2001 From: "Nyeki.py" <84998222+Nekidev@users.noreply.github.com> Date: Mon, 21 Oct 2024 14:08:07 -0300 Subject: [PATCH 1/2] fix(bot): :ambulance: Bot not starting. --- payphone/db/setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/payphone/db/setup.py b/payphone/db/setup.py index d821357..dcf9400 100644 --- a/payphone/db/setup.py +++ b/payphone/db/setup.py @@ -9,8 +9,6 @@ from payphone.core import config async def init() -> None: """Initialize the database and it's connections.""" - await tortoise.Tortoise.close_connections() - await tortoise.Tortoise.init(config.TORTOISE_ORM, use_tz=True) await tortoise.Tortoise.generate_schemas(safe=True) From f8e3e7ab4c369c8d0b5b7daf366163eda5cedbc9 Mon Sep 17 00:00:00 2001 From: "Nyeki.py" <84998222+Nekidev@users.noreply.github.com> Date: Mon, 21 Oct 2024 14:09:42 -0300 Subject: [PATCH 2/2] fix(bot): :bug: `p.history` not responding when a call's first message hadn't been propagated. --- payphone/cogs/users/cog.py | 1 + 1 file changed, 1 insertion(+) diff --git a/payphone/cogs/users/cog.py b/payphone/cogs/users/cog.py index 8140fe9..337845c 100644 --- a/payphone/cogs/users/cog.py +++ b/payphone/cogs/users/cog.py @@ -303,6 +303,7 @@ class Users(base.Cog): min_ids = await ( models.Message.filter(call_id__in=call_ids) + .exclude(propagation_id=None) .annotate(min_id=functions.Min("id")) .group_by("call_id") .values_list("min_id", flat=True)