28 lines
620 B
TypeScript
28 lines
620 B
TypeScript
import { CacheType, ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
|
|
import { resume_playback } from '../playback';
|
|
import { player } from '../main';
|
|
|
|
|
|
const name = "resume"
|
|
|
|
function register() {
|
|
return new SlashCommandBuilder()
|
|
.setName(name)
|
|
.setDescription('resume playback')
|
|
}
|
|
|
|
async function execute(interaction: ChatInputCommandInteraction<CacheType>) {
|
|
try {
|
|
resume_playback(player)
|
|
} catch (error) {
|
|
console.error(error);
|
|
await interaction.reply('Coś poszło nie tak :/');
|
|
}
|
|
}
|
|
|
|
export default {
|
|
name,
|
|
register,
|
|
execute
|
|
}
|