Giter Site home page Giter Site logo

ktubot / ktu-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devadathanmb/ktu-bot

0.0 0.0 0.0 163 KB

A telegram bot to view KTU exam results and notifications easily.

Home Page: https://t.me/ktu_results_bot

License: GNU General Public License v3.0

TypeScript 99.62% Dockerfile 0.38%

ktu-bot's Introduction

KTU Bot

Deploy CI

Welcome to the KTU Bot! This Telegram bot helps students check their exam results, find latest KTU notifications and alert users when new notifications arrive.

Find the bot here

Features

  • Check Results: Use the /result command to fetch your exam results.
  • Download latest KTU notifications: Use the /notifications command to fetch KTU notifications and download them.
  • Subscribe to latest KTU notifications: Use the /subscribe command to recieve new notifications as they arrive.
  • Help: Get help using the /help command.
  • Live search notifications: Live search and find KTU notifications using inline queries

Commands

  • /start: Start the bot and get a welcome message.

  • /help: Show a help message with available commands.

  • /result: Fetch your exam results.

  • /notifications: Find and download latest KTU notifications.

  • /subscribe: Subscribe to recieve latest KTU notifications as they arrive.

  • /unsubscribe: Unsubscribe from recieving KTU notifications.

  • /cancel: Cancel current process (only works when inside /notifications or /result wizard)

  • /code : See project source code

Inline Query

Use inline query to live search the notification you want to. No more pain of scrolling through the webpage for the notification.

eg: @ktu_results_bot calendar : This returns all the results that matches word "calendar" like Academic calendars etc.

Getting Started

Running Locally (Without Docker)

  1. Install Node.js and npm on your machine.

  2. Clone the repository:

    git clone https://github.com/devadathanmb/ktu-bot.git
  3. Navigate to the project directory:

    cd ktu-bot
  4. Install dependencies:

    npm install
  5. Set up your Telegram bot token:

    • Create a new bot on Telegram using the BotFather.

    • Copy the bot token.

    • Create a .env file in the project root and add:

      BOT_TOKEN="your-telegram-bot-token"

      See env.example file for example

  6. Create a Firebase project and setup a Firestore database in Firebase console

  7. Download the serviceAccountKey.json file, minify it and base64 encode it using

    jq -r tostring serviceAccountKey.json  | base64
  8. Copy the base64 encoded serviceAccountKey.json string to .env

    FIREBASE_SERVICE_ACCOUNT="base64 encoded string"
    
  9. Set the ENV_TYPE variable to DEVELOPMENT in .env

    ENV_TYPE="DEVELOPMENT"
    
  10. Build the bot:

    npm run build
  11. Start the bot:

    npm run start

Running with Docker Compose

  1. Install Docker and Docker Compose on your machine.

  2. Clone the repository:

    git clone https://github.com/devadathanmb/ktu-bot.git
  3. Navigate to the project directory:

    cd ktu-bot
  4. Create a .env file in the project root and add:

    BOT_TOKEN="your-telegram-bot-token"
  5. Create a Firebase project and setup a Firestore database in Firebase console

  6. Download the serviceAccountKey.json file, minify it and base64 encode it using

    jq -r tostring serviceAccountKey.json  | base64
  7. Copy the base64 encoded serviceAccountKey.json string to .env

    FIREBASE_SERVICE_ACCOUNT="base64 encoded string"
    
  8. Set the ENV_TYPE variable to DEVELOPMENT in .env

    ENV_TYPE="DEVELOPMENT"
    
  9. Run the application using Docker Compose:

    docker-compose up

The bot should now be running and accessible on Telegram.

Contributing

If you encounter any issues, have feature suggestions, or want to contribute to the project, please feel free to fork and make a PR.

Bugs and Feedback

If you find any bugs or have feedback, please open an issue on GitHub.

License

This project is licensed under the GPL 3.0 License - see the LICENSE.md file for details.

ktu-bot's People

Contributors

devadathanmb avatar ktubot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.