Add counting punishment
Make sure to change the .getRoleById() to a new role you make that doesn't have send messages perm in #counting
Hi Gran,
A couple notes on this that I'd like you to knock out before merging:
- Don't use the executor service, it's not persistent (i.e. bot restarts) and will consistently create the need for manual intervention, rather use mongo to store those whom are currently barred and manually deny their valid counts.
- Additionally, I think it would be best if these people remained able to speak in the counting channel, just not count, e.g. when they provide a valid count, remove it manually and notify them that they have 'x' time left before they can count again.
- Fix your whitespace- stick to 4 spaces per indent as is standard throughout the rest of the project.
Once these are done I'll re-evaluate as having changed the indentation of every line, it makes it hard to view the actual change log.
- Don't use the executor service, it's not persistent (i.e. bot restarts) and will consistently create the need for manual intervention, rather use mongo to store those whom are currently barred and manually deny their valid counts.
For the mongo, how would I check the time they get to count again? Does mongo have a storage for time? I wouldn't really know how to do it with SQL either since I don't work with timers much
- Fix your whitespace- stick to 4 spaces per indent as is standard throughout the rest of the project.
On IntelliJ my tab space is set to 4 spaces, I'm not sure how to fix that since its already at 4
There's a few ways you could do date times in mongo, personally I'd store the timestamp their punishment expires i.e. via System.getCurrentTimeMillis() and add hours * 60 * 60 * 1000 to this time as the punishment expiry time.
There's a few ways you could do date times in mongo, personally I'd store the timestamp their punishment expires i.e. via System.getCurrentTimeMillis() and add
hours * 60 * 60 * 1000to this time as the punishment expiry time.
No I get that part, I meant like how to check, like do I set something up that constantly checks the time? Thats the part I'm confused on
I mean I could get the information from mongo on start and make schedulers based on that, so if the bot restarts the schedulers will go back, or I could have a scheduler check every minute or two
What are the schedulers for? In my comment I meant dissolve the role entirely, and just deny valid counts manually in the listener if their time hasn't passed.
Oh yeah that makes sense I was thinking of something else
better? I changed to use mongo, cant figure out the indent thing though
that should be good now, idk if the indents are still messed up or not though