From 06ab27e012464668ffe0eb4a45e2d466d7c1d788 Mon Sep 17 00:00:00 2001 From: drendog Date: Thu, 25 Jan 2024 00:45:20 +0100 Subject: [PATCH] refactor: :recycle: rename folder and file codes to snake case --- src/bot.ts | 2 +- src/callbackQueries/mod.ts | 8 -------- src/callback_queries/mod.ts | 8 ++++++++ .../setup_callback_queries.ts} | 0 src/{callbackQueries => callback_queries}/utils.ts | 0 .../voteCallback.ts => callback_queries/vote_callback.ts} | 0 src/commands/mod.ts | 2 +- src/commands/{setupCommands.ts => setup_commands.ts} | 0 src/conversations/mod.ts | 2 +- .../{setupConversations.ts => setup_conversations.ts} | 0 src/keyboards/mod.ts | 2 +- src/keyboards/vote.ts | 2 +- src/messages/mod.ts | 4 ++-- src/messages/{postCredits.ts => post_credits.ts} | 0 src/messages/{setupMessages.ts => setup_messages.ts} | 2 +- src/session/mod.ts | 2 +- src/session/{setupSession.ts => setup_session.ts} | 0 17 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 src/callbackQueries/mod.ts create mode 100644 src/callback_queries/mod.ts rename src/{callbackQueries/setupCallbackQueries.ts => callback_queries/setup_callback_queries.ts} (100%) rename src/{callbackQueries => callback_queries}/utils.ts (100%) rename src/{callbackQueries/voteCallback.ts => callback_queries/vote_callback.ts} (100%) rename src/commands/{setupCommands.ts => setup_commands.ts} (100%) rename src/conversations/{setupConversations.ts => setup_conversations.ts} (100%) rename src/messages/{postCredits.ts => post_credits.ts} (100%) rename src/messages/{setupMessages.ts => setup_messages.ts} (88%) rename src/session/{setupSession.ts => setup_session.ts} (100%) diff --git a/src/bot.ts b/src/bot.ts index 6c73faa..f20b6ef 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -5,7 +5,7 @@ bot's main configuration and middleware setup. import { Bot } from "grammy"; import { BotContext } from "./mod.ts"; import { BOT_TOKEN } from "./config/mod.ts"; -import { setupCallbackQueries } from "./callbackQueries/mod.ts"; +import { setupCallbackQueries } from "./callback_queries/mod.ts"; import { setupCommands } from "./commands/mod.ts"; import { setupConversations } from "./conversations/mod.ts"; import { setupSession } from "./session/mod.ts"; diff --git a/src/callbackQueries/mod.ts b/src/callbackQueries/mod.ts deleted file mode 100644 index 4504be9..0000000 --- a/src/callbackQueries/mod.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { setupCallbackQueries } from "./setupCallbackQueries.ts"; -export { voteCallback } from "./voteCallback.ts"; - -export enum CallbackQueryEnum { - NOOP = "noop", - APPROVE = "approve", - REJECT = "reject", -} diff --git a/src/callback_queries/mod.ts b/src/callback_queries/mod.ts new file mode 100644 index 0000000..562ada9 --- /dev/null +++ b/src/callback_queries/mod.ts @@ -0,0 +1,8 @@ +export { setupCallbackQueries } from "./setup_callback_queries.ts"; +export { voteCallback } from "./vote_callback.ts"; + +export enum CallbackQueryEnum { + NOOP = "noop", + APPROVE = "approve", + REJECT = "reject", +} diff --git a/src/callbackQueries/setupCallbackQueries.ts b/src/callback_queries/setup_callback_queries.ts similarity index 100% rename from src/callbackQueries/setupCallbackQueries.ts rename to src/callback_queries/setup_callback_queries.ts diff --git a/src/callbackQueries/utils.ts b/src/callback_queries/utils.ts similarity index 100% rename from src/callbackQueries/utils.ts rename to src/callback_queries/utils.ts diff --git a/src/callbackQueries/voteCallback.ts b/src/callback_queries/vote_callback.ts similarity index 100% rename from src/callbackQueries/voteCallback.ts rename to src/callback_queries/vote_callback.ts diff --git a/src/commands/mod.ts b/src/commands/mod.ts index 0a809a0..11291c2 100644 --- a/src/commands/mod.ts +++ b/src/commands/mod.ts @@ -1,4 +1,4 @@ -export { setupCommands } from "./setupCommands.ts"; +export { setupCommands } from "./setup_commands.ts"; export { cancel } from "./cancel.ts"; export { post } from "./post.ts"; export { start } from "./start.ts"; diff --git a/src/commands/setupCommands.ts b/src/commands/setup_commands.ts similarity index 100% rename from src/commands/setupCommands.ts rename to src/commands/setup_commands.ts diff --git a/src/conversations/mod.ts b/src/conversations/mod.ts index da8db20..62591bd 100644 --- a/src/conversations/mod.ts +++ b/src/conversations/mod.ts @@ -1,5 +1,5 @@ export { post } from "./post.ts"; -export { setupConversations } from "./setupConversations.ts"; +export { setupConversations } from "./setup_conversations.ts"; export enum ConversationsEnum { CREATE_POST = "create_post", diff --git a/src/conversations/setupConversations.ts b/src/conversations/setup_conversations.ts similarity index 100% rename from src/conversations/setupConversations.ts rename to src/conversations/setup_conversations.ts diff --git a/src/keyboards/mod.ts b/src/keyboards/mod.ts index 16a83a8..9497906 100644 --- a/src/keyboards/mod.ts +++ b/src/keyboards/mod.ts @@ -1,7 +1,7 @@ export * from "./vote.ts"; export { getCallbackQueryData } from "./utils.ts"; -import { CallbackQueryEnum } from "../callbackQueries/mod.ts"; +import { CallbackQueryEnum } from "../callback_queries/mod.ts"; export interface IButtonCallbackData { /** Callback Query */ diff --git a/src/keyboards/vote.ts b/src/keyboards/vote.ts index 3f5b28f..3263776 100644 --- a/src/keyboards/vote.ts +++ b/src/keyboards/vote.ts @@ -1,4 +1,4 @@ -import { CallbackQueryEnum } from "../callbackQueries/mod.ts"; +import { CallbackQueryEnum } from "../callback_queries/mod.ts"; import { getCallbackQueryData } from "./mod.ts"; import { InlineKeyboard } from "grammy"; diff --git a/src/messages/mod.ts b/src/messages/mod.ts index 601136b..f1cc01f 100644 --- a/src/messages/mod.ts +++ b/src/messages/mod.ts @@ -1,2 +1,2 @@ -export { setupMessages } from './setupMessages.ts'; -export { postCredits } from './postCredits.ts'; \ No newline at end of file +export { setupMessages } from './setup_messages.ts'; +export { postCredits } from './post_credits.ts'; \ No newline at end of file diff --git a/src/messages/postCredits.ts b/src/messages/post_credits.ts similarity index 100% rename from src/messages/postCredits.ts rename to src/messages/post_credits.ts diff --git a/src/messages/setupMessages.ts b/src/messages/setup_messages.ts similarity index 88% rename from src/messages/setupMessages.ts rename to src/messages/setup_messages.ts index 4f7799b..6557e5c 100644 --- a/src/messages/setupMessages.ts +++ b/src/messages/setup_messages.ts @@ -1,7 +1,7 @@ import { Bot } from "grammy"; import { BotContext } from "../mod.ts"; import { COMMUNITY_GROUP_ID } from "../config/mod.ts"; -import { postCredits } from "./postCredits.ts"; +import { postCredits } from "./post_credits.ts"; export const setupMessages = (bot: Bot) => { bot.on("message:is_automatic_forward", (ctx) => { diff --git a/src/session/mod.ts b/src/session/mod.ts index 8333281..57c0acf 100644 --- a/src/session/mod.ts +++ b/src/session/mod.ts @@ -1,5 +1,5 @@ export * from "./utils.ts"; -export { setupSession } from "./setupSession.ts"; +export { setupSession } from "./setup_session.ts"; import { MemorySessionStorage } from "grammy"; diff --git a/src/session/setupSession.ts b/src/session/setup_session.ts similarity index 100% rename from src/session/setupSession.ts rename to src/session/setup_session.ts