❗ If you find this project helpful in any way, let me know on Twitter @niallgillmor!
Lightweight discord webhook intended to be run on schedule to post webhooks to a specific Discord channel alerting new ASX announcements for a set watchlist.
- Download or clone the repo.
pip install
the dependancies/requirements listed below.- Add the tickers of the companies you wish to watch to the example.config.ini file as show below.
- Create a webhook in the Discord channel you wish to post announcements to. Follow this guide on how to create a webhook.
- Using the newly created webhook URL, set the id and token in the example.config.ini file. Your ID and token are taken from the webhook URL as follows:
https://discord.com/api/webhooks/
id/
token. - Save your changes to the example.config.ini file and rename the newly saved example.config.ini file to
config.ini
. - Run the main.py script.
NB: If you wish to schedule the script to run, I would suggest following a tutorial like this.
- requests
- json
- sqlite3
- discord
- configparser
- datetime
- Clean up code.
- Add details of installation and setup to README
- Tool to get company's Xids, https://asx.api.markitdigital.com/asx-research/1.0/search/price?itemsPerPage=1&page=0&searchText=eml, check that symbol item is equal to code, then add it in.
- Add config file.
- Parse date.
- Spice up embed.
- Customise pfp and other elements of bot through code.
- Add database and store unqiue.
- Create new table if that company does not already exist.
- Discord bot.
- Fix dynamic embed colour.
- Add ticker/company identify to message for stacked continuous messages.
- On first run, populate database without posting Discord messages for every past announcement.
- Seperate announcements for different stocks into different channels.
- Management of multiple Python installations on personal device and addressing installation conflicts with Homebrew.
- python-discord-webhook module is not async, thus unsuitable for large amounts of Discord webhooks as rate limited.
- Can utilise discord.py to send webhooks without having associated authentication with a bot.
- Using the configparser module.
- Formatting usable READMEs.