mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +00:00
chore: formatting and sorting
This commit is contained in:
1 parent
0bdc5501be
commit
72e2b2aa13
56 files changed
+283
-217
No files matched your search
+7
-5
@@ -1,12 +1,14 @@
|
|||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
import { registerEventListeners } from './utils/registerEventListeners';
|
|
||||||
import { registerClientCommands } from './utils/registerClientCommands';
|
import { Client } from 'discord.js';
|
||||||
import { createClient } from './utils/factory/createClient';
|
|
||||||
import { createPlayer } from './utils/factory/createPlayer';
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from './services/logger';
|
import loggerModule from './services/logger';
|
||||||
import { ExtendedClient } from './types/clientTypes';
|
import { ExtendedClient } from './types/clientTypes';
|
||||||
import { Client } from 'discord.js';
|
import { createClient } from './utils/factory/createClient';
|
||||||
|
import { createPlayer } from './utils/factory/createPlayer';
|
||||||
|
import { registerClientCommands } from './utils/registerClientCommands';
|
||||||
|
import { registerEventListeners } from './utils/registerEventListeners';
|
||||||
|
|
||||||
const executionId = uuidv4();
|
const executionId = uuidv4();
|
||||||
const logger = loggerModule.child({
|
const logger = loggerModule.child({
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
|
import { BotOptions, EmbedOptions } from '../../types/configTypes';
|
||||||
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
const botOptions: BotOptions = config.get('botOptions');
|
const botOptions: BotOptions = config.get('botOptions');
|
||||||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName('help')
|
.setName('help')
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { getUptimeFormatted } from '../../utils/system/getUptimeFormatted';
|
|
||||||
import{ SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import osu from 'node-os-utils';
|
import osu from 'node-os-utils';
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { version } from '../../../package.json';
|
import { version } from '../../../package.json';
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { getUptimeFormatted } from '../../utils/system/getUptimeFormatted';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions, FFmpegFilterOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
const ffmpegFilterOptions: FFmpegFilterOptions = config.get('ffmpegFilterOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
|
||||||
import {
|
|
||||||
SlashCommandBuilder,
|
|
||||||
EmbedBuilder,
|
|
||||||
ActionRowBuilder,
|
|
||||||
StringSelectMenuBuilder,
|
|
||||||
StringSelectMenuOptionBuilder,
|
|
||||||
ButtonBuilder
|
|
||||||
} from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import {
|
||||||
|
ActionRowBuilder,
|
||||||
|
ButtonBuilder,
|
||||||
|
EmbedBuilder,
|
||||||
|
SlashCommandBuilder,
|
||||||
|
StringSelectMenuBuilder,
|
||||||
|
StringSelectMenuOptionBuilder
|
||||||
|
} from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions, FFmpegFilterOptions } from '../../types/configTypes';
|
||||||
|
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');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import{ SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
const botOptions: BotOptions = config.get('botOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { queueDoesNotExist } from '../../utils/validation/queueValidator';
|
|
||||||
import{ SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { BotOptions, EmbedOptions } from '../../types/configTypes';
|
||||||
|
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');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
import { QueryType, useMainPlayer, useQueue } from 'discord-player';
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
|
||||||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useMainPlayer, useQueue, QueryType } from 'discord-player';
|
|
||||||
import { lyricsExtractor } from '@discord-player/extractor';
|
import { lyricsExtractor } from '@discord-player/extractor';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandAutocompleteParams, CommandParams } from '../../types/commandTypes';
|
import { CommandAutocompleteParams, CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
const recentQueries = new Map();
|
const recentQueries = new Map();
|
||||||
|
|
||||||
const loggerTemplate = loggerModule.child({
|
const loggerTemplate = loggerModule.child({
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
const playerOptions: PlayerOptions = config.get('playerOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
|
||||||
import { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { ActionRowBuilder, ButtonBuilder, EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions, PlayerOptions } from '../../types/configTypes';
|
||||||
|
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
|
const playerOptions: PlayerOptions = config.get('playerOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
@@ -138,8 +139,8 @@ module.exports = {
|
|||||||
queue.repeatMode === 0
|
queue.repeatMode === 0
|
||||||
? ''
|
? ''
|
||||||
: `**${
|
: `**${
|
||||||
queue.repeatMode === 3 ? embedOptions.icons.autoplay : embedOptions.icons.loop
|
queue.repeatMode === 3 ? embedOptions.icons.autoplay : embedOptions.icons.loop
|
||||||
} Looping**\nLoop mode is set to ${loopModeUserString}. You can change it with **\`/loop\`**.`
|
} Looping**\nLoop mode is set to ${loopModeUserString}. You can change it with **\`/loop\`**.`
|
||||||
}`
|
}`
|
||||||
)
|
)
|
||||||
.addFields(
|
.addFields(
|
||||||
@@ -249,10 +250,10 @@ module.exports = {
|
|||||||
queue.repeatMode === 0
|
queue.repeatMode === 0
|
||||||
? ''
|
? ''
|
||||||
: `\n\n**${
|
: `\n\n**${
|
||||||
queue.repeatMode === 3
|
queue.repeatMode === 3
|
||||||
? embedOptions.icons.autoplaying
|
? embedOptions.icons.autoplaying
|
||||||
: embedOptions.icons.looping
|
: embedOptions.icons.looping
|
||||||
} Looping**\nLoop mode is set to ${repeatModeUserString}. You can change it with **\`/loop\`**.`
|
} Looping**\nLoop mode is set to ${repeatModeUserString}. You can change it with **\`/loop\`**.`
|
||||||
}`
|
}`
|
||||||
)
|
)
|
||||||
.setThumbnail(skippedTrack.thumbnail)
|
.setThumbnail(skippedTrack.thumbnail)
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
|
||||||
import{ SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
|
import { useMainPlayer, useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
|
import { CommandAutocompleteParams, CommandParams } from '../../types/commandTypes';
|
||||||
|
import { BotOptions, EmbedOptions, PlayerOptions } from '../../types/configTypes';
|
||||||
|
import { cannotJoinVoiceOrTalk } from '../../utils/validation/permissionValidator';
|
||||||
|
import { transformQuery } from '../../utils/validation/searchQueryValidator';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
const botOptions: BotOptions = config.get('botOptions');
|
const botOptions: BotOptions = config.get('botOptions');
|
||||||
const playerOptions: PlayerOptions = config.get('playerOptions');
|
const playerOptions: PlayerOptions = config.get('playerOptions');
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { cannotJoinVoiceOrTalk } from '../../utils/validation/permissionValidator';
|
|
||||||
import { transformQuery } from '../../utils/validation/searchQueryValidator';
|
|
||||||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useMainPlayer, useQueue } from 'discord-player';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
import { CommandAutocompleteParams, CommandParams } from '../../types/commandTypes';
|
|
||||||
|
|
||||||
const recentQueries = new Map();
|
const recentQueries = new Map();
|
||||||
|
|
||||||
const loggerTemplate = loggerModule.child({
|
const loggerTemplate = loggerModule.child({
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
const playerOptions: PlayerOptions = config.get('playerOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import{ SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions, PlayerOptions } from '../../types/configTypes';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
|
const playerOptions: PlayerOptions = config.get('playerOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { queueDoesNotExist } from '../../utils/validation/queueValidator';
|
|
||||||
import{ SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { queueDoesNotExist } from '../../utils/validation/queueValidator';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
@@ -83,7 +84,9 @@ module.exports = {
|
|||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.success} Removed track**\n**${durationFormat} [${removedTrack.title}](${removedTrack.raw.url ?? removedTrack.url})**`
|
`**${embedOptions.icons.success} Removed track**\n**${durationFormat} [${removedTrack.title}](${
|
||||||
|
removedTrack.raw.url ?? removedTrack.url
|
||||||
|
})**`
|
||||||
)
|
)
|
||||||
.setThumbnail(removedTrack.thumbnail)
|
.setThumbnail(removedTrack.thumbnail)
|
||||||
.setColor(embedOptions.colors.success)
|
.setColor(embedOptions.colors.success)
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
|
||||||
import{ SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { queueDoesNotExist, queueIsEmpty } from '../../utils/validation/queueValidator';
|
|
||||||
import{ SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { queueDoesNotExist, queueIsEmpty } from '../../utils/validation/queueValidator';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
|
||||||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { queueDoesNotExist, queueNoCurrentTrack } from '../../utils/validation/queueValidator';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import{ SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notInVoiceChannel, notInSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
|
||||||
import { queueDoesNotExist } from '../../utils/validation/queueValidator';
|
|
||||||
import{ SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import { useQueue } from 'discord-player';
|
import { useQueue } from 'discord-player';
|
||||||
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { queueDoesNotExist } from '../../utils/validation/queueValidator';
|
||||||
|
import { notInSameVoiceChannel, notInVoiceChannel } from '../../utils/validation/voiceChannelValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isNew: false,
|
isNew: false,
|
||||||
isBeta: false,
|
isBeta: false,
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
import { EmbedBuilder, Guild, SlashCommandBuilder } from 'discord.js';
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notValidGuildId } from '../../utils/validation/systemCommandValidator';
|
|
||||||
import { SlashCommandBuilder, EmbedBuilder, Guild } from 'discord.js';
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { notValidGuildId } from '../../utils/validation/systemCommandValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isSystemCommand: true,
|
isSystemCommand: true,
|
||||||
isNew: false,
|
isNew: false,
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notValidGuildId } from '../../utils/validation/systemCommandValidator';
|
|
||||||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
|
||||||
import { ExtendedClient } from '../../types/clientTypes';
|
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
|
import { ExtendedClient } from '../../types/clientTypes';
|
||||||
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { notValidGuildId } from '../../utils/validation/systemCommandValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isSystemCommand: true,
|
isSystemCommand: true,
|
||||||
isNew: false,
|
isNew: false,
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { notValidGuildId } from '../../utils/validation/systemCommandValidator';
|
|
||||||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { CommandParams, ShardInfo } from '../../types/commandTypes';
|
|
||||||
import { ExtendedClient } from '../../types/clientTypes';
|
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
|
import { ExtendedClient } from '../../types/clientTypes';
|
||||||
|
import { CommandParams, ShardInfo } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { notValidGuildId } from '../../utils/validation/systemCommandValidator';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isSystemCommand: true,
|
isSystemCommand: true,
|
||||||
isNew: false,
|
isNew: false,
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { notValidGuildId } from '../../utils/validation/systemCommandValidator';
|
import { Collection, EmbedBuilder, Guild, SlashCommandBuilder } from 'discord.js';
|
||||||
import { getUptimeFormatted } from '../../utils/system/getUptimeFormatted';
|
|
||||||
import { SlashCommandBuilder, EmbedBuilder, Guild, Collection } from 'discord.js';
|
|
||||||
import osu from 'node-os-utils';
|
import osu from 'node-os-utils';
|
||||||
// @ts-ignore
|
|
||||||
import { version, dependencies } from '../../../package.json';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
|
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
// @ts-ignore
|
||||||
|
import { dependencies, version } from '../../../package.json';
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
import { CommandParams } from '../../types/commandTypes';
|
import { CommandParams } from '../../types/commandTypes';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { getUptimeFormatted } from '../../utils/system/getUptimeFormatted';
|
||||||
|
import { notValidGuildId } from '../../utils/validation/systemCommandValidator';
|
||||||
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import { Events } from 'discord.js';
|
import { Events } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions, SystemOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
const systemOptions: SystemOptions = config.get('systemOptions');
|
|
||||||
import { BaseGuildTextChannel, EmbedBuilder } from 'discord.js';
|
import { BaseGuildTextChannel, EmbedBuilder } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { ExtendedClient } from '../../types/clientTypes';
|
import { ExtendedClient } from '../../types/clientTypes';
|
||||||
|
import { EmbedOptions, SystemOptions } from '../../types/configTypes';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
|
const systemOptions: SystemOptions = config.get('systemOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'disconnect',
|
name: 'disconnect',
|
||||||
isDebug: false,
|
isDebug: false,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import { Events } from 'discord.js';
|
import { Events } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Events, Guild } from 'discord.js';
|
import { Events, Guild } from 'discord.js';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Events, Guild } from 'discord.js';
|
import { Events, Guild } from 'discord.js';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
|
import { BaseGuildTextChannel, EmbedBuilder, Events, PresenceData } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
|
import { ExtendedClient } from '../../types/clientTypes';
|
||||||
import { EmbedOptions, LoadTestOptions, SystemOptions } from '../../types/configTypes';
|
import { EmbedOptions, LoadTestOptions, SystemOptions } from '../../types/configTypes';
|
||||||
|
import { postBotStats } from '../../utils/other/postBotStats';
|
||||||
|
import { startLoadTest } from '../../utils/other/startLoadTest';
|
||||||
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
const systemOptions: SystemOptions = config.get('systemOptions');
|
const systemOptions: SystemOptions = config.get('systemOptions');
|
||||||
const presenceStatusOptions: PresenceData = config.get('presenceStatusOptions');
|
const presenceStatusOptions: PresenceData = config.get('presenceStatusOptions');
|
||||||
const loadTestOptions: LoadTestOptions = config.get('loadTestOptions');
|
const loadTestOptions: LoadTestOptions = config.get('loadTestOptions');
|
||||||
import { postBotStats } from '../../utils/other/postBotStats';
|
|
||||||
import { startLoadTest } from '../../utils/other/startLoadTest';
|
|
||||||
import { Events, EmbedBuilder, PresenceData, BaseGuildTextChannel } from 'discord.js';
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { ExtendedClient } from '../../types/clientTypes';
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: Events.ClientReady,
|
name: Events.ClientReady,
|
||||||
isDebug: false,
|
isDebug: false,
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions, SystemOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
const systemOptions: SystemOptions = config.get('systemOptions');
|
|
||||||
import { BaseGuildTextChannel, EmbedBuilder } from 'discord.js';
|
import { BaseGuildTextChannel, EmbedBuilder } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { ExtendedClient } from '../../types/clientTypes';
|
import { ExtendedClient } from '../../types/clientTypes';
|
||||||
|
import { EmbedOptions, SystemOptions } from '../../types/configTypes';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
|
const systemOptions: SystemOptions = config.get('systemOptions');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'reconnecting',
|
name: 'reconnecting',
|
||||||
isDebug: false,
|
isDebug: false,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import { Events } from 'discord.js';
|
import { Events } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
|
import { EmbedBuilder, Events, Interaction, StringSelectMenuInteraction } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
|
import { Command, ExtendedClient } from '../../types/clientTypes';
|
||||||
import { BotOptions, EmbedOptions } from '../../types/configTypes';
|
import { BotOptions, EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { cannotSendMessageInChannel } from '../../utils/validation/permissionValidator';
|
||||||
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
const botOptions: BotOptions = config.get('botOptions');
|
const botOptions: BotOptions = config.get('botOptions');
|
||||||
import { cannotSendMessageInChannel } from '../../utils/validation/permissionValidator';
|
|
||||||
import { Events, EmbedBuilder, Interaction, StringSelectMenuInteraction } from 'discord.js';
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { ExtendedClient, Command } from '../../types/clientTypes';
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: Events.InteractionCreate,
|
name: Events.InteractionCreate,
|
||||||
isDebug: false,
|
isDebug: false,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
|
import { BaseGuildTextChannel, EmbedBuilder } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
import { BotOptions, EmbedOptions, SystemOptions } from '../../types/configTypes';
|
import { BotOptions, EmbedOptions, SystemOptions } from '../../types/configTypes';
|
||||||
|
import { ExtendedGuildQueuePlayerNode } from '../../types/eventTypes';
|
||||||
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
const botOptions: BotOptions = config.get('botOptions');
|
const botOptions: BotOptions = config.get('botOptions');
|
||||||
const systemOptions: SystemOptions = config.get('systemOptions');
|
const systemOptions: SystemOptions = config.get('systemOptions');
|
||||||
import { BaseGuildTextChannel, EmbedBuilder } from 'discord.js';
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { ExtendedGuildQueuePlayerNode } from '../../types/eventTypes';
|
|
||||||
|
|
||||||
// Emitted when the player queue encounters error (general error with queue)
|
// Emitted when the player queue encounters error (general error with queue)
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'error',
|
name: 'error',
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
|
import { BaseGuildTextChannel, EmbedBuilder } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
import { BotOptions, EmbedOptions, SystemOptions } from '../../types/configTypes';
|
import { BotOptions, EmbedOptions, SystemOptions } from '../../types/configTypes';
|
||||||
|
import { ExtendedGuildQueuePlayerNode } from '../../types/eventTypes';
|
||||||
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
const botOptions: BotOptions = config.get('botOptions');
|
const botOptions: BotOptions = config.get('botOptions');
|
||||||
const systemOptions: SystemOptions = config.get('systemOptions');
|
const systemOptions: SystemOptions = config.get('systemOptions');
|
||||||
import { BaseGuildTextChannel, EmbedBuilder } from 'discord.js';
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { ExtendedGuildQueuePlayerNode } from '../../types/eventTypes';
|
|
||||||
|
|
||||||
// Emitted when the player encounters an error while streaming audio track
|
// Emitted when the player encounters an error while streaming audio track
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'error',
|
name: 'error',
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
|
import { Track } from 'discord-player';
|
||||||
|
import { BaseGuildTextChannel, EmbedBuilder } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
import { BotOptions, EmbedOptions, SystemOptions } from '../../types/configTypes';
|
import { BotOptions, EmbedOptions, SystemOptions } from '../../types/configTypes';
|
||||||
|
import { ExtendedGuildQueuePlayerNode } from '../../types/eventTypes';
|
||||||
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
const botOptions: BotOptions = config.get('botOptions');
|
const botOptions: BotOptions = config.get('botOptions');
|
||||||
const systemOptions: SystemOptions = config.get('systemOptions');
|
const systemOptions: SystemOptions = config.get('systemOptions');
|
||||||
import { BaseGuildTextChannel, EmbedBuilder } from 'discord.js';
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { Track } from 'discord-player';
|
|
||||||
import { ExtendedGuildQueuePlayerNode } from '../../types/eventTypes';
|
|
||||||
|
|
||||||
// Emitted when the audio player fails to load the stream for a track
|
// Emitted when the audio player fails to load the stream for a track
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'playerSkip',
|
name: 'playerSkip',
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { Track } from 'discord-player';
|
import { Track } from 'discord-player';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
import { ExtendedGuildQueuePlayerNode } from '../../types/eventTypes';
|
import { ExtendedGuildQueuePlayerNode } from '../../types/eventTypes';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
+8
-6
@@ -1,11 +1,13 @@
|
|||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
import config from 'config';
|
|
||||||
import { Client, Shard } from 'discord.js';
|
|
||||||
import { ShardingManager, ShardEvents } from 'discord.js';
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import loggerModule from './services/logger';
|
|
||||||
|
|
||||||
const shardingOptions: object = config.get('shardingOptions');
|
import config from 'config';
|
||||||
|
import { Client, Shard, ShardEvents, ShardingManager } from 'discord.js';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
import loggerModule from './services/logger';
|
||||||
|
import { ShardingOptions } from './types/configTypes';
|
||||||
|
|
||||||
|
const shardingOptions: ShardingOptions = config.get('shardingOptions');
|
||||||
|
|
||||||
const manager = new ShardingManager('./dist/bot.js', {
|
const manager = new ShardingManager('./dist/bot.js', {
|
||||||
token: process.env.DISCORD_BOT_TOKEN,
|
token: process.env.DISCORD_BOT_TOKEN,
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import pino from 'pino';
|
|
||||||
import config from 'config';
|
import config from 'config';
|
||||||
|
import pino from 'pino';
|
||||||
|
|
||||||
import { LoggerOptions } from '../types/configTypes';
|
import { LoggerOptions } from '../types/configTypes';
|
||||||
import { TargetOptions } from '../types/serviceTypes';
|
import { TargetOptions } from '../types/serviceTypes';
|
||||||
|
|
||||||
import type { LokiOptions } from 'pino-loki';
|
import type { LokiOptions } from 'pino-loki';
|
||||||
|
|
||||||
// Retrieve logger options from config
|
// Retrieve logger options from config
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { ChatInputCommandInteraction, AutocompleteInteraction } from 'discord.js';
|
import { AutocompleteInteraction, ChatInputCommandInteraction } from 'discord.js';
|
||||||
|
|
||||||
import { ExtendedClient } from './clientTypes';
|
import { ExtendedClient } from './clientTypes';
|
||||||
|
|
||||||
export interface CommandParams {
|
export interface CommandParams {
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
import { ActivityType, PresenceUpdateStatus, ColorResolvable } from 'discord.js';
|
import {
|
||||||
|
ActivityType, ColorResolvable, PresenceUpdateStatus, ShardingManagerOptions
|
||||||
|
} from 'discord.js';
|
||||||
|
|
||||||
export interface BotOptions {
|
export interface BotOptions {
|
||||||
name: string;
|
name: string;
|
||||||
botInviteUrl: string;
|
botInviteUrl: string;
|
||||||
serverInviteUrl: string;
|
serverInviteUrl: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ShardingOptions {
|
export interface ShardingOptions extends ShardingManagerOptions {}
|
||||||
totalShards: string;
|
|
||||||
shardList: string;
|
|
||||||
mode: string;
|
|
||||||
respawn: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface LoggerOptions {
|
export interface LoggerOptions {
|
||||||
minimumLogLevel: string;
|
minimumLogLevel: string;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { GuildQueuePlayerNode } from 'discord-player';
|
import { GuildQueuePlayerNode } from 'discord-player';
|
||||||
import { ExtendedClient } from './clientTypes';
|
|
||||||
import { BaseGuildTextChannel } from 'discord.js';
|
import { BaseGuildTextChannel } from 'discord.js';
|
||||||
|
|
||||||
|
import { ExtendedClient } from './clientTypes';
|
||||||
|
|
||||||
export type ClientEventArguments = unknown[];
|
export type ClientEventArguments = unknown[];
|
||||||
export type ProcessEventArguments = unknown[];
|
export type ProcessEventArguments = unknown[];
|
||||||
export type PlayerEventArguments = unknown[];
|
export type PlayerEventArguments = unknown[];
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Player } from 'discord-player';
|
import { GuildQueue, Player } from 'discord-player';
|
||||||
import { ExtendedClient } from './clientTypes';
|
|
||||||
import { ChatInputCommandInteraction } from 'discord.js';
|
import { ChatInputCommandInteraction } from 'discord.js';
|
||||||
import { GuildQueue } from 'discord-player';
|
|
||||||
|
import { ExtendedClient } from './clientTypes';
|
||||||
|
|
||||||
export interface RegisterEventListenersParams {
|
export interface RegisterEventListenersParams {
|
||||||
client: ExtendedClient;
|
client: ExtendedClient;
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
|
|
||||||
|
import config from 'config';
|
||||||
|
import { REST, RouteLike, Routes, SlashCommandBuilder } from 'discord.js';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { REST, RouteLike, Routes, SlashCommandBuilder } from 'discord.js';
|
|
||||||
import config from 'config';
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import loggerModule from '../services/logger';
|
import loggerModule from '../services/logger';
|
||||||
import { SystemOptions } from '../types/configTypes';
|
import { SystemOptions } from '../types/configTypes';
|
||||||
|
|
||||||
const systemOptions: SystemOptions = config.get('systemOptions');
|
const systemOptions: SystemOptions = config.get('systemOptions');
|
||||||
|
|
||||||
const executionId = uuidv4();
|
const executionId = uuidv4();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Discord from 'discord.js';
|
import Discord, { Client } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { Client } from 'discord.js';
|
|
||||||
|
|
||||||
export const createClient = async ({ executionId }: { executionId: string }) => {
|
export const createClient = async ({ executionId }: { executionId: string }) => {
|
||||||
const logger = loggerModule.child({
|
const logger = loggerModule.child({
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Player } from 'discord-player';
|
import { Player } from 'discord-player';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { CreatePlayerParams } from '../../types/playerTypes';
|
import { CreatePlayerParams } from '../../types/playerTypes';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import path from 'node:path';
|
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
|
import path from 'node:path';
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
const cookies = require(path.resolve('./cookies.json'));
|
const cookies = require(path.resolve('./cookies.json'));
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
import { Collection, Guild } from 'discord.js';
|
||||||
import https from 'node:https';
|
import https from 'node:https';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { PostBotStatsParams, PostBotStatsSite } from '../../types/utilTypes';
|
import { PostBotStatsParams, PostBotStatsSite } from '../../types/utilTypes';
|
||||||
import { Collection, Guild } from 'discord.js';
|
|
||||||
|
|
||||||
export const postBotStats = async ({ client, executionId }: PostBotStatsParams) => {
|
export const postBotStats = async ({ client, executionId }: PostBotStatsParams) => {
|
||||||
const logger = loggerModule.child({
|
const logger = loggerModule.child({
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
|
import { Client } from 'discord.js';
|
||||||
|
|
||||||
import loggerModule from '../../services/logger';
|
import loggerModule from '../../services/logger';
|
||||||
import { LoadTestOptions } from '../../types/configTypes';
|
import { LoadTestOptions } from '../../types/configTypes';
|
||||||
import { Client } from 'discord.js';
|
|
||||||
import { StartLoadTestParams } from '../../types/utilTypes';
|
import { StartLoadTestParams } from '../../types/utilTypes';
|
||||||
|
|
||||||
const loadTestOptions: LoadTestOptions = config.get('loadTestOptions');
|
const loadTestOptions: LoadTestOptions = config.get('loadTestOptions');
|
||||||
|
|
||||||
export const startLoadTest = async ({ client, executionId }: StartLoadTestParams) => {
|
export const startLoadTest = async ({ client, executionId }: StartLoadTestParams) => {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
import { Collection } from 'discord.js';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { Collection } from 'discord.js';
|
|
||||||
import loggerModule from '../services/logger';
|
import loggerModule from '../services/logger';
|
||||||
import { RegisterClientCommandsParams } from '../types/utilTypes';
|
import { RegisterClientCommandsParams } from '../types/utilTypes';
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
|
import config from 'config';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import config from 'config';
|
|
||||||
import loggerModule from '../services/logger';
|
import loggerModule from '../services/logger';
|
||||||
import { LoggerOptions } from '../types/configTypes';
|
import { LoggerOptions } from '../types/configTypes';
|
||||||
|
import {
|
||||||
|
ClientEventArguments, PlayerEventArguments, ProcessEventArguments
|
||||||
|
} from '../types/eventTypes';
|
||||||
import { RegisterEventListenersParams } from '../types/utilTypes';
|
import { RegisterEventListenersParams } from '../types/utilTypes';
|
||||||
import { ClientEventArguments, PlayerEventArguments, ProcessEventArguments } from '../types/eventTypes';
|
|
||||||
const loggerOptions: LoggerOptions = config.get('loggerOptions');
|
const loggerOptions: LoggerOptions = config.get('loggerOptions');
|
||||||
|
|
||||||
export const registerEventListeners = ({ client, player, executionId }: RegisterEventListenersParams) => {
|
export const registerEventListeners = ({ client, player, executionId }: RegisterEventListenersParams) => {
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
import { EmbedBuilder, GuildMember, TextChannel, VoiceChannel } from 'discord.js';
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { EmbedBuilder, GuildMember, VoiceChannel, TextChannel } from 'discord.js';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { CannotJoinVoiceOrTalkParams, CannotSendMessageInChannelParams } from '../../types/utilTypes';
|
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import {
|
||||||
|
CannotJoinVoiceOrTalkParams, CannotSendMessageInChannelParams
|
||||||
|
} from '../../types/utilTypes';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
export const cannotJoinVoiceOrTalk = async ({ interaction, executionId }: CannotJoinVoiceOrTalkParams) => {
|
export const cannotJoinVoiceOrTalk = async ({ interaction, executionId }: CannotJoinVoiceOrTalkParams) => {
|
||||||
const logger = loggerModule.child({
|
const logger = loggerModule.child({
|
||||||
source: 'permissionValidator.js',
|
source: 'permissionValidator.js',
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { EmbedBuilder } from 'discord.js';
|
import { EmbedBuilder } from 'discord.js';
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import { QueueDoesNotExistParams, QueueNoCurrentTrackParams, QueueIsEmptyParams } from '../../types/utilTypes';
|
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import {
|
||||||
|
QueueDoesNotExistParams, QueueIsEmptyParams, QueueNoCurrentTrackParams
|
||||||
|
} from '../../types/utilTypes';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
export const queueDoesNotExist = async ({ interaction, queue, executionId }: QueueDoesNotExistParams) => {
|
export const queueDoesNotExist = async ({ interaction, queue, executionId }: QueueDoesNotExistParams) => {
|
||||||
const logger = loggerModule.child({
|
const logger = loggerModule.child({
|
||||||
source: 'queueValidator.js',
|
source: 'queueValidator.js',
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import loggerModule from '../../services/logger';
|
|
||||||
|
|
||||||
import config from 'config';
|
import config from 'config';
|
||||||
import { EmbedOptions, SystemOptions } from '../../types/configTypes';
|
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
const systemOptions: SystemOptions = config.get('systemOptions');
|
|
||||||
import { EmbedBuilder } from 'discord.js';
|
import { EmbedBuilder } from 'discord.js';
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
|
import { EmbedOptions, SystemOptions } from '../../types/configTypes';
|
||||||
import { NotValidGuildIdParams } from '../../types/utilTypes';
|
import { NotValidGuildIdParams } from '../../types/utilTypes';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
|
const systemOptions: SystemOptions = config.get('systemOptions');
|
||||||
export const notValidGuildId = async ({ interaction, executionId }: NotValidGuildIdParams) => {
|
export const notValidGuildId = async ({ interaction, executionId }: NotValidGuildIdParams) => {
|
||||||
const logger = loggerModule.child({
|
const logger = loggerModule.child({
|
||||||
source: 'systemCommandValidator.js',
|
source: 'systemCommandValidator.js',
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { EmbedOptions } from '../../types/configTypes';
|
|
||||||
import loggerModule from '../../services/logger';
|
|
||||||
import config from 'config';
|
import config from 'config';
|
||||||
const embedOptions: EmbedOptions = config.get('embedOptions');
|
|
||||||
import { EmbedBuilder, GuildMember } from 'discord.js';
|
import { EmbedBuilder, GuildMember } from 'discord.js';
|
||||||
import { NotInVoiceChannelParams, NotInSameVoiceChannelParams } from '../../types/utilTypes';
|
|
||||||
|
|
||||||
|
import loggerModule from '../../services/logger';
|
||||||
|
import { EmbedOptions } from '../../types/configTypes';
|
||||||
|
import { NotInSameVoiceChannelParams, NotInVoiceChannelParams } from '../../types/utilTypes';
|
||||||
|
|
||||||
|
const embedOptions: EmbedOptions = config.get('embedOptions');
|
||||||
export const notInVoiceChannel = async ({ interaction, executionId }: NotInVoiceChannelParams) => {
|
export const notInVoiceChannel = async ({ interaction, executionId }: NotInVoiceChannelParams) => {
|
||||||
const logger = loggerModule.child({
|
const logger = loggerModule.child({
|
||||||
source: 'voiceChannelValidator.js',
|
source: 'voiceChannelValidator.js',
|
||||||
|
|||||||
Reference in new issue
Block a user