PetitionCounter lets you keep track of petitions on petition.parliament.uk from Discord.
Jump to a section:
- Features & Commands.
- How to install, setup and run.
- Reporting issues and requesting features.
- Pull requests policy.
Here's what PetitionCounter can do!
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.
This command lets you see the petition information, including signatures, titles, URL, description and author at a glance.
This forces a 'Live status' update.
Check the speed of the bot's websocket connection.
- Clone the repo into an empty directory:
git clone https://github.com/maiacodes/petitioncounter
- Install dependencies:
npm install
oryarn install
- Build the app by running
npx tsc
- 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 -
- Finally, run
node out/index.js
to start the bot.
You can report issues using GitHub issues Just choose an issue template and follow it!
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!