pupubird / STC_Telegram_Bot

A Comprehensive telegram bot for Sunway Tech Club

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bot logo

STC Telegram Bot

Status License


πŸ€– A Telegram bot for Sunway Tech Club operations

πŸ“ Table of Contents

🧐 About

As Sunway Tech Club uses Telegram as it's main communication channel, it went harder and harder to manage all the groups and channels, hence, a bot that helps to manage and even generate quick video meeting link is becoming more important.

Why not using Slack? Well, because building a telegram bot sounds cooler 😎.

πŸ’­ How it works

Bots are special Telegram accounts designed to handle messages automatically. Users can interact with bots by sending them command messages in private or group chats. These accounts serve as an interface for code running somewhere on your server.

This bot uses Telegraf as a wrapper to the telegram core API to ease out and smoothen the development process.

The backend: 🀩 Google Sheets as Backend!

🎈 Usage

To use the bot, go to:

https://t.me/sunwaytechclub_bot

and type

/start

🏁 Getting Started

Prerequisites

This program is written in javascript, hence Node.js is required.

Installing

Simply run

npm i

πŸš€ Contribute

To create new command:

  1. Create a new JavaScript file in /commands folder, the script will detect the file and build the endpoint based on the file name
  2. write a function with ctx as argument, and export the function. an example is as shown below:
function test(ctx) {
  ctx.reply("Hello world!");
}

module.exports = test;

to get the bot object

let bot = global.Bot;
  1. And you are good to go! Simply create a new bot from the @BotFather, create a file called .env at the root level and write
BOT_TOKEN=<YOUR BOT TOKEN>
  1. Now, you may start the development server by runnign
npm run dev

...tbc tutorial on integrating spreadsheet (or you may checkout this https://developers.google.com/sheets/api/quickstart/nodejs)

⛏️ Built Using

✍️ Authors

See also the list of contributors who participated in this project.

πŸŽ‰ Acknowledgements

About

A Comprehensive telegram bot for Sunway Tech Club

https://t.me/sunwaytechclub_bot

License:MIT License


Languages

Language:JavaScript 100.0%