A discord bot to track user activity in a Discord server.
This bot is currently tracking voice and text user activity into a Discord server.
Invite me! or Join the official rankore Discord server!
- Rust 1.81.0
- Cargo 1.84.0
- Clone this Repository
- Install the db from the docker
docker compose up -d- Add the DB to env
export DATABASE_URL="postgres://postgres:password@localhost:5431/mydb"- Migrate the DB
cargo sqlx migrate run- Build the app
cargo build- Prepare the DB
cargo sqlx prepare- Add your Discord token
export DISCORD_TOKEN=<Your Token Here>- Run run.sh
./run.shor you can use screen
screen ./run.sh!leaderboard: List the users and their points, from the most active to the less active;!download_leaderboard: get a file .xlsx containing a table with all the users and related scores!set_prefix [PREFIX]: Set the prefix for the Discord server in which the bot is running; (After this command the default!prefix will not be active, replaced by the one you set)!get_prefix [PREFIX]: Get the prefix for the Discord server in which the bot is running, (This command will be always available also with the default prefix!)!set_welcome_msg [STRING]: Set the welcome message!reset_scores: Reset leaderboard scores!set_voice_multiplier [INTEGER]: set the multiplier to calculate the points for the voice activity for a user in a Discord server. greater the multiplier, greater will be the wait to add a point to that user. For example, if the admin sets the multiplier to 5, the bot will wait 5 seconds before incrementing 1 point to the user!set_text_multiplier [INTEGER]: set the multiplier for each message, this is simply the points for each message!multipliers: shows theset_voice_multiplierand theset_text_multiplier!help: Get this help message (This command will be always available also with the default prefix!)
Ensure to have a #welcome channel existing in the Discord server!
