Real time stock ticker for Discord ๐
(Randomly selected stocks. This is not a financial advice)
Version 2 completely rewritten in Deno. Now supports Discords new slash commands (and more than 9 Stocks).
TOKEN = "yourToken" # your discord bot token
CURRENCY = "EUR" # ISO 4217 3-digit currency code f.e. EUR, USD, ...
Requiered build flags:
--allow-read
--allow-env
--allow-net
--allow-write
deno compile --allow-read --allow-env --allow-net --allow-write --target x86_64-pc-windows-msvc --output ticker_windows_x86_64 main.ts
deno compile --allow-read --allow-env --allow-net --allow-write --target x86_64-unknown-linux-gnu --output ticker_linux_x86_64 main.ts
Download the latest version from the release tab (or build it yourself).
Create a .env
file and provide the needed values as shown above.
Run the program.
Invite your bot (make sure to give it the application.commands
scope).
/setup 'Role' - Setup the Ticker in the current Channel. Gives 'Role' permission to use /add and /remove.
/add 'Symbol' - Adds a Symbol to the stock ticker.
/remove 'Symbol' - Removes a Symbol from the stock ticker.
To find a stock symbol go to Yahoo finance.