This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { MessageFlags } from "discord.js"
|
||||
import type { ButtonInteraction } from "discord.js"
|
||||
import { useQueue } from "discord-player"
|
||||
import { t } from "@/utils/i18n"
|
||||
|
||||
export const id = "player_volume_up"
|
||||
export async function execute(interaction: ButtonInteraction) {
|
||||
const queue = useQueue(interaction.guild?.id ?? "")
|
||||
if (!queue) return
|
||||
|
||||
const volume = queue.node.volume + 10
|
||||
queue.node.setVolume(volume)
|
||||
return interaction.followUp({ content: t(interaction.locale, "player.volume_changed", { volume: volume.toString() }), flags: MessageFlags.Ephemeral })
|
||||
}
|
||||
Reference in New Issue
Block a user