2022-12-16 16:10:16 +01:00
|
|
|
import { TransformPipe } from '@discord-nestjs/common';
|
|
|
|
|
|
|
|
import {
|
|
|
|
Command,
|
2022-12-17 16:58:38 +01:00
|
|
|
CommandExecutionContext,
|
|
|
|
DiscordCommand,
|
2022-12-16 16:10:16 +01:00
|
|
|
DiscordTransformedCommand,
|
|
|
|
TransformedCommandExecutionContext,
|
|
|
|
UsePipes,
|
|
|
|
} from '@discord-nestjs/core';
|
2022-12-17 16:58:38 +01:00
|
|
|
import {
|
|
|
|
ButtonInteraction,
|
|
|
|
CacheType,
|
|
|
|
ChatInputCommandInteraction,
|
|
|
|
ContextMenuCommandInteraction,
|
|
|
|
Interaction,
|
|
|
|
InteractionReplyOptions,
|
|
|
|
MessagePayload,
|
|
|
|
StringSelectMenuInteraction,
|
|
|
|
} from 'discord.js';
|
2022-12-16 16:10:16 +01:00
|
|
|
|
|
|
|
@Command({
|
|
|
|
name: 'pause',
|
|
|
|
description: 'Pause or resume the playback of the current track',
|
|
|
|
})
|
|
|
|
@UsePipes(TransformPipe)
|
2022-12-17 16:58:38 +01:00
|
|
|
export class PausePlaybackCommand implements DiscordCommand {
|
2022-12-16 16:10:16 +01:00
|
|
|
handler(
|
2022-12-17 16:58:38 +01:00
|
|
|
interaction:
|
|
|
|
| ChatInputCommandInteraction<CacheType>
|
|
|
|
| ContextMenuCommandInteraction<CacheType>,
|
|
|
|
executionContext: CommandExecutionContext<
|
|
|
|
StringSelectMenuInteraction<CacheType> | ButtonInteraction<CacheType>
|
|
|
|
>,
|
|
|
|
): string | InteractionReplyOptions {
|
|
|
|
return {
|
|
|
|
content: 'test',
|
|
|
|
};
|
2022-12-16 16:10:16 +01:00
|
|
|
}
|
|
|
|
}
|