From c65124be1ba5a2494d6dc791d2610ac2a1806b32 Mon Sep 17 00:00:00 2001 From: Flummi Date: Wed, 22 Nov 2017 23:47:47 +0100 Subject: [PATCH] kek --- src/inc/trigger/sandbox.js | 12 ++++++++++++ src/inc/trigger/useless_uwe.js | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/inc/trigger/sandbox.js b/src/inc/trigger/sandbox.js index 8b1c062..085734a 100644 --- a/src/inc/trigger/sandbox.js +++ b/src/inc/trigger/sandbox.js @@ -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); } }); + + 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}`); + } + }); }; diff --git a/src/inc/trigger/useless_uwe.js b/src/inc/trigger/useless_uwe.js index 110561e..e9b6c0c 100644 --- a/src/inc/trigger/useless_uwe.js +++ b/src/inc/trigger/useless_uwe.js @@ -360,10 +360,10 @@ module.exports = bot => { request(`http://idlerpg.rizon.net/xml.php?player=${args[0]}`, (err, res, 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); - 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()}.`); }); }); }