Skip to content

A Discord bot that checks crypto values and alerts the user if a crypto has reached a specific value

Notifications You must be signed in to change notification settings

Persomatey/CryptoAlertBot

Repository files navigation

Crypto Alert Bot

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
  1. Run on Repl.it (or IDE of your choice)
  2. Set up a JSON file with jsonbin.io
    • Set initial value to {"alerts":[]}
    • Click PRIVATE BIN to untoggle (we want it to be public)
    • Click CREATE button
    • Copy the Access URL
  3. In config.json do the following:
    • Paste the JSON's Access URL into the quotation marks of the json variable
      • Add /latest at the end of the URL
    • Type the character you want to be the prefix of every command in the prefix variable
    • Paste the bot's token into the quotation marks of the token variable
    • 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 key variable
  4. Run the replit app (or run app in IDE of choice)
    • (Optional) For 24/7 pinging at 5 minute intervals, check out UptimeRobot
  5. Set some alerts!
Credits
Miscellaneous
Some fun alternate logos I came up with. Feel free to use for your bot if you want.
  • Included .psd file in this repo in case you want to make your own.
  • Original
  • Matrix
  • Pride
  • X.A.N.A.
Change List
CL-000007
  • Made the following changes:
    • Made it so that users can not use the deletealert command on an alert that they did not set
    • Deprecated the deleteallalerts command 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 allalerts command 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

Support

Your support is completely optional.

However, if you want to buy me a cup of coffee (or a new house), you can do so by sending Bitcoin to this address:

  • 3BXqPxqXkKxFib4TSQychhuEi6euSspCK2

About

A Discord bot that checks crypto values and alerts the user if a crypto has reached a specific value

Resources

Stars

Watchers

Forks

Contributors