Skip to content

Instantly share code, notes, and snippets.

@mu-arch
Last active April 29, 2017 20:19
Show Gist options
  • Save mu-arch/e7a678bf1228fdd868afb6fad74ca4b5 to your computer and use it in GitHub Desktop.
Save mu-arch/e7a678bf1228fdd868afb6fad74ca4b5 to your computer and use it in GitHub Desktop.
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