Introduction
Token Nova is a Telegram bot designed to provide real-time cryptocurrency prices. It utilizes the CoinMarketCap API to fetch accurate pricing data.
Getting Started
To run Token Nova bot on your machine, follow these steps:
-
Clone the Token Nova repository to your local machine:
git clone https://github.com/EliotCodes/TokenNova.git
-
Install the necessary dependencies:
cd TokenNova npm install
-
Create a bot on Telegram using BotFather and obtain your bot token.
-
Set the bot token in the
.env.example
file. -
Obtain your CoinMarketCap API key from here.
-
Set the API key in the
.env.example
file. -
Rename the
.env.example
file to.env
. -
Start the bot:
node index.js
Configuration
You can configure the behavior of the bot using the config.js
file located in the src
folder.
Example config.js
file:
module.exports = {
adminUsername: "EliotCodes",
BOT_TOKEN: "",
API_KEY: "",
botMode: "polling",
webhookDomain: "https://yourdomain.com",
webhookPort: 3000
}
The botMode
can be either "polling" or "webhook," with "webhook" recommended for production environments.
For webhook
mode, set your webhookDomain
to your bot's hosting domain and webhookPort
to the desired port.
Usage
After setting up the bot, access the bot you created with BotFather on Telegram and send the command /start
to view available commands and start using Token Nova to get real-time cryptocurrency prices.
Demo
You can test the functionality of Token Nova by accessing the Token Nova Bot on Telegram. Send the /start
command to begin using the bot and explore its features for retrieving cryptocurrency prices in real-time.