mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
fix: eslint formatting errors
This commit is contained in:
1 parent
3575905f7b
commit
fec394ffc0
2 files changed
+13
-23
No files matched your search
@@ -28,13 +28,15 @@ const guildDatabaseClient = {
|
|||||||
) {
|
) {
|
||||||
const logger = getLogger(executionId, interaction);
|
const logger = getLogger(executionId, interaction);
|
||||||
logger.debug(`Getting config for guild ${guildId} from database.`);
|
logger.debug(`Getting config for guild ${guildId} from database.`);
|
||||||
|
|
||||||
const config = await prisma.guildConfig.findUnique({
|
const config = await prisma.guildConfig
|
||||||
where: { guildId: guildId }
|
.findUnique({
|
||||||
}).catch((error) => {
|
where: { guildId: guildId }
|
||||||
logger.error(error, 'Error getting guild config from database.')
|
})
|
||||||
return null;
|
.catch((error) => {
|
||||||
});
|
logger.error(error, 'Error getting guild config from database.');
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
|
||||||
if (!config) {
|
if (!config) {
|
||||||
logger.debug(`No config found for guild ${guildId}.`);
|
logger.debug(`No config found for guild ${guildId}.`);
|
||||||
@@ -103,7 +105,7 @@ export function validateGuildConfig(logger: Logger, configData: GuildConfig) {
|
|||||||
defaultVolume: configData.defaultVolume,
|
defaultVolume: configData.defaultVolume,
|
||||||
defaultSearchEngine: configData.defaultSearchEngine,
|
defaultSearchEngine: configData.defaultSearchEngine,
|
||||||
locale: configData.locale,
|
locale: configData.locale,
|
||||||
actionPermissions: serializeActionPermissions(configData.actionPermissions ?? {}),
|
actionPermissions: serializeActionPermissions(configData.actionPermissions ?? {})
|
||||||
};
|
};
|
||||||
|
|
||||||
return validConfig;
|
return validConfig;
|
||||||
|
|||||||
@@ -1,20 +1,8 @@
|
|||||||
import {
|
import { ChatInputCommandInteraction, EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
ButtonBuilder,
|
|
||||||
APIButtonComponent,
|
|
||||||
ButtonStyle,
|
|
||||||
ChannelType,
|
|
||||||
ChatInputCommandInteraction,
|
|
||||||
EmbedBuilder,
|
|
||||||
APIMessageActionRowComponent,
|
|
||||||
APIActionRowComponent,
|
|
||||||
ComponentType,
|
|
||||||
SlashCommandBuilder,
|
|
||||||
BaseGuildTextChannel
|
|
||||||
} from 'discord.js';
|
|
||||||
import { BaseSlashCommandInteraction } from '../../common/classes/interactions';
|
import { BaseSlashCommandInteraction } from '../../common/classes/interactions';
|
||||||
import { BaseSlashCommandParams, BaseSlashCommandReturnType } from '../../types/interactionTypes';
|
import { BaseSlashCommandParams, BaseSlashCommandReturnType } from '../../types/interactionTypes';
|
||||||
import { Translator, localizeCommand, useServerTranslator } from '../../common/utils/localeUtil';
|
import { localizeCommand, useServerTranslator } from '../../common/utils/localeUtil';
|
||||||
import guildDatabaseClient, { GuildConfig } from '../../common/services/guildDatabaseClient';
|
import guildDatabaseClient from '../../common/services/guildDatabaseClient';
|
||||||
import { Logger } from '../../common/services/logger';
|
import { Logger } from '../../common/services/logger';
|
||||||
|
|
||||||
class SettingsCommand extends BaseSlashCommandInteraction {
|
class SettingsCommand extends BaseSlashCommandInteraction {
|
||||||
|
|||||||
Reference in new issue
Block a user