Skip to content

GdscCpp/role-bot-serverless

Repository files navigation

GDSC Role Bot Serverless

This is the repository for our new free serverless solution, which replaces our old one that would cost about $2 a month to run on a compute engine instance. It uses a combination of App Script and Cloud Functions to retrieve a list of discord tags from our 2023-2024 General Membership Google Form and apply the General Member role to them accordingly.

Getting Started

  • Clone this repo
  • Install dependencies
npm install --save-exact
  • Download credentials from GCP service account, place it in the root of the cloned directory and rename it to be credentials.json
  • Clone the google app script function using clasp
    • all thats needed from this is the .clasp.json file which is hidden in .gitignore for security reasons

Testing

To test the function locally, run the following command after installing all dependencies:

npm run test

Deployment

To deploy the cloud function, run the following command:

npm run deploy

To deploy the app script, run the following command after installing clasp:

clasp push

To continuously redeploy the app script while making changes, run the following command:

clasp push -wat

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published