refactor: ♻️ rename folder and file codes to snake case
parent
dc8e113efa
commit
06ab27e012
|
@ -5,7 +5,7 @@ bot's main configuration and middleware setup.
|
||||||
import { Bot } from "grammy";
|
import { Bot } from "grammy";
|
||||||
import { BotContext } from "./mod.ts";
|
import { BotContext } from "./mod.ts";
|
||||||
import { BOT_TOKEN } from "./config/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 { setupCommands } from "./commands/mod.ts";
|
||||||
import { setupConversations } from "./conversations/mod.ts";
|
import { setupConversations } from "./conversations/mod.ts";
|
||||||
import { setupSession } from "./session/mod.ts";
|
import { setupSession } from "./session/mod.ts";
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
export { setupCallbackQueries } from "./setupCallbackQueries.ts";
|
|
||||||
export { voteCallback } from "./voteCallback.ts";
|
|
||||||
|
|
||||||
export enum CallbackQueryEnum {
|
|
||||||
NOOP = "noop",
|
|
||||||
APPROVE = "approve",
|
|
||||||
REJECT = "reject",
|
|
||||||
}
|
|
|
@ -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",
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
export { setupCommands } from "./setupCommands.ts";
|
export { setupCommands } from "./setup_commands.ts";
|
||||||
export { cancel } from "./cancel.ts";
|
export { cancel } from "./cancel.ts";
|
||||||
export { post } from "./post.ts";
|
export { post } from "./post.ts";
|
||||||
export { start } from "./start.ts";
|
export { start } from "./start.ts";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export { post } from "./post.ts";
|
export { post } from "./post.ts";
|
||||||
export { setupConversations } from "./setupConversations.ts";
|
export { setupConversations } from "./setup_conversations.ts";
|
||||||
|
|
||||||
export enum ConversationsEnum {
|
export enum ConversationsEnum {
|
||||||
CREATE_POST = "create_post",
|
CREATE_POST = "create_post",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
export * from "./vote.ts";
|
export * from "./vote.ts";
|
||||||
export { getCallbackQueryData } from "./utils.ts";
|
export { getCallbackQueryData } from "./utils.ts";
|
||||||
|
|
||||||
import { CallbackQueryEnum } from "../callbackQueries/mod.ts";
|
import { CallbackQueryEnum } from "../callback_queries/mod.ts";
|
||||||
|
|
||||||
export interface IButtonCallbackData {
|
export interface IButtonCallbackData {
|
||||||
/** Callback Query */
|
/** Callback Query */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { CallbackQueryEnum } from "../callbackQueries/mod.ts";
|
import { CallbackQueryEnum } from "../callback_queries/mod.ts";
|
||||||
import { getCallbackQueryData } from "./mod.ts";
|
import { getCallbackQueryData } from "./mod.ts";
|
||||||
import { InlineKeyboard } from "grammy";
|
import { InlineKeyboard } from "grammy";
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
export { setupMessages } from './setupMessages.ts';
|
export { setupMessages } from './setup_messages.ts';
|
||||||
export { postCredits } from './postCredits.ts';
|
export { postCredits } from './post_credits.ts';
|
|
@ -1,7 +1,7 @@
|
||||||
import { Bot } from "grammy";
|
import { Bot } from "grammy";
|
||||||
import { BotContext } from "../mod.ts";
|
import { BotContext } from "../mod.ts";
|
||||||
import { COMMUNITY_GROUP_ID } from "../config/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<BotContext>) => {
|
export const setupMessages = (bot: Bot<BotContext>) => {
|
||||||
bot.on("message:is_automatic_forward", (ctx) => {
|
bot.on("message:is_automatic_forward", (ctx) => {
|
|
@ -1,5 +1,5 @@
|
||||||
export * from "./utils.ts";
|
export * from "./utils.ts";
|
||||||
export { setupSession } from "./setupSession.ts";
|
export { setupSession } from "./setup_session.ts";
|
||||||
|
|
||||||
import { MemorySessionStorage } from "grammy";
|
import { MemorySessionStorage } from "grammy";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue