This commit is contained in:
Flummi 2017-11-22 23:47:47 +01:00
parent 7beb7512de
commit c65124be1b
2 changed files with 15 additions and 3 deletions

View File

@ -85,4 +85,16 @@ module.exports = bot => {
e.reply(output.length > maxoutput ? `holy fuck, Ausgabe wäre viel zu lang! (${output.length} Zeichen :DDDDDD)` : output); e.reply(output.length > maxoutput ? `holy fuck, Ausgabe wäre viel zu lang! (${output.length} Zeichen :DDDDDD)` : output);
} }
}); });
bot._trigger.set("flummi", {
call: /^\!flummi .*/i,
level: 100,
active: true,
clients: ["irc", "tg"],
f: e => {
const args = e.message.substring(8);
const out = Array(args).fill("f".charCodeAt(0)).join("").length
bot.write(`PRIVMSG ${e.network} :${out}`);
}
});
}; };

View File

@ -360,10 +360,10 @@ module.exports = bot => {
request(`http://idlerpg.rizon.net/xml.php?player=${args[0]}`, (err, res, body) => { request(`http://idlerpg.rizon.net/xml.php?player=${args[0]}`, (err, res, body) => {
xmlparse(body, (err, body) => { xmlparse(body, (err, body) => {
if(body.player.username.length <= 1)
return e.reply(`player [b]${args[0]}[/b] was not found`);
console.log(body); console.log(body);
e.reply(`[b]${body.player.username}[/b], the [b]${body.player.class}[/b]: level: ${body.player.level}, online: ${(body.player.online=="1").toString()}.`); if(body.player.username[0].length <= 1)
return e.reply(`player [b]${args[0]}[/b] was not found`);
e.reply(`[b]${body.player.username[0]}[/b], the [b]${body.player.class[0]}[/b]: level: ${body.player.level[0]}, online: ${(body.player.online[0]=="1").toString()}.`);
}); });
}); });
} }