Go to file
Auri eff762b131 Merge branch 'master' of https://github.com/Aurailus/k9 2021-05-05 12:00:48 -07:00
assets K9 is up again baybee 2021-03-14 16:15:56 -07:00
src Debug message when it fucks up 2021-05-05 11:59:52 -07:00
.gitignore K9 is up again baybee 2021-03-14 16:15:56 -07:00
LICENSE.md New assets for K9? 2020-11-01 14:17:53 -08:00
README.md Update README.md 2021-03-17 15:12:22 -07:00
conf.example.toml Update conf.example.toml 2021-03-17 15:39:07 -07:00
nodemon.json New level algorithm, k9 level command, k9 setxp command. 2021-03-12 16:11:31 -08:00
package-lock.json Fix stuff 2021-03-14 17:06:50 -07:00
package.json Fix stuff 2021-03-14 17:06:50 -07:00
tsconfig.json WIP Big refactor, using Mongoose now, refactor Plugins & Commands. 2021-03-11 23:51:28 -08:00

README.md

K9

A minimalist level-tracking Discord bot. Woof!

Releases Commit Activity Join Discord Support on Patreon


K9 is a self-hosted, minimalist level tracking Discord bot. It tracks post frequency in a persistent database, assigning experience to posts which contributes to a total user level. This user level is used to apply custom roles to award active users.

An example of this functionality can be seen in Auri's Den.

Dependencies

  • NodeJS 12+
  • NPM
  • MongoDB

Installation

  1. Clone this repository: git clone https://github.com/Aurailus/k9
  2. Install node dependencies: npm install
  3. Copy conf.example.toml to conf.toml
  4. Put a valid discord token and other configuration details in conf.toml.
  5. Run the bot: npm start

Configuration

To allow the bot to start, track levels, and give role rewards, fill out conf.toml with the missing credentials. An example and explanation of all the variables are shown below.

Example:

[auth]
# A Discord Bot token
discord = "token"
# MongoDB URL
mongo_url = "mongodb://host/database" 

[options]
# Custom status
status = "Hanging out"
# Command prefix
prefix = "/" 
# Delete commands after execution
delete_triggers = true  

[plugin.level]
# Bot responds to "good dog" after ranking up.
please_and_thank_you = false 

[plugin.level.message]
# Cooldown time
cooldown = 30 
# Minimum message length
min_length = 30

[plugin.level.experience] 
# https://www.desmos.com/calculator/80hyi0deu6
# First level XP offset.
a = 15 
# Larger values makes XP / level higher.
b = 6.5 
# Larger values make XP / level exponentially higher.
c = 1.5 

[[plugin.level.roles]]
# Level to acquire role
level = 1 
role = "RoleID"
[[plugin.level.roles]]
level = 2
role = "RoleID"
[[plugin.level.roles]]
level = 5
role = "RoleID"

Contributing

If you would like to contribute, please follow the code style used in the existing source files, and indent with tabs. Once you are done submit a pull request outlining what you have changed / added and why it should be implementing into the bot.




© Auri Collings, 2021. Made with <3

Licensed under the Apache License, Version 2.0.