Skip to content

slymachenko/pepe-homework-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pepe-homework-bot 🐸

Node version Node-telegram-bot-api Mongoose Dot-env

Telegram bot for easy access to homework for week
Created with node-telegram-bot-api

Setup

  • Clone git repository:
    git clone https://github.com/slymachenko/pepe-homework-bot.git
  • Open project root directory.
  • Create config.env file that must contain:
TOKEN=*Telegram bot token*
MONGO_URL=*MongoDB connection string*
PORT=*PORT*
URL=*Webhook URL*
  • Download all dependencies:
    npm install
  • Start ngrok:
    npx ngrok http *PORT*
  • Start bot with
    npm start
    or
    npm run start-dev

Usage

  • Find @your bot id in telegram search
  • Click Start

Command list

For new users:
/start - start the bot
/help - help information
/create *className* - creates class with specified name

For class members:
/leaveclass - leave the class
/classinfo - get information about the class (name, members, invite link)
/show - shows homework (all, for the day, for the specific subject)

For class admins:
/deleteclass - delete the class
/promoteuser - promote user to an admin
/demoteuser - demote user to a regular class member
/addsubject - add subject on specified day with specified name and index
/removesubject - remove subject from specified day
/note - note homework on specified subject
/clear - clear homework on specified subject

Releases

No releases published

Packages

No packages published