among us timezone

This commit is contained in:
ChomeNS 2022-11-23 20:04:22 +07:00
parent 14156604f3
commit ca9e006aaf

View file

@ -9,7 +9,7 @@ module.exports = {
trusted: 0,
execute: function(bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {
const timezone = args.join(' ');
const momented = moment().tz(`${timezone}`).format('dddd, MMMM Do, YYYY, hh:mm:ss A');
const momented = moment().tz(timezone).format('dddd, MMMM Do, YYYY, hh:mm:ss A');
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 (timezone.toLowerCase() === 'asia/bangkok' || timezone.toLowerCase() === 'utc') {
bot.tellraw(selector, component);
@ -22,7 +22,7 @@ module.exports = {
},
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc) {
const timezone = args.join(' ');
const momented = moment().tz(`${timezone}`).format('dddd, MMMM Do, YYYY, hh:mm:ss A');
const momented = moment().tz(timezone).format('dddd, MMMM Do, YYYY, hh:mm:ss A');
const description = `The current date and time for the timezone ${timezone} is: ${momented}`;
if (timezone.toLowerCase() === 'asia/bangkok' || timezone.toLowerCase() === 'utc') {
const Embed = new MessageEmbed()