This part is needed for the main part of the code to work.
Features that can be toggled:
The counting role will be a role that gets given if the user counted. You can hoist it and move it to the top so people will see who just counted and then also want to count to be displayed at the top of the server.
Enable this feature by setting $countingrole
from 0
to a role id.
This will block any users from getting the counting role if they are currently advertising a discord server in their status, because nobody wants to see ads everywhere they look.
Enable this feature by setting $antiad
to true.
You can toggle if the same user that last counted can count again. That means if $sameuser
is set to true, the same user will be able to count multiple times in a row. If set to false another user will have to count again before you will be able to count.
The counting tracker will track how often a user counted. You can use this together with the codes topcount, counter and pagination which will have to be added in order to display the top people that counted and how often you counted.
Add the main counting command to your server and set it up as shown below. Then configure the variables to your liking.
Trigger | Trigger Type | Code | Dependencies | Custom Command Settings |
---|---|---|---|---|
\A | Regex | Download Link | ❌ | Only run in the following channels (counting channel) |
Add the main counting command to your server and set it up as shown below. Then configure the variables to your liking.
Then add the topcount, setcount, counter and the pagination.
Make sure you set up everything as shown below.
Trigger | Trigger Type | Code | Dependencies | Custom Command Settings |
---|---|---|---|---|
\A | Regex | Download Link | ❌ | Only run in the following channels (counting channel) |
topcount | Command | Download Link | Main counting cc | ❌ |
❌ | Reaction (add & remove) | Download Link | topcount | ❌ |
count | Command | Download Link | Main counting cc | ❌ |
setcount | Command | Download Link | Main counting cc | ❌ |
If you have been using the old counting system from yagpdb before you can use the converter to switch to this updated system. While adding all custom commands and running the converter you shouldn't let any users count and lock the counting channel until the converter and you are done converting and adding all custom commands you want.
If you do not like this code, there is also another counting code on the official custom command website.
I @blackwolfwoof
didn't come up with this idea, nor do I own the full code. The following parts of the code were all made a while ago but I re-uploaded & edited them because the old counting custom command on the YAGPDB Community & Support server was outdated and messy and people kept having issues with it on their servers when adding it.