Pastebin Randomized Responses (Resolved)

Asked Aug 28, 2024·2 replies·Last activity 1 year 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.

Hi there! I'm trying to create a chat command that has randomized responses that are pasted in Pastebin. I've been looking through the forums here and have tried different things, but the chatbot keeps rejecting what I'm writing with different errors. So I'm hoping that someone will be able to help me rewrite this so I can stop getting errors!

This is what I am hoping it will look like....
Chat Message: !1v1 @member
Response: @Grand Snail has challenged @member to a 1v1! Insert random response/outcome here from Pastebin.

This is what I put together as the command:

!addcom !1v1 $(user) has challeneged $(touser) to a 1v1! $(eval user=$(user); touser=$(touser); p=$(urlfetch json [https://pastebin.com/u4Rcu18f)](https://pastebin.com/u4Rcu18f)%60).split(;); p[Math.floor(Math.random()*p.length)])

And here is what it is responding with
Sir_Mocha has challeneged Nightbot to a 1v1! font-size: 12px

2 replies

Hiya, this is without testing, but you definitetly need the Raw pastebin: so use https://pastebin.com/raw/u4Rcu18f

Revisited this, and using raw worked! Thank you so much!