A Discord bot that checks an asset's value and alerts the user if an asset has reached a specific value
How To Set Up
(or IDE of your choice)
- Set up a JSON file with jsonbin.io
- Set initial value to
{"alerts":[]}- Click
PRIVATE BINto untoggle (we want it to be public)- Click
CREATEbutton- Copy the Access URL
- In config.json do the following:
- Paste the JSON's Access URL into the quotation marks of the
jsonvariable
- Add
/latestat the end of the URL- Type the character you want to be the prefix of every command in the
prefixvariable- Paste the bot's token into the quotation marks of the
tokenvariable- Navigate go to https://jsonbin.io/api-keys and copy the X-Master-Key
- Paste the X-Master-Key into the quotation marks of the
keyvariable- Run the replit app (or run app in IDE of choice)
- (Optional) For 24/7 pinging at 5 minute intervals, check out UptimeRobot
- Set some alerts!
Credits
- Programmed by Hunter Goodin
Miscellaneous
- A good online IDE to run this code on is Replit
- Alternatively can also be run via any IDE such as Visual Studio, VS Code, Atom, etc
- A good 24/7 pinger with 5 minute pings is UptimeRobot
Change List
CL-000007
- Made the following changes:
- Made it so that users can not use the
deletealertcommand on an alert that they did not set- Deprecated the
deleteallalertscommand in favor of this new direction- Edited the README to reflect the above changes
CL-000006
- Made the following changes:
- Made it to where the
allalertscommand will only display alerts from the user who sent that command for anonymity- Edited the README to reflect the above changes
CL-000005
- Made the following changes:
- Fixed references to commands in all mesages to include the config's prefix instead of !
- allalerts
- check
- deletealert
- setalert
- Fixed bug where the check command wouldn't message an error if there are no arguments
- Cleaned up code
- Got rid of unused variables
- Cleaned up some comments
- Etc
- Edited the README to reflect the above changes
CL-000004
- Made the following changes:
- Fixed bug where if you put an invalid amount in the 'setalert' command, it'll say that it's not a valid amount in USD
- Because the user might not always want to use USD
- Now, it'll just say "not a valid amount. --"
- Changed the activity message to include whatever the prefix the user has set in config
- Instead of just '!' like it was before
- Made it so that instead of .txt documents, it now reads and writes from a public json file using jsonbin.io
- Changed the help command embed:
- It now displays the prefix set in the config
- Fixed how the setalert command just said alert
- Rearranged some of the information so that the examples are right under the arguments usage
- Added a section for aliases
- Added an alias for the check command
- value
- Added aliases for the help command
- helpme
- commands
- Edited the README to reflect the above changes
CL-000003
- Made the following changes:
- Fixed bug where it wouldn't delete the alert if it used the "below" operator
- Removed title from !help message
- Added bold 'headers' on top of the list of commands and the usage in !help message
- Rewrote the system to where it now stores the alert data in a .txt document instead of just in memory
- Made it to where it now checks every 3 seconds.
- However, alerts that are deleted automatically take up to 3 seconds to actually delete
- Edited the README to reflect the above changes
CL-000002
- Made the following changes:
- Fixed bug in !setalert command where it displays $ next to amount
- That doesn't make sense if we're talking about a non-dollar like BTC for example
- Edited the README to reflect the above changes
CL-000001
- Made the following changes:
- Fixed how the !help command displays the !setalert command as !alert
- It used to be just !alert but I changed it to !setalert and forgot to change this
- Added .replit file
- Added keep_alive.js reference in index
- Added logo for this bot including .psd file in case people want to mess around with it
- Edited the README to reflect the above changes
CL-000000
Initial upload





