{"size": 485, "ext": "js", "max_stars_repo_path": "music_commands/leave.js", "max_stars_repo_name": "RedDusty/angela.js-V13", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "music_commands/leave.js", "max_issues_repo_name": "RedDusty/angela.js-V13", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "music_commands/leave.js", "max_forks_repo_name": "RedDusty/angela.js-V13", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.5294117647, "max_line_length": 74, "alphanum_fraction": 0.6577319588}
const { CommandInteraction } = require("discord.js");
const player = require("../index").player;

module.exports.leave_command = async function (
  /** @type {CommandInteraction} */ inter
) {
  if (player.getQueue(inter.guildId)) {
    player.getQueue(inter.guildId).destroy(true);
    return await inter.followUp({ content: `Выхожу.`, ephemeral: false });
  } else {
    return await inter.followUp({
      content: `Бот не в голосовом канале.`,
      ephemeral: true,
    });
  }
};
