Help with !Vibecheck command

Asked Mar 21, 2021·2 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Some pretext: I saw this on a twitch channel and wanted to use it, however the only command code I could find was form an old thread. I've attempted to edit it but I run into an issue.

Issue: When the "roll" is five or greater it should say "(user) has passed the vibe check", and when it is less than five it should say "(user) has failed the vibe check".

But, it always says "(User) has failed the vibe check", regardless of the roll.

Command code:

$(eval a=Math.ceil(Math.random()*10);@$(user)'s Vibes Are ${a}/10. $(user) Has ${a==5?Passed:Failed} the Vibe Check.)

2 replies

Try this:

$(eval a=Math.floor(Math.random()*10+1);`@$(user)'s Vibes Are ${a}/10. $(user) Has ${a>=6?`Passed`:`Failed`} the Vibe Check.`)
Quirky Fox said:
$(eval a=Math.floor(Math.random()*10+1);@$(user)'s Vibes Are ${a}/10. $(user) Has ${a>=6?Passed:Failed} the Vibe Check.)

This worked, thank you so much! I see the changes you made. I really appreciate it.