I'm wondering if it's possible to make a custom 8ball command to return only 2 answers, but have one result appear 511 times and the other only once.
So when someone uses the command they would have a 1 in 512 chance of returning result 2 and a 511 in 512 chance of result 1.
Custom 8ball command
5 replies
Hey @Proud Skunk!
Here's the code you're looking for:
$(eval r=[Math.floor(Math.random()*512)]+1; r>511?`RARE_MESSAGE`:`FREQUENT_MESSAGE`;)
Replace FREQUENT_MESSAGE with the one you want to happen 511 times out of 512, and RARE_MESSAGE with the one you want to happen only 1 time out of 512.
Edit: fixed the command, it should work as intended now, silly me wanting to go too fast in my code to save unnecessary space.
Didn't find your answer? The community is on Discord.
Ask on Discord