added rzeczy
This commit is contained in:
27
src/commands/resume.ts
Normal file
27
src/commands/resume.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user