diff --git a/bot/src/config.ts b/bot/src/config.ts index 0abe14c0d..10a828291 100644 --- a/bot/src/config.ts +++ b/bot/src/config.ts @@ -9,7 +9,7 @@ import { LoggerLayers } from "./data/data"; import { CreateLayeredLogger } from "./utils/logger"; import { IsRecord } from "./utils/predicates"; import { FormatPrError } from "./utils/prudence"; -import { ServerConfig as ServerConfigType } from "./utils/return-types"; +import { ServerConfig as ServerConfigType } from "./utils/returnTypes"; // Initialise .env. config(); diff --git a/bot/src/interactionHandlers/handleIsCommand.ts b/bot/src/interactionHandlers/handleIsCommand.ts index ed64fb480..747a626b5 100644 --- a/bot/src/interactionHandlers/handleIsCommand.ts +++ b/bot/src/interactionHandlers/handleIsCommand.ts @@ -1,7 +1,7 @@ import { CommandInteraction, MessageEmbed } from "discord.js"; -import { SLASH_COMMANDS } from "../commands/commands"; import { LoggerLayers } from "../data/data"; import { DiscordUserMapDocument } from "../database/documents"; +import { SLASH_COMMANDS } from "../slashCommands/commands"; import { CreateLayeredLogger } from "../utils/logger"; const logger = CreateLayeredLogger(LoggerLayers.slashCommands); diff --git a/bot/src/server/server.ts b/bot/src/server/server.ts index 14a308b0d..36faf298e 100644 --- a/bot/src/server/server.ts +++ b/bot/src/server/server.ts @@ -4,7 +4,7 @@ import { APITokenDocument, PublicUserDocument, WebhookEvents } from "tachi-commo import { BotConfig } from "../config"; import { LoggerLayers } from "../data/data"; import db from "../database/mongo"; -import { RequestTypes, TachiServerV1Get, TachiServerV1Request } from "../utils/fetch-tachi"; +import { RequestTypes, TachiServerV1Get, TachiServerV1Request } from "../utils/fetchTachi"; import { CreateLayeredLogger } from "../utils/logger"; import { VERSION_PRETTY, VERSION_STR } from "../version"; import { ValidateWebhookRequest } from "./middleware"; diff --git a/bot/src/commands/commands.ts b/bot/src/slashCommands/commands.ts similarity index 73% rename from bot/src/commands/commands.ts rename to bot/src/slashCommands/commands.ts index 1b89737a3..b9ca89021 100644 --- a/bot/src/commands/commands.ts +++ b/bot/src/slashCommands/commands.ts @@ -1,7 +1,7 @@ -import ping from "./ping/ping"; -import quote from "./quote/quote"; -import faq from "./faq/faq"; -import sync from "./sync/sync"; +import ping from "./commands/ping"; +import quote from "./commands/quote"; +import faq from "./commands/faq"; +import sync from "./commands/sync"; import { SlashCommand } from "./types"; import { ServerConfig } from "../config"; diff --git a/bot/src/commands/faq/faq.ts b/bot/src/slashCommands/commands/faq.ts similarity index 100% rename from bot/src/commands/faq/faq.ts rename to bot/src/slashCommands/commands/faq.ts diff --git a/bot/src/commands/ping/ping.ts b/bot/src/slashCommands/commands/ping.ts similarity index 85% rename from bot/src/commands/ping/ping.ts rename to bot/src/slashCommands/commands/ping.ts index 62649584a..cafc5a384 100644 --- a/bot/src/commands/ping/ping.ts +++ b/bot/src/slashCommands/commands/ping.ts @@ -1,8 +1,8 @@ import { SlashCommandBuilder } from "@discordjs/builders"; import { ServerConfig } from "../../config"; import { SlashCommand } from "../types"; -import { TachiServerV1Get } from "../../utils/fetch-tachi"; -import { ServerStatus } from "../../utils/return-types"; +import { TachiServerV1Get } from "../../utils/fetchTachi"; +import { ServerStatus } from "../../utils/returnTypes"; const command: SlashCommand = { info: new SlashCommandBuilder() diff --git a/bot/src/commands/quote/quote.ts b/bot/src/slashCommands/commands/quote.ts similarity index 98% rename from bot/src/commands/quote/quote.ts rename to bot/src/slashCommands/commands/quote.ts index a3063c962..b10ea5083 100644 --- a/bot/src/commands/quote/quote.ts +++ b/bot/src/slashCommands/commands/quote.ts @@ -3,7 +3,7 @@ import { Util } from "discord.js"; import { escapeRegExp } from "lodash"; import db from "../../database/mongo"; import { GetQuoteWithID } from "../../database/queries"; -import { GetUserInfo } from "../../utils/api-requests"; +import { GetUserInfo } from "../../utils/apiRequests"; import { CreateEmbed } from "../../utils/embeds"; import { FormatDate, IsAdmin, Pluralise, TruncateString } from "../../utils/misc"; import { SlashCommand } from "../types"; diff --git a/bot/src/commands/sync/sync.ts b/bot/src/slashCommands/commands/sync.ts similarity index 96% rename from bot/src/commands/sync/sync.ts rename to bot/src/slashCommands/commands/sync.ts index ea1cfdef0..e710d1d8d 100644 --- a/bot/src/commands/sync/sync.ts +++ b/bot/src/slashCommands/commands/sync.ts @@ -1,6 +1,6 @@ import { SlashCommandBuilder } from "@discordjs/builders"; import { BotConfig } from "../../config"; -import { PerformScoreImport } from "../../utils/api-requests"; +import { PerformScoreImport } from "../../utils/apiRequests"; import { CreateEmbed } from "../../utils/embeds"; import { Pluralise } from "../../utils/misc"; import { SlashCommand } from "../types"; diff --git a/bot/src/slashCommands/register.ts b/bot/src/slashCommands/register.ts index 3a587c03e..d86ca6b3c 100644 --- a/bot/src/slashCommands/register.ts +++ b/bot/src/slashCommands/register.ts @@ -1,7 +1,7 @@ import { REST } from "@discordjs/rest"; import { Routes } from "discord-api-types/v9"; import { Client } from "discord.js"; -import { SLASH_COMMANDS } from "../commands/commands"; +import { SLASH_COMMANDS } from "./commands"; import { BotConfig } from "../config"; import { LoggerLayers } from "../data/data"; import { CreateLayeredLogger } from "../utils/logger"; diff --git a/bot/src/commands/types.ts b/bot/src/slashCommands/types.ts similarity index 100% rename from bot/src/commands/types.ts rename to bot/src/slashCommands/types.ts diff --git a/bot/src/utils/api-requests.ts b/bot/src/utils/apiRequests.ts similarity index 96% rename from bot/src/utils/api-requests.ts rename to bot/src/utils/apiRequests.ts index 36ade81d7..87885c0a0 100644 --- a/bot/src/utils/api-requests.ts +++ b/bot/src/utils/apiRequests.ts @@ -1,9 +1,9 @@ import { CommandInteraction } from "discord.js"; import { ImportDocument, integer, PublicUserDocument } from "tachi-common"; -import { RequestTypes, TachiServerV1Get, TachiServerV1Request } from "./fetch-tachi"; +import { RequestTypes, TachiServerV1Get, TachiServerV1Request } from "./fetchTachi"; import logger from "./logger"; import { Sleep } from "./misc"; -import { ImportDeferred, ImportPollStatus } from "./return-types"; +import { ImportDeferred, ImportPollStatus } from "./returnTypes"; export async function GetUserInfo(userID: integer) { const res = await TachiServerV1Get(`/users/${userID}`, null); diff --git a/bot/src/utils/fetch-tachi.ts b/bot/src/utils/fetchTachi.ts similarity index 100% rename from bot/src/utils/fetch-tachi.ts rename to bot/src/utils/fetchTachi.ts diff --git a/bot/src/utils/return-types.ts b/bot/src/utils/returnTypes.ts similarity index 100% rename from bot/src/utils/return-types.ts rename to bot/src/utils/returnTypes.ts