Last active
April 29, 2017 20:19
-
-
Save mu-arch/e7a678bf1228fdd868afb6fad74ca4b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
module.exports = | |
function (cb) { | |
var start = Date.now(); | |
request.post('https://discordapp.com/api/channels/307887108129816578/messages', | |
headers: { | |
'Authorization': 'Bot MzA3ODkzOTU3NDAzMDgyNzY0.C-Y9-w.RlC48n2HEDH_v4Kv3dasoUJ-aq4', | |
'User-Agent': 'myBotThing (http://some.url, v0.1)', | |
'Content-Type': 'application/json' | |
}, | |
body: {"content":"✅ EVENT SUCCESS ---> SMTP:EGRESS"}, | |
function (error, res, body) { | |
if (error) | |
cb(error); | |
else | |
cb(null, { | |
status: res.statusCode, | |
length: body.length, | |
latency: Date.now() - start | |
}); | |
}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment