2022-07-05 18:16:06 -04:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
|
|
|
* DLAP Bot: A Discord bot that plays local audio tracks.
|
2024-02-21 16:56:44 -05:00
|
|
|
* (C) Copyright 2024
|
2022-07-05 18:16:06 -04:00
|
|
|
* Programmed by Andrew Lee
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
***************************************************************************/
|
|
|
|
|
2022-07-24 11:50:39 -04:00
|
|
|
import { SlashCommandBuilder } from 'discord.js';
|
2022-12-20 17:54:56 -05:00
|
|
|
import { voteSkip } from '../Utilities/Voting.js';
|
2024-02-13 22:35:50 -05:00
|
|
|
import i18next from '../Utilities/i18n.js';
|
2022-07-05 18:16:06 -04:00
|
|
|
|
2024-02-13 22:35:50 -05:00
|
|
|
const t = i18next.t;
|
2022-07-05 18:16:06 -04:00
|
|
|
export default {
|
2022-07-09 22:14:38 -04:00
|
|
|
data: new SlashCommandBuilder()
|
2022-07-13 21:58:34 -04:00
|
|
|
.setName('previous')
|
2022-07-13 22:03:05 -04:00
|
|
|
.setDescription('Goes to previous music')
|
2023-03-26 23:44:05 -04:00
|
|
|
.addSubcommand(subcommand =>
|
2022-12-20 17:54:56 -05:00
|
|
|
subcommand.setName('vote')
|
2023-03-26 23:44:05 -04:00
|
|
|
.setDescription('Voting to skip this audio track'))
|
2022-12-20 17:54:56 -05:00
|
|
|
.addSubcommand(subcommand =>
|
|
|
|
subcommand.setName('force')
|
|
|
|
.setDescription('Forces skip this audio track')),
|
2022-07-10 01:05:59 -04:00
|
|
|
async execute(interaction, bot) {
|
2024-02-13 22:35:50 -05:00
|
|
|
if (!interaction.member.voice.channel) return await interaction.reply({ content: t('voicePermission'), ephemeral: true });
|
2022-12-20 17:54:56 -05:00
|
|
|
await voteSkip(interaction, bot);
|
2022-07-09 22:14:38 -04:00
|
|
|
}
|
|
|
|
};
|