A simple Discord Bot that uses the free CryptoCompare API to display cryptocurrency prices

Overview

What is this?

This is a simple Discord Bot coded in Python that uses the free CryptoCompare API to display cryptocurrency prices Discord Crypto Bot

Download

Use git to clone the repository or just download it as a ZIP

git clone https://github.com/kevintr303/Discord_Crypto_Bot

Installation

The only external Python libraries that are needed are:

pip3 install discord.py
pip3 install cryptocompare

Next, create your bot on Discord. Afterwards, you need to set the environment variables.

  • Set "CRYPTOCOMPARE_API_KEY" to your CryptoCompare api key which you can get here for free (100k calls monthly, 250k cap).
  • Next, set "TOKEN" to your Discord Bot's token.

Usage

In the script, there are some simple settings you can change:

# Settings:
base_command = "$cb"
bot_channel = "crypto_tracker"
# End of settings--

The base_command variable is the command people will use for the bot, and bot_channel is the name of the channel where the bot works. The main command of the bot: $cb will show all the current commands that exist. For ease I will also list the commands here: (make sure to have exact capitalization and formatting)

  1. $cb lists information and commands
  2. $cb [coin] [currency] Usage: $cb BTC USD Shows current price of a coin
  3. $cb history [coin] [currency] [date] Usage: $cb history BTC USD 2021,6,20 Shows historical price of a coin
  4. $cb coins Links to the CryptoCompare website that shows all coin types

Why did I make this?

Well, mostly for fun and as a learning experience. I wanted to create something that might be useful and thought, "hey, bitcoin's pretty popular right now. I should make a discord bot that tells you the current price," And so I did. This also marks my very first repository on GitHub(and first Discord bot). At the time of writing this, I have been learning Python for about 4-5 months now, so the code isn't the greatest.

What did I learn?

From this, I learned about environment variables and how to use them, how to create discord bots, github repositories and git, and event handling using Python decorators. That's a win if you ask me, to future projects we go! (Although I might revisit this in the future to improve on my code!)

License

MIT

Owner
Kevin
Kevin
This is a script to forward forward large number of documents to another telegram channel.

ChannelForward 😇 This is a Script to Forward Large Number of Documents to Another Telegram Channel. If You Try to Forward Very Large Number of Files

Anjana Madushanka 10 Jun 08, 2021
A AntiChannelBan Telegram Group Bot Open Source

AntiChannelBan This is a Anti Channel Ban Robots delete and ban message sent by channels Deployment Method Heroku 𝚂𝚄𝙿𝙿𝙾𝚁𝚃 CREDIT BrayDen Blaze

✗ BᵣₐyDₑₙ ✗ 14 May 02, 2022
Django3 web app that renders OpenWeather API data ☁️☁️

nz-weather For a live build, visit - https://brandonru.pythonanywhere.com/ NZ Openweather API data rendered using Django3 and requests ☀️ Local Run In

Brandon Ru 1 Oct 17, 2021
A Telegram user bot to count telegram channel subscriber or group member.

Subscriber Count Userbot A Telegram user bot to count telegram channel subscriber or group member. This tool is only for educational purpose. You coul

IDNCoderX 8 Nov 30, 2022
NiceHash Python Library and Command Line Rest API

NiceHash Python Library and Command Line Rest API Requirements / Modules pip install requests Required data and where to get it Following data is nee

Ashlin Darius Govindasamy 2 Jan 02, 2022
domhttpx is a google search engine dorker with HTTP toolkit built with python, can make it easier for you to find many URLs/IPs at once with fast time.

domhttpx is a google search engine dorker with HTTP toolkit built with python, can make it easier for you to find many URLs/IPs at once with fast time

Naufal Ardhani 59 Dec 04, 2022
Python library for using SMS.ir web services

smsir smsir is a Python library for using SMS web services www.sms.ir Installation Use the package manager pip to install smsir. pip install smsir Usa

mohammad reza 2 Oct 14, 2022
Python client for the iNaturalist APIs

pyinaturalist Introduction iNaturalist is a community science platform that helps people get involved in the natural world by observing and identifyin

Nicolas Noé 79 Dec 22, 2022
A Python library for loading data from a SpaceX Starlink satellite.

Starlink Python A Python library for loading data from a SpaceX Starlink satellite. The goal is to be a simple interface for Starlink. It builds upon

Austin 2 Jan 16, 2022
A script to automatically update bot status at GitHub as well as in Telegram channel.

Support BotStatus ~ A simple & short repository to show your bot's status in your GitHub README.md file as well as in you channel. ⚠️ This repo should

Jainam Oswal 55 Dec 13, 2022
Discord Token Finder - Find half of your target's token with just their ID.

Discord Token Finder - Find half of your target's token with just their ID.

Ttawi 2 Apr 07, 2022
PyLyrics Is An [Open-Source] Bot That Can Help You Get Song Lyrics

PyLyrics-Bot Telegram Bot To Search Song Lyrics From Genuis. 🤖 Demo: 👨‍💻 Deploy: ❤ Deploy Your Own Bot : Star 🌟 Fork 🍴 & Deploy -Easy Way -Self-h

DAMIEN 12 Nov 12, 2022
CLI tool that checks who does and who does not follow you back on Instagram

CLI tool that checks who does and who does not follow you back on Instagram. It also checks who you don't follow back on Instagram.

Ayushman Roy 3 Dec 02, 2022
This app is providing you to track some online products' prices via GMAIL.

Price Tracking App variables and descriptions of that code is in Turkish language. but we're working on translate them into English. This app is provi

Abdullah Aslan 1 Dec 11, 2021
Autofilterv5 With Same more Features

Autofilterv5 With Same more Features ✨ Imbd + Index +.....

Selfie SD 8 Oct 21, 2022
Easy to use API Wrapper for somerandomapi.ml.

Overview somerandomapi is an API Wrapper for some-random-api.ml Examples Asynchronous from somerandomapi import Animal import asyncio async def main

Myxi 1 Dec 31, 2021
ANKIT-OS/TG-MUSIC-PLAYER a special repository. Its Is A Telegram Bot To Play To Play Music In Voice Chat

🔥 🎶 TG MUSIC PLAYER 🎶 🔥 The owner would not be responsible for any kind of bans due to the bot. • ⚡ INSTALLING ⚡ • • 🛠️ Lᴀɴɢᴜᴀɢᴇs Aɴᴅ Tᴏᴏʟs 🔰 •

ANKIT KUMAR 1 Dec 27, 2021
Streaming Finance Data with AWS Lambda

A data pipeline consisting of an AWS lambda function reading data from yfinance API, an AWS Kinesis stream to receive & store data in S3 buckets and AWS Glue crawler & Athena to run SQL queries.

Aarif Munwar Jahan 4 Aug 30, 2022
Auslesen, entschlüsseln und parsen von Smart Meter Telegrammen

Netz-NÖ SmartMeter-P1-Reader https://www.netz-noe.at/Download-(1)/Smart-Meter/218_9_SmartMeter_Kundenschnittstelle_lektoriert_14.aspx Dieses Skript en

3 Jan 14, 2022
Credit Card And SK Checker Written In Python

Credit Card And SK Checker Written In Python

Rimuru Tempest 57 Jan 08, 2023