Hello,
I use Nightbot for a customized gambling command in my discord server, and it's worked fine for several months (minus the few times it went down for servers). I pulled the code for the command from a help thread here and modified it a little to match my needs, but I'm really not sure how to troubleshoot it (especially since nothing has changed on my side, it's just no longer working).
Here's the code (I had to add remove the pastebin link bc no links allowed.):
$(eval z=decodeURIComponent;const a=z("$(querystring $(user))"),{die:b,responses:c}=JSON.parse(z("$(querystring $(urlfetch json pastebin link))")),d=(a=>Math.ceil(Math.random()*a))(b),e=((a,b)=>{const c=Object.keys(a).map(Number).sort((c,a)=>a-c);for(const d of c)if(b>=d)return a[d];throw new Error("responses")})(c,d);${a} rolls the dice and hits a **${d}**. ${e})
Here's the contents of the pastebin (pastebin/com/raw/isHe61hS):
{
"die": 1000,
"responses": {
"2": "Better luck next time! 🎲",
"23": "Better luck next time! 🎲",
"25": "Don't give up! No one likes a quitter! 🎲",
"41": "Not this time! Better luck next roll. 🎲",
"43": "You'll get it next time! Roll again. 🎲",
"68": "Try again! 🎲",
"70": "Just keep rolling! 🎲",
"99": "Oh no! Better luck next time. 🎲",
"101": "Not this time! Better roll again. 🎲",
"142": "Try again! You'll get it next time. 🎲",
"144": "Call that a roll? Put some elbow grease into it! 🎲",
"315": "Oh no! Better luck next time. 🎲",
"317": "Just one more roll! Yeah, keep telling yourself that... 🎲",
"368": "Just one more roll! Yeah, keep telling yourself that... 🎲",
"370": "Just one more roll! Yeah, keep telling yourself that... 🎲",
"403": "Not this time! Better roll again. 🎲",
"405": "So close, but still no cigar. 🎲",