Skip to content

tomassirio/BitcoinTelegramBot

Repository files navigation

BITCOIN-TELEGRAM-BOT

· Report Bug · Request Feature ·

BitcoinTelegram is a simple Telegram Bot to consult BTC's price over Telegram. It's written in Golang with Telebot's Framework

Table of Contents
  1. Inspiration
  2. Getting Started
  3. Usage
  4. Contribution Guidelines
  5. Who Am I?

🎉 Inspiration

Over the last couple of months I grew fond of Golang, Telegram and Bitcoin. So I decided to combine those three elements to create something that could get a little bit of each world. Hence, Bitcoin-Telegram-Bot (in Golang) was created

⭐ Getting started

What you will need:

  • You are going to need a computer or server where to host the bot.
  • Git
  • Golang v1.13
  • A device with Telegram

💻 Installation

Open a Terminal and copy these commands (Linux & Mac devices):

cd ~
git clone https://github.com/tomassirio/BitcoinTelegramBot.git
cd ./BitcoinTelegramBot
mv .env.example .env
go get github.com/tomassirio/bitcoinTelegram
go run main.go
Warning:

This won't work unless you replace the REPLACE_WITH_TOKEN on the .env file with the Token granted by @BotFather

✅ Add BTB to your Telegram Channel

Open @BotFather on telegram and create a new bot with it's /newbot command.

Assign it a name. This name won't be the one that is shown on each message, so you can name it whatever you want.

@BotFather will grant you a Token. This token is the one that will replace the REPLACE_WITH_TOKEN on the .env.example file on this repository. (Don't forget to rename that file to .env)

image

You can also play a little bit more with @BotFather. For example you can use the /setcommands to define the uses your bot has on the '/' icon:

price - Gets BTC actual price
historic - Gets a percentage between Today's and Yesterday's price
summary - Gets both the price and historic values

image

🔋 Usage

Once the bot is running and added to your Telegram Group, you can use any of the following commands:

    * /price : Get's bitcoin's Last price
    * /historic : Gets a percentage between Today's and Yesterday's price
    * /summary : Gets both the price and historic values

🏗️ Contribution Guidelines:

  • fork and clone this repository
  • Make a new branch using git checkout -b change/username
  • Commit the desired changes to that branch
  • Sign off your commits using git commit -s -m w/signoff
  • Push your changes to the branch and open a pull request -->

👤 Who Am I?