CyberPunkMetalHead / gateio-crypto-trading-bot-binance-announcements-new-coins

This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio
MIT License
1.21k stars 302 forks source link

Telegram notifications broken? #178

Open strowi opened 2 years ago

strowi commented 2 years ago

Hi,

Describe the bug Should the telegram notifications be working currently with the latest master? I followed the instructions, running the bot in Docker, but not getting any telegram related logs or notifications.

To Reproduce Steps to reproduce the behavior:

~> cat config.yml
...
  TELEGRAM:
    # set to True to enable telegram notifications
    ENABLED: True
    # Disable / Enable specific notifications
    NOTIFICATIONS:
      STARTUP: True 
...
~>
cat auth.yml
  telegram_token: "yxz"
  telegram_chat_id: "123"
...

Expected behavior Telegram notifications showing up / Log Entries in INFO or DEBUG mode

regards, strowi

YVINEE commented 1 year ago

Hi, There is a bug in the file send_telegram.py. Replace: requests.get( f"""https://api.telegram.org/bot{bot_token}/sendMessage ?chat_id={bot_chatID} &parse_mode=Markdown &text={record.message}""" ) By: url = f"""https://api.telegram.org/bot{bot_token}/sendMessage?chat_id={bot_chatID}&parse_mode=Markdown&text={record.message}""" requests.get(url)