From d1420d18c08c3497d51e268b4932832a52bcdee0 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 6 Mar 2023 08:32:00 +0100 Subject: [PATCH] Put boot log send message in loop task #243 --- kdb-bot/src/modules/boot_log/boot_log_on_ready_event.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kdb-bot/src/modules/boot_log/boot_log_on_ready_event.py b/kdb-bot/src/modules/boot_log/boot_log_on_ready_event.py index bfa0367d..58c2b5c4 100644 --- a/kdb-bot/src/modules/boot_log/boot_log_on_ready_event.py +++ b/kdb-bot/src/modules/boot_log/boot_log_on_ready_event.py @@ -68,9 +68,11 @@ class BootLogOnReadyEvent(OnReadyABC): self._logger.error(__name__, f"Config {type(self).__name__}_{g.id} not found!") return - await self._message_service.send_channel_message( - self._bot.get_channel(module_settings.login_message_channel_id), - self._t.transform("modules.boot_log.login_message").format(init_time), + self._bot.loop.create_task( + self._message_service.send_channel_message( + self._bot.get_channel(module_settings.login_message_channel_id), + self._t.transform("modules.boot_log.login_message").format(init_time), + ) ) self._config.add_configuration("IS_READY", "true")