This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { MessageFlags } from "discord.js"
|
||||
import type { ButtonInteraction } from "discord.js"
|
||||
import { useHistory } from "discord-player"
|
||||
import { t } from "@/utils/i18n"
|
||||
|
||||
export const id = "player_previous"
|
||||
export async function execute(interaction: ButtonInteraction) {
|
||||
const history = useHistory(interaction.guild?.id ?? "")
|
||||
if (!history) return
|
||||
|
||||
await history.previous()
|
||||
return interaction.followUp({ content: t(interaction.locale, "player.previous_played"), flags: MessageFlags.Ephemeral })
|
||||
}
|
||||
Reference in New Issue
Block a user