Skip to content

fixmyrights/discord-bot


๐Ÿค– Discord Bot

GitHub top language License GitHub package.json version CircleCI Coveralls github branch

Features

  • Right to Repair bill tracking and notifications (via the Legiscan API)

Preview

Preview

Available Commands

Command Description
!ping Do you really need an explanation?
!help Shows this list of commands.
!bill help Shows available bill commands.
!config help Shows available configuration commands.

Development

Requirements

  • Node.js 'Erbium' (LTS) a.k.a version 12

Installing / Developing

  1. Install Node.js (version 12 or higher)
  2. npm install or npm i
  3. cp .env.template .env
  4. Then edit your .env file with the right informations (note to maintainers: see GitHub repository secrets)
  5. npm start
  6. Happy coding ๐ŸŽ‰๐Ÿ™Œ

Available Tasks

Task Description
npm run debug Launches ndb for you.
npm start Starts the bot.
npm run lint Lints the code-base with ESLint (but doesn't fix linter complaints for you)
npm run lint:fix Lints and tries to fix complaints for you.
npm run lint:conflicts Checks for Prettier/ESLint conflicts.
npm run fmt Re-formats the code-base using Prettier.
npm run fmt:check (CI) Checks if some source files need reformatting.
npm run fix Runs both formatter and linters. Kowabunga!
npm test Runs the Jest unit test suite.
npm run test:clear Clears Jest cache.
npm run test:watch Same as npm run test but with the --watch- option.
npm run test:e2e Runs the Jest end-to-end test suite.

Conventions

Convention Scope
StandardJS ECMAScript

Frequently Asked Questions

Can I use it to watch for other types of bills?

Yes. The only additional step is setting a different query string by initializing database/database.json to this (using E-bikes as an example):

{
  "config": {
    "query": "ebike OR \"electric bike\""
  }
}

Why ECMAScript and not [my-favorite-language]?

That's a good question! Initially, the proof of concept was written in Rust by Yugo & joaodforce, while Rust is an incredible c-speed and memory-safe language it was not a highly accessible one. To maximize the chance of getting contributions from the community, one of the many existing projects was promoted and ECMAScript was chosen.

Contribution

Please make sure to read the Contributing Guide before making a pull request.

Thank you to all the people who already contributed to this project!

Acknowledgements

License

This project is licensed under BSD 2-Clause.