Git Product home page Git Product logo

petitioncounter's Introduction

PetitionCounter for Discord

PetitionCounter lets you keep track of petitions on petition.parliament.uk from Discord.

Jump to a section:

Features & Commands.

Here's what PetitionCounter can do!

Live status

In the bot's 'playing' status, you'll be able to see a quick preview of the amount of signatures a petition has. This updates frequently.

Command: -stats

This command lets you see the petition information, including signatures, titles, URL, description and author at a glance.

Command: -update

This forces a 'Live status' update.

Command: -ping

Check the speed of the bot's websocket connection.

How to install, setup and run.

  1. Clone the repo into an empty directory: git clone https://github.com/maiacodes/petitioncounter
  2. Install dependencies: npm install or yarn install
  3. Build the app by running npx tsc
  4. Create a file called .env in the directory and enter the bot's environment variables:
TOKEN=
PETITION_ID=
PREFIX=

For TOKEN=, enter a Discord bot token, which you can get at discord.com/developers.

For PETITION_ID=, enter the ID of the petition you'd like to track. The ID can be found in the URL of the petition, it's going to be a 6~ digit number.

For PREFIX=, you can enter the prefix for commands. This is an optional variable, if you don't enter anything it will default to -

  1. Finally, run node out/index.js to start the bot.

Reporting issues and requesting features.

You can report issues using GitHub issues Just choose an issue template and follow it!

Pull requests policy.

If you're proficient at TypeScript, feel free to make changes following my structure and open a pull request for it to be merged with master. I'm happy with most changes as long as they're consistant with the strucutre of the bot. Thanks!

petitioncounter's People

Contributors

dependabot[bot] avatar maiacodes avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.