<commit_before>const { Command } = require('discord.js-commando')
const moment = require('moment-timezone')

module.exports = class EmojiCommand extends Command {
  constructor (client) {
    super(client, {
      name: 'time',
      memberName: 'time',
      group: 'time',
      description: 'Get the time of a user.',
      details: 'View another user\'s time and timezone.',
      aliases: [
        'getusertime'
      ],
      throttling: {
        usages: 2,
        duration: 10
      },
      args: [
        {
          key: 'user',
          prompt: 'What user would you like to lookup?',
          type: 'member'
        }
      ],
      guildOnly: true
    })
  }

  run (message, args) {
    let user = args.user.user
    var userTimezone = this.client.provider.get(user.id, 'timezone', false)
    if (userTimezone === false) {
      message.reply(`${user.tag} hasn't setup their timezone yet.`)
    } else {
      message.say(`${userTimezone}; where ${user.username} is, it's ${moment.tz(userTimezone).format('llll')}.`)
    }
  }
}<commit_msg>Command: Improve time command.<commit_after>const { Command } = require('discord.js-commando')
const { oneLine } = require('common-tags')
const moment = require('moment-timezone')

module.exports = class EmojiCommand extends Command {
  constructor (client) {
    super(client, {
      name: 'time',
      memberName: 'time',
      group: 'time',
      description: 'Get the time of a user.',
      details: 'View another user\'s time and timezone.',
      aliases: [
        'getusertime'
      ],
      throttling: {
        usages: 2,
        duration: 10
      },
      args: [
        {
          key: 'user',
          prompt: 'What user would you like to lookup?',
          type: 'member'
        }
      ],
      guildOnly: true
    })
  }

  run (message, args) {
    let user = args.user.user
    if (user.bot === true) return message.reply('bots can\'t have a timezone.')
    var userTimezone = this.client.provider.get(user.id, 'timezone', false)
    if (userTimezone === false) {
      message.reply(oneLine`
        ${user.tag} hasn't setup their timezone yet.
        They can use the \`settz\` command to change their timezone.
      `)
    } else {
      message.say(`${userTimezone}; where ${user.username} is, it's **${moment.tz(userTimezone).format('llll')}.**`)
    }
  }
}
{'fraction_non_alphanumeric': 0.14401019541206458, 'fraction_numerical': 0.002548853016142736, 'mean_word_length': 2.302945301542777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3354407', 'n_tokens_mistral': 744, 'n_tokens_neox': 729, 'n_words': 192}