From c23c101e82cdf281c4a2731d14b0e92bfa8c53ec Mon Sep 17 00:00:00 2001 From: mraniki <8766259+mraniki@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:23:58 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20update=20talky=5Fsetti?= =?UTF-8?q?ngs.toml=20and=20utils.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tt/talky_settings.toml | 2 +- tt/utils.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tt/talky_settings.toml b/tt/talky_settings.toml index e540870b3..32431a103 100644 --- a/tt/talky_settings.toml +++ b/tt/talky_settings.toml @@ -108,7 +108,7 @@ iamlistening_enabled = true # Bot Prefix bot_prefix = "/" # Character to ignore -bot_ignore = "ℹ️ 🦄 ⚠️ 📊 🏦 📺 ⬆️ 💬 🐻" +bot_ignore = "ℹ️ ⚠️ 📊 🏦 📺 ⬆️ 💬 🐻" # Command for help bot_command_help = "help" # Command for info diff --git a/tt/utils.py b/tt/utils.py index 4598839d0..a1255051e 100644 --- a/tt/utils.py +++ b/tt/utils.py @@ -48,12 +48,15 @@ async def send_notification(msg): if not settings.apprise_url: logger.warning("No Apprise URL set") return + if msg is None: + logger.warning("No message to send") + return aobj = Apprise(settings.apprise_url) msg_format = settings.apprise_format or NotifyFormat.MARKDOWN try: await aobj.async_notify(body=msg, body_format=msg_format) except Exception as error: - logger.error("Verify Apprise URL: ", error) + logger.error("Verify Apprise URL", error) async def run_bot(): From a2dd1b6de112352c37a0b294e667203703c1e418 Mon Sep 17 00:00:00 2001 From: mraniki <8766259+mraniki@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:50:51 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9A=A1=20update=20cex=5Fexchange=5Fplugi?= =?UTF-8?q?n.py=20and=20dex=5Fexchange=5Fplugin.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tt/plugins/default_plugins/cex_exchange_plugin.py | 15 +++++++-------- tt/plugins/default_plugins/dex_exchange_plugin.py | 15 +++++++-------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/tt/plugins/default_plugins/cex_exchange_plugin.py b/tt/plugins/default_plugins/cex_exchange_plugin.py index 50f89a185..453de1307 100644 --- a/tt/plugins/default_plugins/cex_exchange_plugin.py +++ b/tt/plugins/default_plugins/cex_exchange_plugin.py @@ -52,14 +52,13 @@ async def handle_message(self, msg): """ if not self.should_handle(msg): return - if (settings.bot_ignore not in msg or settings.bot_prefix not in msg) and ( - await self.fmo.search(msg) and self.should_handle_timeframe() - ): - order = await self.fmo.get_order(msg) - if order and settings.trading_enabled: - trade = await self.exchange.submit_order(order) - if trade: - await send_notification(trade) + if settings.bot_ignore not in msg or settings.bot_prefix not in msg: + if await self.fmo.search(msg) and self.should_handle_timeframe(): + order = await self.fmo.get_order(msg) + if order and settings.trading_enabled: + trade = await self.exchange.submit_order(order) + if trade: + await send_notification(trade) if msg.startswith(settings.bot_prefix): command, *args = msg.split(" ") diff --git a/tt/plugins/default_plugins/dex_exchange_plugin.py b/tt/plugins/default_plugins/dex_exchange_plugin.py index bb50abcbd..d77fed352 100644 --- a/tt/plugins/default_plugins/dex_exchange_plugin.py +++ b/tt/plugins/default_plugins/dex_exchange_plugin.py @@ -45,14 +45,13 @@ async def handle_message(self, msg): if not self.should_handle(msg): return - if (settings.bot_ignore not in msg or settings.bot_prefix not in msg) and ( - await self.fmo.search(msg) and self.should_handle_timeframe() - ): - order = await self.fmo.get_order(msg) - if order and settings.trading_enabled: - trade = await self.exchange.submit_order(order) - if trade: - await send_notification(trade) + if settings.bot_ignore not in msg or settings.bot_prefix not in msg: + if await self.fmo.search(msg) and self.should_handle_timeframe(): + order = await self.fmo.get_order(msg) + if order and settings.trading_enabled: + trade = await self.exchange.submit_order(order) + if trade: + await send_notification(trade) if msg.startswith(settings.bot_prefix): command, *args = msg.split(" ") From 2edafe8481ac9ad1768f81a0cb9ed6b3b0cbf782 Mon Sep 17 00:00:00 2001 From: mraniki <8766259+mraniki@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:53:12 +0200 Subject: [PATCH 3/3] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20build(deps):=20update?= =?UTF-8?q?=20pyproject.toml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b9dd459e4..a64f37760 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,8 +55,8 @@ ping3 = "^4.0.4" talkytrend = "2.0.8" iamlistening = "5.1.5" findmyorder = "1.9.19" -dxsp = "10.0.1" -cefi = "4.4.11" +dxsp = "10.0.2" +cefi = "4.4.12" myllm = "4.8.1"