This commit is contained in:
Flummi 2018-07-18 21:04:30 +02:00
parent 79125b0fb3
commit f76bbcc399

View File

@ -402,4 +402,22 @@ export default bot => {
e.reply(mock);
}
}));
bot._trigger.set("sync", new bot.trigger({
call: /^\.sync.*/i,
set: "uwe",
f: e => {
const sync = e.args[0] || "80s90s";
rp(`https://f0ck.space/sync.php?${sync}`, { json: true })
.then(data => {
if(data.err)
e.reply("Channel nicht gefunden D:");
else
e.reply(`${data.name} @ https://sync.f0ck.space/r/${data.name}: ${data.user} Users, now playing: ${decodeURIComponent(data.title)}`);
})
.catch(err => {
e.reply("Channel nicht gefunden D:");
});
}
}));
};