25 lines
580 B
TypeScript
25 lines
580 B
TypeScript
import { CacheType, ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
|
|
import { getQueue } from '../playback';
|
|
|
|
const name = "queue"
|
|
|
|
function register() {
|
|
return new SlashCommandBuilder()
|
|
.setName(name)
|
|
.setDescription('Shows queue')
|
|
}
|
|
|
|
async function execute(interaction: ChatInputCommandInteraction<CacheType>) {
|
|
console.log(interaction.member)
|
|
const queue = getQueue()
|
|
await interaction.reply(`Current: ${queue.current}
|
|
Queue:
|
|
${queue.songList.join('\n ')}`);
|
|
}
|
|
|
|
export default {
|
|
name,
|
|
register,
|
|
execute
|
|
}
|