Skip to content

Cryptocurrency price check script for Eggdrop IRC bots

Notifications You must be signed in to change notification settings

antsy/cryptocheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Cryptocurrency price check script for Eggdrop IRC bots

What the title says, Eggdrop IRC script which will fetch prices of cryptocurrencies and display the current value and last 24h change percentage.

Usage

Message the bot !crypto command to get current price of the coin in Euros. Command works both as private message or as public message in any channel which your bot is listening. The value will be read from the Coingecko's API. Please refer to the Coingecko API documentation to get the names of the coins. If you prefer dollars💵 over euros💶 just edit the outputCurrency and outputSymbol values of the script.

Installation

Save the script file somewhere where your Eggdrop has read access to it. Add the script to your bot's configuration file with source <path> line. Run .rehash in party line, but be aware that if the script doesn't manage to load properly (perhaps the required libraries are not found?) your bot will crash! Or alternatively you can simply restart your bot.

Possible problems

If you already have Eggdrop (The IRC bot), Tcl/Tk (Required to run scripts with the bot), Tcllib (Required to handle JSON) and Tls (Required to access HTTPS) you should be fine using the script as it is.

However if you are running TCL in an environment where you don't have root access you might have problems including the Tcllib in your auto_path path definition. In that case you need to add the Tcllib via include in the script itself. Adding a line lappend auto_path /path/to/your/copy/of/tcllib/lib at the beginning of your script file should do the trick. If there is a better way of adding Tcllib to Tcl path, please let me know.

Thanks

Due to finnish law, it might be illegal to ask for tips (nobody seems to know for sure). However, it's not illegal to receive some.

  • BTC: 3P7mfD1dCebi1LPEDByk5Q68bPDPzgLUD1
  • ETH: 0xE511275174FA446735AECE520717aaD5932e47e2
  • XRP: rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg:2205678536