Réécriture complète 4.0
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6m16s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6m16s
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
import { SlashCommandBuilder, ChatInputCommandInteraction } from 'discord.js'
|
||||
import { useQueue } from 'discord-player'
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('skip')
|
||||
.setDescription('Passer la musique en cours.'),
|
||||
async execute(interaction: ChatInputCommandInteraction) {
|
||||
let queue = useQueue(interaction.guild?.id ?? '')
|
||||
if (!queue) return interaction.followUp({ content: 'Aucune file d\'attente en cours, recherche une musique plutôt !' })
|
||||
|
||||
queue.node.skip()
|
||||
return await interaction.reply('Musique passée !')
|
||||
}
|
||||
}
|
||||
import { SlashCommandBuilder, MessageFlags } from "discord.js"
|
||||
import type { ChatInputCommandInteraction } from "discord.js"
|
||||
import { useQueue } from "discord-player"
|
||||
import { t } from "@/utils/i18n"
|
||||
|
||||
export const data = new SlashCommandBuilder()
|
||||
.setName("skip")
|
||||
.setDescription("Skip the current song")
|
||||
.setNameLocalizations({ fr: "passer" })
|
||||
.setDescriptionLocalizations({ fr: "Passer la musique en cours" })
|
||||
|
||||
export async function execute(interaction: ChatInputCommandInteraction) {
|
||||
const queue = useQueue(interaction.guild?.id ?? "")
|
||||
if (!queue) return interaction.followUp({ content: t(interaction.locale, "player.no_queue_search_instead"), flags: MessageFlags.Ephemeral})
|
||||
|
||||
queue.node.skip()
|
||||
return interaction.reply(t(interaction.locale, "player.skipped"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user