mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 22:16:13 +00:00
solve build errors
This commit is contained in:
1 parent
d81fc1d2e7
commit
775d942e2d
16 files changed
+60
-75
No files matched your search
@@ -35,10 +35,10 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${this.embedOptions.icons.warning} **${client.user?.tag}** is **\`disconnected\`**!` +
|
||||
`${embedOptions.icons.warning} **${client.user?.tag}** is **\`disconnected\`**!` +
|
||||
`\n\n<@${systemOptions.systemUserId}>`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.success} All shards ready**\n**${client.user?.tag}** is now **\`online\`**!`
|
||||
`**${embedOptions.icons.success} All shards ready**\n**${client.user?.tag}** is now **\`online\`**!`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.success)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -36,10 +36,10 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${this.embedOptions.icons.warning} **${client.user?.tag}** is **\`reconnecting\`**!` +
|
||||
`${embedOptions.icons.warning} **${client.user?.tag}** is **\`reconnecting\`**!` +
|
||||
`\n\n<@${systemOptions.systemUserId}>`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.error} Uh-oh... _Something_ went wrong!**\nIt seems there was an issue related to the queue or current track.\n\nIf you performed a command, you can try again.\n\n_If this problem persists, please submit a bug report in the **[support server](${this.botOptions.serverInviteUrl})**._`
|
||||
`**${embedOptions.icons.error} Uh-oh... _Something_ went wrong!**\nIt seems there was an issue related to the queue or current track.\n\nIf you performed a command, you can try again.\n\n_If this problem persists, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.error)
|
||||
.setColor(embedOptions.colors.error)
|
||||
.setFooter({ text: `Execution ID: ${executionId}` })
|
||||
]
|
||||
});
|
||||
@@ -47,10 +47,10 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${this.embedOptions.icons.error} **player.events.on('error')**\nExecution id: ${executionId}\n${error.message}` +
|
||||
`${embedOptions.icons.error} **player.events.on('error')**\nExecution id: ${executionId}\n${error.message}` +
|
||||
`\n\n<@${systemOptions.systemUserId}>`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.error)
|
||||
.setColor(embedOptions.colors.error)
|
||||
.setFooter({ text: `Execution ID: ${executionId}` })
|
||||
]
|
||||
});
|
||||
|
||||
@@ -31,9 +31,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.error} Uh-oh... _Something_ went wrong!**\nIt seems there was an issue while streaming the track.\n\nIf you performed a command, you can try again.\n\n_If this problem persists, please submit a bug report in the **[support server](${this.botOptions.serverInviteUrl})**._`
|
||||
`**${embedOptions.icons.error} Uh-oh... _Something_ went wrong!**\nIt seems there was an issue while streaming the track.\n\nIf you performed a command, you can try again.\n\n_If this problem persists, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.error)
|
||||
.setColor(embedOptions.colors.error)
|
||||
.setFooter({ text: `Execution ID: ${executionId}` })
|
||||
]
|
||||
});
|
||||
@@ -47,10 +47,10 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${this.embedOptions.icons.error} **player.events.on('playerError')**\nExecution id: ${executionId}\n${error.message}` +
|
||||
`${embedOptions.icons.error} **player.events.on('playerError')**\nExecution id: ${executionId}\n${error.message}` +
|
||||
`\n\n<@${systemOptions.systemUserId}>`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.error)
|
||||
.setColor(embedOptions.colors.error)
|
||||
.setFooter({ text: `Execution ID: ${executionId}` })
|
||||
]
|
||||
});
|
||||
|
||||
@@ -32,9 +32,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.error} Uh-oh... _Something_ went wrong!**\nIt seems there was an issue while loading stream for the track.\n\nIf you performed a command, you can try again.\n\n_If this problem persists, please submit a bug report in the **[support server](${this.botOptions.serverInviteUrl})**._`
|
||||
`**${embedOptions.icons.error} Uh-oh... _Something_ went wrong!**\nIt seems there was an issue while loading stream for the track.\n\nIf you performed a command, you can try again.\n\n_If this problem persists, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.error)
|
||||
.setColor(embedOptions.colors.error)
|
||||
.setFooter({ text: `Execution ID: ${executionId}` })
|
||||
]
|
||||
});
|
||||
@@ -48,10 +48,10 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${this.embedOptions.icons.error} **player.events.on('playerSkip')**\nExecution id: ${executionId}\n${track.url}` +
|
||||
`${embedOptions.icons.error} **player.events.on('playerSkip')**\nExecution id: ${executionId}\n${track.url}` +
|
||||
`\n\n<@${systemOptions.systemUserId}>`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.error)
|
||||
.setColor(embedOptions.colors.error)
|
||||
.setFooter({ text: `Execution ID: ${executionId}` })
|
||||
]
|
||||
});
|
||||
|
||||
@@ -27,9 +27,9 @@ export const handleError = async (
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.error} Uh-oh... _Something_ went wrong!**\nThere was an unexpected error while trying to perform this action. You can try again.\n\n_If this problem persists, please submit a bug report in the **[support server](${this.botOptions.serverInviteUrl})**._`
|
||||
`**${embedOptions.icons.error} Uh-oh... _Something_ went wrong!**\nThere was an unexpected error while trying to perform this action. You can try again.\n\n_If this problem persists, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.error)
|
||||
.setColor(embedOptions.colors.error)
|
||||
.setFooter({ text: `Execution ID: ${executionId}` })
|
||||
]
|
||||
};
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||
import {
|
||||
BaseSlashCommandInteraction,
|
||||
BaseSlashCommandParams,
|
||||
BaseSlashCommandReturnType
|
||||
} from '../../../types/interactionTypes';
|
||||
|
||||
class TestCommand extends BaseSlashCommandInteraction {
|
||||
constructor() {
|
||||
const data = new SlashCommandBuilder()
|
||||
.setName('test')
|
||||
.setDescription('This is a test command description lorem ipsum.');
|
||||
super(data);
|
||||
}
|
||||
|
||||
async execute(params: BaseSlashCommandParams): BaseSlashCommandReturnType {
|
||||
const { executionId, interaction } = params;
|
||||
const logger = this.getLogger(this.commandName, executionId, interaction);
|
||||
|
||||
// logic
|
||||
}
|
||||
}
|
||||
|
||||
export default new TestCommand();
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||
import { ApplicationCommandOption, ApplicationCommandOptionData, EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||
import { ExtendedClient } from '../../../types/clientTypes';
|
||||
import {
|
||||
BaseSlashCommandInteraction,
|
||||
@@ -50,8 +50,17 @@ class ReloadCommand extends BaseSlashCommandInteraction {
|
||||
});
|
||||
}
|
||||
|
||||
const commands: string[] | undefined = client!.commands?.map((command) => {
|
||||
const params: string = command.data.options[0] ? `**\`${command.data.options[0].name}\`**` + ' ' : '';
|
||||
const commands: string[] | undefined = client!.commands?.map((command: BaseSlashCommandInteraction) => {
|
||||
let params: string = '';
|
||||
|
||||
if (command.data.options && command.data.options.length > 1) {
|
||||
const options = command.data.options as unknown as ApplicationCommandOptionData[];
|
||||
|
||||
options.map((option: ApplicationCommandOption) => {
|
||||
params += `**\`${option.name}\`**` + ' ';
|
||||
});
|
||||
}
|
||||
|
||||
return `- **\`/${command.data.name}\`** ${params}- ${command.data.description}`;
|
||||
});
|
||||
|
||||
|
||||
@@ -56,12 +56,12 @@ const component: BaseComponentInteraction = {
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: authorName,
|
||||
iconURL: interaction.user.avatarURL() || this.embedOptions.info.fallbackIconUrl
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.success} Disabled filters**\nAll audio filters have been disabled.`
|
||||
`**${embedOptions.icons.success} Disabled filters**\nAll audio filters have been disabled.`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.success)
|
||||
.setColor(embedOptions.colors.success)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
|
||||
@@ -103,7 +103,7 @@ const component: BaseComponentInteraction = {
|
||||
})
|
||||
.join('\n')}`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.success)
|
||||
.setColor(embedOptions.colors.success)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
|
||||
@@ -46,9 +46,9 @@ const component: BaseComponentInteraction = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
@@ -62,9 +62,9 @@ const component: BaseComponentInteraction = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.warning} Oops!**\nThis track has already been skipped or is no longer playing.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThis track has already been skipped or is no longer playing.`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
@@ -77,7 +77,7 @@ const component: BaseComponentInteraction = {
|
||||
: `\`${skippedTrack.duration}\``;
|
||||
|
||||
if (skippedTrack.raw.live) {
|
||||
durationFormat = `${this.embedOptions.icons.liveTrack} \`LIVE\``;
|
||||
durationFormat = `${embedOptions.icons.liveTrack} \`LIVE\``;
|
||||
}
|
||||
queue.node.skip();
|
||||
logger.debug('Skipped the track.');
|
||||
@@ -105,10 +105,10 @@ const component: BaseComponentInteraction = {
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: authorName,
|
||||
iconURL: interaction.user.avatarURL() || this.embedOptions.info.fallbackIconUrl
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${
|
||||
`**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${
|
||||
skippedTrack.raw.url ?? skippedTrack.url
|
||||
})**` +
|
||||
`${
|
||||
@@ -122,7 +122,7 @@ const component: BaseComponentInteraction = {
|
||||
}`
|
||||
)
|
||||
.setThumbnail(skippedTrack.thumbnail)
|
||||
.setColor(this.embedOptions.colors.success)
|
||||
.setColor(embedOptions.colors.success)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
|
||||
@@ -35,9 +35,9 @@ export const cannotJoinVoiceOrTalk = async ({ interaction, executionId }: Cannot
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.warning} Oops!**\nI do not have permission to play audio in the voice channel you are in.\n\nPlease make sure I have the **\`Connect\`** and **\`Speak\`** permissions in this voice channel.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nI do not have permission to play audio in the voice channel you are in.\n\nPlease make sure I have the **\`Connect\`** and **\`Speak\`** permissions in this voice channel.`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
|
||||
@@ -84,9 +84,9 @@ export const cannotSendMessageInChannel = async ({ interaction, executionId }: C
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.warning} Oops!**\nI do not have permission to send message replies in the channel you are in.\n\nPlease make sure I have the **\`View Channel\`** permission in this text channel.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nI do not have permission to send message replies in the channel you are in.\n\nPlease make sure I have the **\`View Channel\`** permission in this text channel.`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ export const queueDoesNotExist = async ({ interaction, queue, executionId }: Que
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
|
||||
@@ -56,9 +56,9 @@ export const queueNoCurrentTrack = async ({ interaction, queue, executionId }: Q
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
|
||||
@@ -87,9 +87,9 @@ export const queueIsEmpty = async ({ interaction, queue, executionId }: QueueIsE
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.warning} Oops!**\nThere are no tracks added to the queue. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks added to the queue. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ export const notValidGuildId = async ({ interaction, executionId }: NotValidGuil
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.warning} Oops!**\nNo permission to execute this command.\n\nThe command **\`/${interactionIdentifier}\`** cannot be executed in this server.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nNo permission to execute this command.\n\nThe command **\`/${interactionIdentifier}\`** cannot be executed in this server.`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ export const notInVoiceChannel = async ({ interaction, executionId }: NotInVoice
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.warning} Not in a voice channel**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Not in a voice channel**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
|
||||
@@ -64,9 +64,9 @@ export const notInSameVoiceChannel = async ({ interaction, queue, executionId }:
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.warning} Not in same voice channel**\nYou need to be in the same voice channel as me to use this command.\n\n**Voice channel:** ${queue.dispatcher.channel.name}`
|
||||
`**${embedOptions.icons.warning} Not in same voice channel**\nYou need to be in the same voice channel as me to use this command.\n\n**Voice channel:** ${queue.dispatcher.channel.name}`
|
||||
)
|
||||
.setColor(this.embedOptions.colors.warning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user