This commit is contained in:
Flummi 2017-11-29 20:59:35 +01:00
parent 1637d257df
commit daf6090b9f

View File

@ -1,5 +1,7 @@
import sql from "../sql.js"; import sql from "../sql.js";
const rp = require("request-promise");
const data = { const data = {
yiff: [], yiff: [],
kill_templates: [], kill_templates: [],
@ -203,4 +205,18 @@ module.exports = bot => {
e.reply(`Jamba Arschlochscanner: [b]${e.args[0] || e.user.nick}[/b] ist zu ${~~(Math.random() * 100 + 1)}% ein Arschloch.`); e.reply(`Jamba Arschlochscanner: [b]${e.args[0] || e.user.nick}[/b] ist zu ${~~(Math.random() * 100 + 1)}% ein Arschloch.`);
} }
})); }));
bot._trigger.set("isup", new bot.trigger({
call: /^(\.|\/)isup .*/i,
f: e => {
const addr = !e.args[0].match(/^https?/g) ? `https://${e.args[0]}` : e.args[0];
rp(addr)
.then(res => {
e.reply(`[b]${addr}[/b] seems to be [b]up[/b].`);
})
.catch(err => {
e.reply(`[b]${addr}[/b] seems to be [b]down[/b].`);
});
}
}));
}; };