im using [quote=“notjoker28, post:4, topic:33126”]
!addcom !example $(eval responses = `$(urlfetch json RAW Pastebin link here)`.split(`Whatever you what to split each line with`); + responses[Math.ceil(Math.random() * responses.length)])
[/quote]
and its giving me this error !addcom !example Unexpected end of input [:1:102] and i dont know how to fix it.
i also want to know if i can have this after other text or does it need to be at the start of the command prompt to work because for the random responses to work they need to have this “Where are you going $(touser)” to start it.
Hiya. commands are triggered by the first word of a chat message.
Why your command isn’t working, I cant tell. Youll have to share the full command including the pastebin link and what you want the sentences to split on, so I can test it.
!addcom !example $(eval responses = $(https://pastebin.com/raw/eFScvDre).split(```); + responses[Math.ceil(Math.random() * responses.length)])
i think i see one problem
Thanks for sharing, you will need to change your pastebin structure, and separate the sentences with the same character(s).
For example like this: https://pastebin.com/raw/6AfagFQq
All sentences end with a comma, then we can use the split function to split the sentences on each comma.
1 is the split function already in the command line im using
2 am i able to to add a blank space as a response because i like the idea of it not a extra response on top of “where are you going user”
;
Can you get me some sour cream and onion chips;
Can you get me a glass of water;
Can you get me a smoothie;
Can you get me some new batterys;
Dont leave me here with THEM;
Can you get me a Cat 320 GX Hydraulic Excavator;
Take null with you;
Can you get me a cool looking pare of socks;
Can you get me a slipper to beat them with;
You can not escape me