discord bot that accepts commands from chat and tallies points, calculates reward tiers, and manages roles
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
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
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
in short, you need to
key
variable in secret.py
in this repo. this is how it logs ingit clone https://github.com/AisiYidingbai/pointinator.git
and then cd
into itpip install -r requirements.txt
secret.py
and copy-paste the secret key from earlier into the "key" variableecho secret.py >> .gitignore
python pointinator.py -o /path/to/files
. it'll log in to your serverthis section lets pointinator run in the background and might be different depending on your system
nano /etc/systemd/system/pointinator.service
whoami
and groups
to find these out
[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
. you might need to sudo
systemctl enable pointinator
systemctl start pointinator
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
give othergaming
add Yidingbai 40
help
, info
, and points
cd
to the repo folder and run git pull origin
systemctl restart pointinator
systemctl status pointinator
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