Grab certain answers from pastebin or google spreadsheet

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: Axis Calculated - Google Sheets

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!

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”

Hiya, you can have a look at this topic for some examples to fetch data from google spreadsheets: Fetching data from Google Spreadsheet

1 Like

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!;})

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.