mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 19:52:36 +01:00
lets try this then
This commit is contained in:
parent
7f9089bc5e
commit
d0ed2eddd1
@ -17,9 +17,11 @@ var autoshorten = function(dbot) {
|
||||
'path': '/mkurl?url=' + escape(url)
|
||||
};
|
||||
|
||||
http.get(options, function(response) {
|
||||
console.log(response);
|
||||
dbot.say(data.channel, 'Shortened link from ' + data.user + ': ' + response.surl);
|
||||
http.get(options, function(res) {
|
||||
res.setEncoding('utf8');
|
||||
res.on('data', function (response) {
|
||||
dbot.say(data.channel, 'Shortened link from ' + data.user + ': ' + JSON.parse(response).surl);
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user