Installation

Installation guide for our application.

Setting up Etmc bot is straightforward, with options to clone the repository. Etmc-bot requires Node.js version 18 or higher for optimal performance.

Clone Repository

To get started, you can clone the Etmc-bot repository directly from GitHub.

1

Step 1: Clone the Etmc-bot Repository

Begin by cloning the Etmc-bot repository from GitHub:

git clone https://github.com/mbieeh5/etmc-bot.git
2

Step 2: Access the Project Directory

After cloning, navigate into the project directory to start setting up:

cd etmc-bot
3

Step 3: Install Required Dependencies

Install all necessary project dependencies with npm:

npm install

Setup Firebase

Etmc-bot need database to store data like point, name, level etc.

1

Step 1: Setup Your Firebase

Firebase setup your Project and Etmc-bot only needed the Realtime Database and you can used our Template for the Database if you dont know what ever you do.

2

Step 2: Import The Template Database

  • Go to Realtime Database
  • Click the 3 dot beside database URI
  • Import the template JSON.
3

Step 3: Get Your JSON Firebase

  • Go to Project Settings in Firebase and choose Service account
  • And Generate new private key for download your Json
  • Rename it as you want
  • and edit the Config/config.js
  const serviceAccount = require('../youJsonName.json');

*Optional Setup Gemini

If you want integrate your Bot with AI, i used Gemini only for QnA section for !tanya Command.

1

Step 1: Setup Your Firebase

Setup your Gemini AI until you get the API key and replace the GEMINI_API_KEY in .env with your API key.

Last Step: Start Your Bot

npm run rraf

Scan The Barcode

if the Barcode appear, scan from your Whatsapp:

  • Open Whatsapp.
  • Make Sure you used second number you have(not Recommended for Main Number).
  • Go to 3 dot Top Right.
  • Linked devices.
  • Than Scan it.
  • After that the bot start checking the command
  • if you see the Server Restart Done Status: *ONLINE* Reset Absen: *OK* Loaded Commands: *Finish* The Bot Ready to go.