Telegram bot for easy access to homework for week
Created with node-telegram-bot-api
- 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
- Find @
your bot id
in telegram search - Click Start
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