From 805c7605c816c9de299f9a1b027d99182f54a42d Mon Sep 17 00:00:00 2001 From: Flummi Date: Wed, 31 Aug 2016 06:10:39 +0000 Subject: [PATCH] fixed regex --- src/trigger/ytdl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/trigger/ytdl.js b/src/trigger/ytdl.js index b2911d7..956d96b 100644 --- a/src/trigger/ytdl.js +++ b/src/trigger/ytdl.js @@ -6,13 +6,13 @@ var probe = require('node-ffprobe'); module.exports = (bot, trigger, lib) => { trigger.add({ name: 'ytdl', - call: /https?:\/\/(www\.)?(yotu\.be\/|youtube\.com\/)?((.+\/)?(watch(\?v=|.+&v=))?(v=)?)([\w_-]{11})(&.+)?/gi, + call: /https?:\/\/(www\.)?(yotu\.be\/|youtube\.com\/)((.+\/)?(watch(\?v=|.+&v=))?(v=)?)([\w_-]{11})(&.+)?/gi, level: 0, active: 1, func: (e) => { if(e.channel.getName() == '#f0ck') { if(!e.message.match(/\!ignore/)) { - var tmp = e.message.match(/https?:\/\/(www\.)?(yotu\.be\/|youtube\.com\/)?((.+\/)?(watch(\?v=|.+&v=))?(v=)?)([\w_-]{11})(&.+)?/gi); // get links + var tmp = e.message.match(/https?:\/\/(www\.)?(yotu\.be\/|youtube\.com\/)((.+\/)?(watch(\?v=|.+&v=))?(v=)?)([\w_-]{11})(&.+)?/gi); // get links tmp.forEach((entry,i,a) => { var dl = true; var tmpdest = uuid.v1().split('-')[0];