XMLHttpRequest is not defined

/me $(eval var xhr = new XMLHttpRequest();xhr.open('GET', 'https://eu.diablo3.com/ru/rankings/season/16/rift-hardcore-monk', false); xhr.send();xhr = xhr.response.split('Bumer85')[2].split('</td>');var RiftLevel=xhr[1].split('<td class="cell-RiftLevel" >')[1];var RiftTime =xhr[2].split('<td class="cell-RiftTime" >')[1];var gr =RiftLevel+'GR за'+ RiftTime; gr; )

Nightbot XMLHttpRequest is not defined

Help don’t understand what he doesn’t like…

Thoght about:
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;

Nightbot require is not defined

The only way to access api’s is through the $(urlfetch) variable.

$(urlfetch https://eu.diablo3.com/ru/rankings/season/16/rift-hardcore-monk)

Nightbot: [Response must be less than 400 characters]

Not in my case(

Your API must return either plaintext or JSON. You can use the $(urlfetch json link.com) flag to avoid the response limit for the API.

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