AisiYidingbai / pointinator

discord bot that accepts commands from chat and tallies points and calculates reward tiers
Creative Commons Zero v1.0 Universal
4 stars 5 forks source link

pointinator

discord bot that accepts commands from chat and tallies points, calculates reward tiers, and manages roles

roles supported

Vell, Sailies, Guildbosses, Khan, Leeching, PvP, Atoraxxion, Othergaming, Black Shrine

yep this bot is designed for bdo. there's no reason you can't use it for other things though

points features

pointinator listens for commands and keeps counts of points. use add Yidingbai 40 to give flat points, split Yidingbai Helmutchan 60 to divide points, and payout to calculate the leaderboard

nicknames and shorthand syntax is supported, e.g. a yid 40, s yid helm 60, and p

leaderboard tiering supports logarithmic and logistic scaling and tiers can also be given directly

access to commands is limited by role. anyone with the Officers role gets direct access to pointinator commands. anyone without adds their commands to the queue for approval by an Officer

upon a reset, pointinator remembers the names of participants awarded with at least 1 point or tier from the previous leaderboard

hi helm

so basically you git clone https://github.com/AisiYidingbai/pointinator.git this repo, install python, and then pip install -r requirements.txt, discord.py, numpy, and pandas, and run it.

(to update requirements.txt use pipreqs (pip install pipreqs) inside project folder)

cd pointinator and then copy-paste the secret key into secret.py, bai'll tell you my secrets if you ask nicely

to stop secret.py from updating when you update the repo with git pull origin, add it to your gitignore: echo secret.py >> .gitignore

the syntax is python pointinator.py -o /path/to/files/ and you'll see the dev instance go up in the discord test server automatically

you need to specify a path where the sheets will live with -o, if the sheets aren't there already then pointinator will make them

instructions if you're not helm

in short, you need to

  1. create a bot user
  2. invite it to your server and generate its secret key so that it can log in
  3. install pointinator and install the secret key
  4. let it run in the background
  5. prepare your server
  6. test it out
  7. np enjoy

1. create a bot user

2. invite it to your server and generate its secret key so that it can log in

3. install pointinator and the secret key

4. let it run in the background

this section lets pointinator run in the background and might be different depending on your system

5. prepare your server

pointinator stalks chat in the #points and #roles channels. add them, and add the roles that pointinator manages. the list is at the top of this readme

6. test it out

troubleshooting

tl;dr

git clone https://github.com/AisiYidingbai/pointinator.git
cd pointinator
pip install -r requirements.txt

make an app https://discord.com/developers/applications/

give it bot scope; manage roles, read messages/view channels, send messages, and manage messages permissions; and message content privileged gateway intent, and then invite it to your server

put the bot token in secret.py

echo secret.py >> .gitignore
python pointinator.py -o /path/to/files/

to background pointinator:

nano /etc/systemd/system/pointinator.service
[Unit]
Description=Pointinator
[Service]
ExecStart=python /home/user/pointinator/pointinator.py -o /home/user/pointinator/
User=user
Group=group
[Install]
WantedBy=multi.user.target
systemctl daemon-reload
systemctl enable pointinator
systemctl start pointinator