Skip to content

Commit

Permalink
💥 fix: fixing error in middlware
Browse files Browse the repository at this point in the history
  • Loading branch information
joaroque committed Aug 5, 2023
1 parent 9e87581 commit df03b93
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,5 @@ cython_debug/

# Ini config file
*.ini
.DS_Store
*.DS_Store
*.session
10 changes: 7 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@ async def on_message(ws):
if channel_id == channel_id_to_monitor and message != '':
logging.info(f"Message received from Discord: {message}")

if should_send(message):
# comment this line if you dont want to use middlware
await send_to_telegram(f"{message}")
# comment this line if you dont want to use middlware
cleaned_message = should_send(message)
if cleaned_message:
await send_to_telegram(f"{cleaned_message}")

# await send_to_telegram(f"{message}")


elif op_code == 9:
logging.info("Invalid session. Starting a new session...")
Expand Down
5 changes: 5 additions & 0 deletions utils/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@


important_keywords = [
"SL",
"TP",
"SELL",
"BUY",
"ENTRY",
"EURGBP",
"AUDJPY",
"EURAUD",
Expand Down

0 comments on commit df03b93

Please sign in to comment.