diff --git a/src/inc/trigger/useless_nxy.js b/src/inc/trigger/useless_nxy.js
index c91b396..55fbb03 100644
--- a/src/inc/trigger/useless_nxy.js
+++ b/src/inc/trigger/useless_nxy.js
@@ -227,10 +227,10 @@ module.exports = bot => {
}
}));
- bot._trigger.set("joke", new bot.trigger({
- call: /^(\.|\/)joke$/i,
+ bot._trigger.set("witz", new bot.trigger({
+ call: /^(\.|\/)witz$/i,
f: e => {
- rp("http://www.funny4you.at/webmasterprogramm/zufallswitz.php")
+ rp("http://www.funny4you.at/webmasterprogramm/zufallswitz.php?id=312")
.then(res => {
res = res
.split("
").join("")
@@ -241,7 +241,7 @@ module.exports = bot => {
.split("ü").join("ü")
.split("Ä").join("Ä")
.split("Ö").join("Ö")
- .split("&Üuml;").join("Ü")
+ .split("Ü").join("Ü")
.split("ß").join("ß")
.split(""").join("\"")
.replace(/\ {
});
}
}));
+
+ bot._trigger.set("joke", new bot.trigger({
+ call: /^(\.|\/)joke$/i,
+ f: e => {
+ rp("https://icanhazdadjoke.com/slack", { json: true })
+ .then(res => {
+ res = res.attachments[0].text;
+
+ if(e.network !== "Telegram") {
+ res
+ .match(/.{1,450}/g)
+ .map(e.reply);
+ }
+ else
+ e.reply(res);
+ })
+ .catch(err => {
+ console.log(err);
+ });
+ }
+ }));
};
\ No newline at end of file