let you disable effect

This commit is contained in:
loicbersier 2019-12-10 22:33:52 +01:00
parent 5e80ca8507
commit b2a6c10cd4

View file

@ -26,6 +26,61 @@ class ytpCommand extends Command {
match: 'flag', match: 'flag',
flag: ['--force'] 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', id: 'link',
type: 'string' type: 'string'
@ -40,6 +95,7 @@ class ytpCommand extends Command {
} }
async exec(message, args) { async exec(message, args) {
console.log(!args.squidward);
let MAX_CLIPS = 20; let MAX_CLIPS = 20;
if (args.pool) { if (args.pool) {
@ -127,17 +183,17 @@ class ytpCommand extends Command {
MAX_CLIPS: MAX_CLIPS, MAX_CLIPS: MAX_CLIPS,
transitions: true, transitions: true,
effects: { effects: {
effect_RandomSound: true, effect_RandomSound: !args.randomSound,
effect_RandomSoundMute: true, effect_RandomSoundMute: !args.randomSoundMute,
effect_Reverse: true, effect_Reverse: !args.reverse,
effect_Chorus: true, effect_Chorus: !args.chorus,
effect_Vibrato: true, effect_Vibrato: !args.vibrato,
effect_HighPitch: true, effect_HighPitch: !args.highPitch,
effect_LowPitch: true, effect_LowPitch: !args.lowPitch,
effect_SpeedUp: true, effect_SpeedUp: !args.speedUp,
effect_SlowDown: true, effect_SlowDown: !args.slowDown,
effect_Dance: true, effect_Dance: !args.dance,
effect_Squidward: true effect_Squidward: !args.squidward
} }
}; };