This repository has been archived by the owner on May 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
Add Telegram Notifications to your Yield Generator
Adlai edited this page Jul 10, 2020
·
5 revisions
NOTE: Although the approach described in this guide is still doable, it was written for an early version of joinmarket, and the code is not updated for the latest version
NOTE: This Guide is for advanced users. If you have never touched code or know how to indent python you should not be doing this. While the risk of losing coins is basically zero touching code and changing things is never a good idea if you don't know what you are doing.
- In Telegram open a Chat with @BotFather
- Type
/newbot
and follow the instructions - Copy the http access token
- Find your chat ID
- Copy the code from this Pastebin, save it as ChatID.py, add your access token and run it using
python ChatID.py
. This will start a telegram bot we use to find the chatID between you and the bot - Message your bot with
/getmychatid
, it will reply withChat ID: CHATIDHERE
- You can close the ChatID.py console window
- Copy the code from this Pastebin, save it as ChatID.py, add your access token and run it using
- Install telepot as a dependency using
pip install telepot
- Open
maker.py
in your favorite text editor - Add
import telepot
besides the other import statements at the top of the file - Copy the code from this paste
- Paste it between the lines
log.info('earned = ' + str(self.real_cjfee - self.txfee))
andto_cancel, to_announce = self.maker.on_tx_confirmed(self, confirmations, txid)
. Make sure all lines have the same indentation as the lines you pasted between - Change the placeholders to your API-Key and chatID.
- Restart the Yield Generator script