Skip to content
LEARNERS-PALPublic

About

A WhatsApp Bot to Replicate course rep duties in a Group

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

37 Commits

Folders and files

Repository files navigation

Courserep

 

Courserep

Github top language Github language count Repository size License Github issues Github forks Github stars

Status

🚧 Courserep 🚀 Under construction... 🚧


About   |   Features   |   Technologies   |   Requirements   |   Starting   |   Contributors


🎯 About

This is a WhatsApp bot that helps you to get the latest updates from your course reps. It is intended to assist the course reps in their duties and to help students get the latest updates from their Lecturers.

It is built using TypeScript, Node.js, Express, MongoDB and Wweb.js.

Prerequisites

✨ Features Checklist

  • Send reminders on lectures and tutorials
  • Send reminders on assignments, tests and quizzes
  • Send daily weather reports
  • GPA calculator
  • Used as dictionary
  • Random jokes and quotes to make chat more lively
  • ...............

🚀 Technologies

The following tools were used in this project:

✅ Requirements

Before starting 🏁, you need to have Git and Node installed.

🏁 Starting

  1. Clone the repo
git clone https://github.com/learners-pal/courserep.git
  1. Install NPM packages
npm install
  1. Create a .env file in the root directory and add the following
MONGO_URI=<your_mongo_uri>
  1. Run the app
npm run bot

📝 Bugs 🐛

On start up, you are likely to get an error like this:

Error: TypeError: Cannot read property 'collection' of undefined in MongoStore ........

This is because the MongoStore is not yet connected to the database. To fix this,

  1. Open the node_modules/wwebjs-mongo/src/MongoStore.js file and make the following changes on line 10 and 11
    # Before
      let multiDeviceCollection = this.mongoose.connection.db.collection(`whatsapp-${options.session}.files`);
      let hasExistingSession = await multiDeviceCollection.countDocuments();

    # After
      let multiDeviceCollection = this.mongoose.connection.db?.collection(`whatsapp-${options.session}.files`);
      let hasExistingSession = await multiDeviceCollection?.countDocuments();
  1. Open the node_modules/whatsapp-web.js/src/util/Injected.js file and make the following changes on line 28
  # Before
  window.Store.QueryExist = window.mR.findModule('queryExists')[0].queryExists;

  # After
  window.Store.QueryExist = window.mR.findModule('queryExists')[0] ? window.mR.findModule('queryExists')[0].queryExists : window.mR.findModule('queryExist')[0].queryWidExists;

📝 Contributioin

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)

📝 Contributors

These are the great people who contributed to this project.

 

Back to top

About

A WhatsApp Bot to Replicate course rep duties in a Group

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages