Skip to content

Commit

Permalink
⚡ build(deps): update pyproject.toml, cex_exchange_plugin.py and plug…
Browse files Browse the repository at this point in the history
…in_manager.py
  • Loading branch information
mraniki committed Apr 8, 2024
1 parent 6694291 commit 89f274e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ asyncz = "^0.5.0"
nicegui = "^1.3.15"
ping3 = "^4.0.4"
talkytrend = "2.0.8"
iamlistening = "5.1.6"
iamlistening = "5.1.7"
findmyorder = "1.9.19"
dxsp = "10.0.2"
cefi = "4.4.13"
Expand Down
14 changes: 7 additions & 7 deletions tt/plugins/default_plugins/cex_exchange_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +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:
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 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(" ")
Expand Down
6 changes: 5 additions & 1 deletion tt/plugins/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ def should_handle(self, message):
"""
if self.enabled:
return not message.startswith(settings.bot_ignore)
logger.debug("Should handle: {}", message)
return (
settings.bot_ignore not in message or settings.bot_prefix not in message
)
# return not message.startswith(settings.bot_ignore)

async def plugin_notify_schedule_task(
self, user_name=None, frequency=8, function=None
Expand Down

0 comments on commit 89f274e

Please sign in to comment.