Grab certain answers from pastebin or google spreadsheet

Asked Sep 13, 2021·4 replies·Last activity 4 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.

What I'm looking for is for nightbot to take a command like:

!A 0.3
!A 0.4
etc

Then run whatever the user put (lets say 0.3) through pastebin or google spreadsheet (most likely pastebin if someone tells me how to format it)

Which should make nightbot reply with:

Overworld: 3056, Nether: 382

So as a whole example:

Nerxxy: !A 0.3
Nightbot: Overworld: 3056, Nether: 382

but if I do:

Nerxxy: !A 0.4

Nightbot will reply:

Nightbot: Overworld: 2292, Nether: 286

If it makes it easier here is the doc: https://docs.google.com/spreadsheets/d/192yx2gfr7Ws4iFFgQoRMviSsHFeU9DnaLSzBF…

But like I said, if it makes it any easier with a properly formatted pastebin then I will put in the time to sort that out.

Sorry if my explanation on what I'm looking for is bad, I'm not very good at it...

Anyways thanks for the help!

4 replies

Basically just want nightbot to use the user input as an "ID" and respond with the message linked to that "ID"

If u see in the doc there is "Angle Change" all the numbers under that section would be the ID and nightbot would respond with the "Major Coordinates"

Hello, I've changed from a google spreedsheet to a json file hosted on github,

i dont suppose you would know how to pick and choose answers from a json file or how it should be formatted?

i currently am using this format

{

"2":{
"bleh": "words",
"lah": "more words"
}
}

i want the response to be something like this:

Nerxxy: !number 2

Nightbot: bleh: words, lah: more words

i figured it out, ended up using a json file hosted on github, its for minecraft speedrunning if anyone wants it

!addcom !axis $(eval a=JSON.parse($(urlfetch json https://raw.githubusercontent.com/Nerxxy/Minecraft-Speedrun-Axis-Command/main/axis.json));b=decodeURIComponent($(querystring));if(a[b]){c=b+ - ;for(x in a[b]){c+=x+: +a[b][x].join(, )+. ;}c.slice(0,400);}else{No match!;})