{"size": 1115, "ext": "js", "max_stars_repo_path": "src/commands/modules/voices.js", "max_stars_repo_name": "nullabork/talkbot", "max_stars_repo_stars_event_min_datetime": "2019-04-04T17:02:05.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-22T17:31:56.000Z", "max_issues_repo_path": "src/commands/modules/voices.js", "max_issues_repo_name": "wootosmash/talkbot", "max_issues_repo_issues_event_min_datetime": "2018-04-03T01:15:21.000Z", "max_issues_repo_issues_event_max_datetime": "2019-03-07T23:42:05.000Z", "max_forks_repo_path": "src/commands/modules/voices.js", "max_forks_repo_name": "nullabork/talkbot", "max_forks_repo_forks_event_min_datetime": "2019-07-22T18:46:08.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-22T17:31:58.000Z"}
{"max_stars_count": 26, "max_issues_count": 31, "max_forks_count": 22, "avg_line_length": 22.7551020408, "max_line_length": 75, "alphanum_fraction": 0.6475336323}
// models
const BotCommand = require("@models/BotCommand");

/**
 * Command: mylang
 * sets language user config
 *
 * usage !mylang au
 *
 * @param   {[MessageDetails]}  msg     [message releated helper functions]
 *
 * @return  {[undefined]}
 */
function listVoices(msg) {
  const commands = require("@commands");
  const exampleEmbed = {
    color: 0x0099ff,
    title: `Click to find voices${
      msg.content ? " for: " + msg.content + "." : "."
    }`,
    url: `https://voices.talkbot.dev/?chr=${encodeURI(
      commands.getCommandChar(msg.server)
    )}&find=${encodeURI(msg.content)}`,
    description: "talkbot voice and voice sample database.",
    thumbnail: {
      url: "https://voices.talkbot.dev/img/face_200.png",
    },
  };

  msg.richResponse(exampleEmbed);
}

var command = new BotCommand({
  command_name: "voices",
  command_arg: "l",
  execute: listVoices,
  short_help: "voices.shorthelp",
  long_help: "voices.longhelp",
  group: "info",
});

exports.register = function (commands) {
  commands.add(command);
};

exports.unRegister = function (commands) {
  commands.remove(command);
};
