mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 15:47:57 -05:00
ops
This commit is contained in:
parent
059d1e201b
commit
0e706e7251
1 changed files with 6 additions and 6 deletions
|
@ -12,9 +12,9 @@ module.exports = {
|
||||||
const momented = moment().tz(timezone).format(format)
|
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' }]
|
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) &&
|
if (momented === moment().format(format) &&
|
||||||
(timezone.toLowerCase() === 'asia/bangkok' ||
|
(timezone.toLowerCase() !== 'asia/bangkok' ||
|
||||||
timezone.toLowerCase() === 'utc' ||
|
timezone.toLowerCase() !== 'utc' ||
|
||||||
timezone.toLowerCase() === 'america/new_york'
|
timezone.toLowerCase() !== 'america/new_york'
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
throw new SyntaxError('Invalid timezone')
|
throw new SyntaxError('Invalid timezone')
|
||||||
|
@ -28,9 +28,9 @@ module.exports = {
|
||||||
const momented = moment().tz(timezone).format(format)
|
const momented = moment().tz(timezone).format(format)
|
||||||
const description = `The current date and time for the timezone ${timezone} is: ${momented}`
|
const description = `The current date and time for the timezone ${timezone} is: ${momented}`
|
||||||
if (momented === moment().format(format) &&
|
if (momented === moment().format(format) &&
|
||||||
(timezone.toLowerCase() === 'asia/bangkok' ||
|
(timezone.toLowerCase() !== 'asia/bangkok' ||
|
||||||
timezone.toLowerCase() === 'utc' ||
|
timezone.toLowerCase() !== 'utc' ||
|
||||||
timezone.toLowerCase() === 'america/new_york'
|
timezone.toLowerCase() !== 'america/new_york'
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
throw new SyntaxError('Invalid timezone')
|
throw new SyntaxError('Invalid timezone')
|
||||||
|
|
Loading…
Reference in a new issue