mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
WIP
This commit is contained in:
1 parent
d0f1e940a5
commit
6ebf7b9bd3
30 files changed
+174
-71
No files matched your search
@@ -16,14 +16,14 @@ import {
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { EmbedOptions, FFmpegFilterOption, FFmpegFilterOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
const ffmpegFilterOptions: FFmpegFilterOptions = config.get('ffmpegFilterOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -4,13 +4,13 @@ import { EmbedBuilder, GuildMember, SlashCommandBuilder } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { EmbedOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -4,14 +4,14 @@ import { EmbedBuilder, GuildMember, SlashCommandBuilder, SlashCommandStringOptio
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { BotOptions, EmbedOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
const botOptions: BotOptions = config.get('botOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -5,7 +5,7 @@ import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||
import { LyricsData, lyricsExtractor } from '@discord-player/extractor';
|
||||
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { EmbedOptions } from '../../../types/configTypes';
|
||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
@@ -19,7 +19,7 @@ const loggerTemplate: Logger = loggerModule.child({
|
||||
name: '/lyrics'
|
||||
});
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from 'discord.js';
|
||||
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { CustomSlashCommandInteraction, TrackMetadata } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction, TrackMetadata } from '../../../types/interactionTypes';
|
||||
import { EmbedOptions, PlayerOptions } from '../../../types/configTypes';
|
||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
@@ -21,7 +21,7 @@ import { Logger } from 'pino';
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
const playerOptions: PlayerOptions = config.get('playerOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -4,13 +4,13 @@ import { EmbedBuilder, GuildMember, SlashCommandBuilder } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { EmbedOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -3,7 +3,7 @@ import { GuildQueue, useMainPlayer, useQueue } from 'discord-player';
|
||||
import { EmbedBuilder, GuildMember, SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { CustomError, CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { CustomError, BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BotOptions, EmbedOptions, PlayerOptions } from '../../../types/configTypes';
|
||||
import { cannotJoinVoiceOrTalk } from '../../../utils/validation/permissionValidator';
|
||||
import { transformQuery } from '../../../utils/validation/searchQueryValidator';
|
||||
@@ -20,7 +20,7 @@ const loggerTemplate: Logger = loggerModule.child({
|
||||
name: '/play'
|
||||
});
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -4,14 +4,14 @@ import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { EmbedOptions, PlayerOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
const playerOptions: PlayerOptions = config.get('playerOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -4,13 +4,13 @@ import { EmbedBuilder, GuildMember, SlashCommandBuilder } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { EmbedOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -4,13 +4,13 @@ import { EmbedBuilder, GuildMember, SlashCommandBuilder } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { EmbedOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -4,13 +4,13 @@ import { EmbedBuilder, GuildMember, SlashCommandBuilder } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { EmbedOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist, queueIsEmpty } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -4,13 +4,13 @@ import { EmbedBuilder, GuildMember, SlashCommandBuilder } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { EmbedOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -4,13 +4,13 @@ import { EmbedBuilder, GuildMember, SlashCommandBuilder } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { EmbedOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import { BaseCommandInteraction, BaseSlashCommandParams } from '../../../types/interactionTypes';
|
||||
|
||||
export class TestCommandInteraction extends BaseCommandInteraction {
|
||||
constructor() {
|
||||
const data = new SlashCommandBuilder().setName('test').setDescription('Test command');
|
||||
super(data);
|
||||
}
|
||||
|
||||
async execute(params: BaseSlashCommandParams): Promise<void> {
|
||||
const { executionId, interaction } = params;
|
||||
const logger = this.getLogger('test.ts', 'test', executionId, interaction);
|
||||
|
||||
logger.info('test command executed');
|
||||
logger.info(`${interaction.user.tag} executed test command`);
|
||||
logger.info(`Execution ID: ${executionId}`);
|
||||
|
||||
logger.info(this.embedOptions.icons.success + ' Icon success from config.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export default new TestCommandInteraction();
|
||||
@@ -4,13 +4,13 @@ import { EmbedBuilder, GuildMember, SlashCommandBuilder } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import loggerModule from '../../../services/logger';
|
||||
import { EmbedOptions } from '../../../types/configTypes';
|
||||
import { CustomSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { BaseSlashCommandInteraction } from '../../../types/interactionTypes';
|
||||
import { queueDoesNotExist } from '../../../utils/validation/queueValidator';
|
||||
import { notInSameVoiceChannel, notInVoiceChannel } from '../../../utils/validation/voiceChannelValidator';
|
||||
|
||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||
|
||||
const command: CustomSlashCommandInteraction = {
|
||||
const command: BaseSlashCommandInteraction = {
|
||||
isNew: false,
|
||||
isBeta: false,
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
Reference in new issue
Block a user