Quite self-explanatory, fill in some essential information, run the script then input a couple values and it will notify you in the Discord server channel that you chose using webhook when your BTC TXID is confirmed in the blockchain.
- python3
- dhooks
- Your own Discord Webhook URL
- Install Python from python.org.
- Go to releases to download & extract the
Source code.zip
file. Make sure all the files are inside the same folder. - Install
requirements.txt
using Pip.Navigate into the folder using
cd
in your CMD (Windows) or terminal (Unix). Look it up if you're unsure how to do that. Once inside the folder dopip install -r requirements.txt
for Windows. For Linux/Mac dopip3 install -r requirements.txt
. If you encounter an error here then you did something wrong while installing Python. - In Discord, go to
User Settings
->Appearance
-> scroll until you findAdvanced
category -> enableDeveloper Mode
. (Picture example.) - In Discord, create a new server. Create a channel where you want to display the message when your TXID confirms (must be a text channel). Go to that channel's settings ->
Integrations
-> in Webhooks category clickCreate Webhook
. Change name & avatar if you want to. (Picture example.)Do not share the webhook URL with anybody.
- Open
settings.json
from the folder you downloaded and extracted. - Go to the webhooks settings in Discord just like before and copy the webhook URL, (picture example), then replace the text inside the quotations after
"webhook":
insettings.json
file with the webhook URL you just copied. KEEP the quotations around the URL.Your
settings.json
file should look something like this now.{ "webhook": "https://discord.com/api/webhooks/.../...", "userID": REPLACE_THIS_TEXT_WITH_YOUR_DISCORD_ID___DO_NOT_PUT_ANY_QUOTATIONS_HERE }
The '...' portion is different for each webhook URL.
- Go back to the server you created and right click your profile from the member list. Click on
Copy ID
(picture example) and paste that after"userID":
insettings.json
. DO NOT put quotations around this.Your
settings.json
file should look something like this now.{ "webhook": "https://discord.com/api/webhooks/.../...", "userID": 362181701373263875 }
Each user has an unique userID; yours should be different from the example above.
- Save the
settings.json
file and close it. In most cases you'll never need to touch it ever again. After you're done tweaking thesettings.json
once again make sure that all files are inside the same folder. - Open your terminal, or command prompt for Windows (no need to open as admin), and navigate inside the folder just like in step 3.
- Once inside the folder, type
python main.py
for Windows orpython3 main.py
if you're on Linux or Mac to run the script. Follow what the script prompts from then on.
- If you ever delete the server, channel, or start using new Discord account you'll have to update settings.json accordingly.
- While inputting TXID, only input the TXID/hash not a URL. For example, do not put in
https://www.blockchain.com/btc/tx/5d9ef693d41cb3bb4c6d98e70ea8b2cc91be29a804245a06ec8761d9cddc103c
, instead just input5d9ef693d41cb3bb4c6d98e70ea8b2cc91be29a804245a06ec8761d9cddc103c
. - If you don't say how frequently you want to check the blockchain, a 'default' interval will be set which is set to check every 60 seconds. Quickest you can check is 30 seconds but since this is open source you can obviously edit that value yourself. I wouldn't recommened going lower as you might get your IP banned from the API but do as you wish not my problem.