From b2a6c10cd4686cc45aa96504ce6ae21c63c15b64 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 10 Dec 2019 22:33:52 +0100 Subject: [PATCH] let you disable effect --- commands/fun/ytp.js | 78 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 67 insertions(+), 11 deletions(-) diff --git a/commands/fun/ytp.js b/commands/fun/ytp.js index 64746abc..e53e3b44 100644 --- a/commands/fun/ytp.js +++ b/commands/fun/ytp.js @@ -26,6 +26,61 @@ class ytpCommand extends Command { match: 'flag', flag: ['--force'] }, + { + id: 'randomSound', + match: 'flag', + flag: ['--randomSound'] + }, + { + id: 'randomSoundMute', + match: 'flag', + flag: ['--randomSoundMute'] + }, + { + id: 'reverse', + match: 'flag', + flag: ['--reverse'] + }, + { + id: 'chorus', + match: 'flag', + flag: ['--chorus'] + }, + { + id: 'vibrato', + match: 'flag', + flag: ['--vibrato'] + }, + { + id: 'highPitch', + match: 'flag', + flag: ['--highPitch'] + }, + { + id: 'lowPitch', + match: 'flag', + flag: ['--lowPitch'] + }, + { + id: 'speedUp', + match: 'flag', + flag: ['--speedUp'] + }, + { + id: 'slowDown', + match: 'flag', + flag: ['--slowDown'] + }, + { + id: 'dance', + match: 'flag', + flag: ['--dance'] + }, + { + id: 'squidward', + match: 'flag', + flag: ['--squidward'] + }, { id: 'link', type: 'string' @@ -40,6 +95,7 @@ class ytpCommand extends Command { } async exec(message, args) { + console.log(!args.squidward); let MAX_CLIPS = 20; if (args.pool) { @@ -127,17 +183,17 @@ class ytpCommand extends Command { MAX_CLIPS: MAX_CLIPS, transitions: true, effects: { - effect_RandomSound: true, - effect_RandomSoundMute: true, - effect_Reverse: true, - effect_Chorus: true, - effect_Vibrato: true, - effect_HighPitch: true, - effect_LowPitch: true, - effect_SpeedUp: true, - effect_SlowDown: true, - effect_Dance: true, - effect_Squidward: true + effect_RandomSound: !args.randomSound, + effect_RandomSoundMute: !args.randomSoundMute, + effect_Reverse: !args.reverse, + effect_Chorus: !args.chorus, + effect_Vibrato: !args.vibrato, + effect_HighPitch: !args.highPitch, + effect_LowPitch: !args.lowPitch, + effect_SpeedUp: !args.speedUp, + effect_SlowDown: !args.slowDown, + effect_Dance: !args.dance, + effect_Squidward: !args.squidward } };