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,10 +1,13 @@
|
||||
import { GuildQueue } from 'discord-player'
|
||||
import { PlayerMetadata } from '../../utils/player'
|
||||
|
||||
export default {
|
||||
name: 'emptyQueue',
|
||||
async execute(queue: GuildQueue<PlayerMetadata>) {
|
||||
// Emitted when the player queue has finished
|
||||
queue.metadata.channel.send("File d'attente vide !")
|
||||
}
|
||||
}
|
||||
import type { GuildQueue } from "discord-player"
|
||||
import type { PlayerMetadata } from "@/types/player"
|
||||
import { stopProgressSaving } from "@/utils/player"
|
||||
import { t } from "@/utils/i18n"
|
||||
|
||||
export const name = "emptyQueue"
|
||||
export async function execute(queue: GuildQueue<PlayerMetadata>) {
|
||||
// Emitted when the player queue has finished
|
||||
await stopProgressSaving(queue.guild.id, queue.player.client.user?.id ?? "")
|
||||
|
||||
if (!queue.metadata.channel) return
|
||||
if ("send" in queue.metadata.channel) return queue.metadata.channel.send({ content: t(queue.guild.preferredLocale, "player.queue_empty") })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user