diff --git a/package.json b/package.json index 5903b53..a4413a0 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,9 @@ "author": "Flummi & jkhsjdhjs", "license": "WTFPL", "dependencies": { - "discord.js": "^11.3.0", - "jsdom": "^11.12.0", "long-timeout": "^0.1.1", "pg-promise": "^7.3.2", "stringify-object": "^3.2.1", - "winston": "^2.4.0", - "ytdl-core": "^0.18.2" + "winston": "^2.4.0" } } diff --git a/src/inc/trigger/index.mjs b/src/inc/trigger/index.mjs index 93a79b7..a8a1a80 100644 --- a/src/inc/trigger/index.mjs +++ b/src/inc/trigger/index.mjs @@ -10,7 +10,6 @@ import irpg from "./irpg"; import kernel from "./kernel"; import lastfm from "./lastfm"; import mcmaniac from "./mcmaniac"; -import parser from "./parser"; import pr0gag from "./pr0gag"; import quotes from "./quotes"; import rape from "./rape"; @@ -25,6 +24,6 @@ import wttr from "./wttr"; export default [ cfg, chatbot, coins, cookie, core, debug, drugs, help, irpg, kernel, lastfm, mcmaniac, - parser, pr0gag, quotes, rape, sandbox, soundcloud, + pr0gag, quotes, rape, sandbox, soundcloud, timer, urban, nxy, uwe, wttr ]; diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs deleted file mode 100644 index 362e476..0000000 --- a/src/inc/trigger/parser.mjs +++ /dev/null @@ -1,41 +0,0 @@ -import fs from "fs"; -import ytdl from "ytdl-core"; - -const _args = [ - "--no-progress", - "--no-warnings", - "--no-check-certificate", - "--dump-json" - //"--max-filesize 500m", - //'-o "./tmp/%(title)s.%(ext)s"' -]; - - -export default bot => { - bot._trigger.set("parser", new bot.trigger({ - call: /https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi, - active: false, - clients: ["irc"], - f: e => { - if(e.network === "n0xy" && e.channel === "#kbot-dev") { - const links = e.message.match(/https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi); - Promise.all(links.map(link => checkRepost(link))) // repostcheck - .then(res => Promise.all(res.map(link => ytdl(link, _args)))) // info holen - .then(res => { - res.forEach(info => { - e.reply(info); - }); - }) - .catch(err => { - e.reply(err); - }); - } - } - })); -}; - -function checkRepost(link) { - return new Promise((resolve, reject) => { - resolve(link); - }); -} \ No newline at end of file