diff --git a/commands/time.js b/commands/time.js index 0b96bfa..644f502 100644 --- a/commands/time.js +++ b/commands/time.js @@ -12,9 +12,9 @@ module.exports = { const momented = moment().tz(timezone).format(format) const component = [{ text: 'The current date and time for the timezone ', color: 'white' }, { text: timezone, color: 'aqua' }, { text: ' is: ', color: 'white' }, { text: momented, color: 'green' }] if (momented === moment().format(format) && - (timezone.toLowerCase() === 'asia/bangkok' || - timezone.toLowerCase() === 'utc' || - timezone.toLowerCase() === 'america/new_york' + (timezone.toLowerCase() !== 'asia/bangkok' || + timezone.toLowerCase() !== 'utc' || + timezone.toLowerCase() !== 'america/new_york' ) ) { throw new SyntaxError('Invalid timezone') @@ -28,9 +28,9 @@ module.exports = { const momented = moment().tz(timezone).format(format) const description = `The current date and time for the timezone ${timezone} is: ${momented}` if (momented === moment().format(format) && - (timezone.toLowerCase() === 'asia/bangkok' || - timezone.toLowerCase() === 'utc' || - timezone.toLowerCase() === 'america/new_york' + (timezone.toLowerCase() !== 'asia/bangkok' || + timezone.toLowerCase() !== 'utc' || + timezone.toLowerCase() !== 'america/new_york' ) ) { throw new SyntaxError('Invalid timezone')