Skip to content

Member Counter is a Discord bot which lets you display counts and other dynamic information in a channel name or topic

License

Notifications You must be signed in to change notification settings

member-counter/bot

Repository files navigation

Member Counter

TOP.GG Badge TOP.GG Badge CodeFactor Badge Crowdin Translation Project Badge

Add this bot | Website | Translation Project | Documentation

Member Counter is a Discord bot which lets you easily display counts and other dynamic information in a channel name or topic, to get started, add this bot to your Discord server and type @Member Counter setup, and then read @Member Counter guide to learn how to make more cool stuff with the bot.

See also the documentation to learn about every feature of the bot

Self-host

Read this guide to setup this bot using docker: https://docs.member-counter.eduardozgz.com/guides/how-to-self-host-member-counter

Development environment

Software requirements

Clone the bot and install dependencies

git clone -b dev git@github.com:eduardozgz/member-counter-bot.git
cd member-counter-bot
npm install

Create a .env file

Create a .env file from the .env.example file:

cp .env.example .env

Open .env with a text editor and set at least DISCORD_CLIENT_TOKEN with your development bot token

Remember that you can't hot-reload this file, you must fully restart the bot to apply new changes

Starting the bot

npm run dev:docker

Now you can start editing the code, when you save a file the bot will be reloaded automatically

Adding/editing text

In English:

  • To add or edit a string, you must do it in the ./src/lang/en_US.json file, after that, you may want to run npm run generateLPTypings to avoid compilation errors

In other language:

  • To add a string: First add it in english in the ./src/lang/en_US.json file, then commit the file to the dev branch and it will be available in the translation project in the next 10 minutes
  • To edit a string: You must do it trought the translation project, if your language isn't there, contact me and I will add it

Commiting

Commit

Stage your changes and add a short and descriptive commit message

Pre-commit

The following tasks will be run automatically when you create a commit

  • Create language pack typings with npm run generateLPTypings
  • Prettify the code
  • Stage the previous changes

Do a pull request

Now just create a pull request to the dev branch, and we will review it as soon as possible

Happy coding!

Contributors