Releases: TheThobi/PTCGP_RerollManager
v4.4 Role-Based Filters Support & D2Stars fix
If your bot is running on a low-end server like discloud, be sure to have outputUserDataOnGitGist disabled or it might randomly stop at some point without even crashing
Role Based Filters
If you let enableRoleBasedFilters to true in config.js, you'll be outputting the type of packs opened in the ids file
For more information, check Hoytdj 1.5.4 patch note
Double 2 Stars Fix
Thanks for @rushvora the Double 2 stars now are working again if you wish to use them for the SR boosters
There's also a new config.js param to enable D2Stars in the Eligible GP List for GP Test
Small fixes
- If you used forceSkipMin2Stars & forceSkipMinPacks it will not be applied to SR as eligible ones are more difficult to find
- Added some keywords to filter out generated usernames
- Fixed some text & stuff
v4.2 SR Support & Anti Cheat Improvements
Selected Packs
- Shining Revelry Support
Anti-Cheat
- The Anti-Cheat can now be disabled in config.js
- To calculate the Anti-Cheat PPM, the calculation now uses the heartbeat pack type (3 Pack/5Pack) and if it's not found in heartbeat, it'll use "groupPacksType" of config.js
Others
- Updated https://github.com/TheThobi/PTCGPB_AntiCheat to 1.5.0
v4.0 - Selected Packs, Anti Cheat & More
Warning
You need to update your config.js if you updated from a previous version
🃏 New Feature : Selected Packs
In the stats section, the bot will now show how many instances are rerolling what this way :
For exemple, if you have 6 instances and you select Dialga+Palkia you'll be considered having 3 instances running for each of them
I included all the sprites and other variations in the Assets/Emotes/Packs folder, you need to add them to your server if you want the same look that the screen, i'll patch it quickly for the Shiny Revelry support. Credits to https://msikma.github.io/pokesprite/ for the sprites !
It does work with multiple PCs even if you selected different packs from your main PC
🛡️ New Feature : Anti-Cheat
Why an anti-cheat :
The issue with Webhook URLs is that they're just a link you can send any text you want to, so evil ppl could just make a script that sends fake heartbeats infos every 30mn without even rolling
How does it work :
Each time an admin will add a friend, it'll add it's name in a array and send this Array (every 3 minutes by default) in a private discord channel and then gets analyzed by the bot using Prefixes to know to whom it belongs to
Then it can easily calculate your Anti-Cheat PPM
Anti-CheatPPM = (AccountsCountFromLast30mn * groupPacksType) / 30The groupPacksType is 5 Pack by default in your config.js file and is not allowed to be different for each ppl at this time, which means that anti-cheat won't work if half of the peoples are rolling 3Packs and other half 5Packs, i'll add support to it soon using the heartbeat data
How to set it up (FOR ADMINS) :
-
At least one admin of your group need to use this forked version of Hoytdj PTCGPB Bot https://github.com/TheThobi/PTCGPB_AntiCheat
I will try to keep it up to date and i've asked him if he could merge the changes on his main branch, if you're using Anti-Cheat too, feel free to help me push the thing
-
Tick Anti-cheat, do not touch the delay of 180s
-
Create a private secret channel in your Discord server only accessible to admins only and a webhook in it
-
Grab that secret webhook link and paste it into the PTCGPB Bot Anti-Cheat Webhook URL
-
Edit the config.js to link the bot channelID_AntiCheat to the newly created discord channel
Note that multiple admins can have it enabled at the same time and it'll pick the most up to date one
How to set it up (FOR USERS) :
- Write the command /setprefix (YourPrefix)
Your prefix needs to be 4 letters length
- Generate your new usernames list (using /generate usernames)
⚠️ The format have changed so it needs to be REgeneratedKnow that it now uses a suffix followed by an "O" to help the text recognition algorithm having the easier time processing this letter and avoiding confusion with neighboring letters
At this time the Anti-Cheat is only used as an informative value, it's up to you to check the AntiCheat values and draw your own conclusions
🌟 Other Improvements
-
Add forbidden words for /generateusernames to prevent generating usernames that will slow the script
If you discover others feel free to message me them, current list : "ass", "sht", "nazi", "anus", "nig", "rape", "pede", "dic", "bitte", "hymen", "pimp", "shto", "ugly", "bch", "nun", "tara", "wth", "bastard", "baka", "cono"
-
Auto Post Closing now have two differents time for Live & Others,
By default GP Lives are 4 days before being removed & all others are 1.5 Days
-
You can now precise if you want to skip GPs based on pack amount,
Exemple : Skipping [3P][2/5] or more but not [2P][2/5] or less
-
You can now set a multiplier on the Miss amount required if the post is marked as "not liked" based on two star amount
By default
[ 0.5, 0.5, 0.5, 0.75, 0.85, 1 ]which means that it'll do x0.5 miss required for a [0/5] & x0.85 miss for a [4/5],It'll automatically /dead the post if the miss required went below the threshold
-
Every 4h by default it will now upload UsersData.xml to your GistGit in case you want to use it to transfer the database on a website, you can disable it in your config.js
-
You can now see the TotalAverageInstances and TotalAveragePPM of each user in the UsersData.xml, it's only shown in the file at this time and not on statistics
-
Added a little header between the Main Stats & Selected Packs stats to know what's enabled or not with the bot for ppl in your group, i might add other infos later in it

🛠️ Fixes & Changes
- The stats now refreshes almost instantly and do not take 20-30s anymore
- GP with Account ID that fail to send from arturo's bot, won't be non sense anymore but will have an ID of 0000000000000000 and a detailed process in the thread explaining what to do to fix them
- Peoples marked as farmer won't be switch to inactive if their main is offline and if inactiveIfMainOffline=true in config.js
- Renamed channelID_IDs -> channelID_Commands
- Fixed some incorrect texts
- Improved Debugging to better know what's happening with the bot
v3.5 Liked States, Auto Post Close, Backup UserDatas
You need to update your config.js, you can copy-paste the top part of your previous config file with keys stuff
New Feature : Liked & Not Liked States for Inject Verification
This trick is game changing for verification in large groups using the "5 Pack No Remove" technique
You will now be able to set forum post as /Liked and /NotLike, they are transition state toward Dead and Live
💀 (Dead) < 🥶 (NotLiked) < ⌛ (Waiting) > 🔥 (Liked) > ✅ (Live)
Basically what you would do is to ask everyone to inject their account 1 hour after the GPs dropped and check the amount of Likes on the account. What we personnaly do is, with 3 likes or more, we flag is as Liked and it haves a really high chance of being Live.
Keep in mind that likes got capped at 5
Note that based on what else the account dropped in the other packs, something else could have got the likes, so we also recommend to check all cards in case there's a few but not much.
This method have been proven to work even with 5P, it got 5 likes capped after 1 hour
New Feature : Auto Post Close
Every hour the bot will check open forum posts on the verification channel and will close them either if
- they were created more than X hours ago (96h by default)
- they are marked as dead 💀
New Feature : Backup Users Data
We got our user database deleted with no reason so it'll now backup itself every 30mn with a maximum of 20 backups
Quick reminder :
As a lot of ppl asked me, the Eligible GPs are all the posts in verification forum that are OPEN + not marked as 💀
v3.2.5 Fix LiveGP, Improve AsyncLock
You don't need to replace your config.js file for this update
- Fixed the live gp that would accumulate randomly due to not missing await
- Improved the way gl live stat was reset for every user
- Fixed async lock that would start locking, modying data and then locking again to write. It that was better performance wise but it was causing some incoherences the way datas were written because of the amount of processes that write in UserData.xml.
There still might be some stuff updating weirdly such as heartbeats, I might look into it if that's the case
v3.2 User LiveGP, Better Header, Improvement, Fixes
New Stat : Live GP per user
You can now see how many live GP each members got like this :
This is enabled by default but you can disable it in the config as it's only for fun and do not really represents peoples performances
Improvement : Header Status
To make it clearer for everyone, status are now better explained in the header message used for buttons and will hide stuff based on your AutoKick and Leech settings
Improvement : Other
- You can now increase the amount of "Best Farmers" in the leaderboard to make a "shoutout" to more ppl if you have many active farmers that have fun trying to compet with each other (It will use the 3rd emoji for 3rd and +)
Fixes
- You won't be able to /verify or /dead a post already marked as live or dead
- You can now switch a post from dead to verified (and the other way too even tho idk why you would need the opposite)
- Properly reset the ServerData.xml & User LiveGP attribute every 4h by default, wrote it was corrected on the last patch but it missed some stuff
- Prevent some crashes when UserData would be empty or non existant
v3.0 Leaderboard & Fixes
New Feature : Leaderboard
At the bottom of the stats page, a leaderboard like on the screen will now be showing to reward active peoples and flag players not verifying GPs enough
Social pressure is fun... I guess... ?
You can specify custom emojis names like I did on the screen or it will use 🌟⭐️ ✨🥇🥈🥉😈👿💀 if they're not found
I included the emojis on screen that we use under "Assets/Emotes"
Do note that you can use animated emojis if you want, like our "DinkDonk" (the last gif at the bottom)
For that use, two new user variables named TotalPacksFarm & TotalTimeFarm have been created
Fixes :
-
Fixed the GPs Stats that was supposed to reset every 4h that was not actually reseting
-
Added a new config named "safeEligibleIDsFiltering" that will be usefull for ppl using Eligible IDs with a group using different Min2Stars settings, read config comment for more info
-
Potentially fixed the "Unknown interaction" error that would happens randomly, it's a common error for a lot of discord bot without clear evidence of what's causing it and hard to reproduce discordjs/discord.js#7005
-
Fixed GP Stats that would only start to show only if there's a least 1 live to prevent errors, it should now always show
v2.8 Potential Lives & Fixes
New Feature : Potential Live
A new param in the config.json named "Min2Stars" can now be set up.
This param will be used to calculate an approximation of the Total Live your group would have if you were filtering [0/5] and [1/5] for exemple.
For the nerds out there, here is the way I calculated it :
Total Potential Eligible = Total Eligibles + ( Total Ineligibles * Min2Stars * 0.1)
// 0.1 = 1 chance out of 10 for an invalid to not be a gold or immersive (for every Min2Stars)
Potential Live = Math.round( Total Potential Eligible * ( Total Luck Percentage/100 ) );Fixes & Others
- Fix crash when trying to scan & add new gp to stats with ServerData.xml being empty
- When the bot never received a heartbeat it will now say "user - Heartbeat issue" instead of "user - inactive for NaN mn"
- Fixed some text errors
v2.7.5 5Packs no remove + Hotfix for newly created servers
Implementation of "5 Packs no remove" method
See : https://discord.com/channels/1330305075393986703/1343961855747428474 on Arturo's discord server
Fixes
- Fixed error when sending no data to GistGit that would cause upload failure
- Fixed bot trying to get gp count when no gp is registered, GP stats will now appear once the first live is up
- Fixed wrong debugging
v2.5 Server Stats, Improvements & Fixes
⚠️ Warning :
If you updated from a previous version, be sure to rename your "users" folder to "data" or a new database will be created for rerollers as I renamed the folder for users + server datas
New feature : Server GP Stats
GP Stats will now show how your server is performing GP wise
As you can see it shows the total and per week live so you can estimate your recent live/day ratio as week is obviously calculated based on the 7 last days
For it to work, the bot will scan, all threads in your verification forum and also all posts marked as "ineligible" in the webhook channel to calculate the total packs amount that can be usefull as a reference as some servers will have [1/5] disabled or even more.
It will then adds new ones to the list when they'll either be posted or be verified and it gets reset every 4 hours to avoid ensure there will be no duplicates
VIP IDs / Eligible IDs :
Will support multiple formats based on which tool you want to use to clean friend list without removing GPs, you can configure that in config.json.
- The first mod supported is the one created by @hoytdj : https://github.com/hoytdj/PTCGPB/releases/tag/v1.2beta which is integrated to arturo's bot but not fully automated
- Later will come another one created by @gmisSe which will be full automated but a standalone app made with ahkv2
Other changes :
- Fix the pack/mn that was calculated based on the variable heartbeatRate, which would make it nonsenses if it misses an heartbeat, now it register the diff since last heartbeat to make it work even if it misses one
- Fix crash when message tried to get deleted after x time but that already got deleted by a bulkDelete (tho you can still have some errors about it but that shouldn't crash the bot, i'll look into it)
- Switch /refresh and /forcerefresh commands so /refresh now refreshes are stats and /forcerefresh are files pushed to GitGist which makes more sense
- Improved console debugging to understand more easily what's happening with the bot






