refactor(telegram): update logger type to use tslog for improved type safety
This commit is contained in:
parent
ab52104f4c
commit
03842071e3
@ -31,6 +31,7 @@ import type {
|
|||||||
} from "../config/types.telegram.js";
|
} from "../config/types.telegram.js";
|
||||||
import type { RuntimeEnv } from "../runtime.js";
|
import type { RuntimeEnv } from "../runtime.js";
|
||||||
import type { ChannelGroupPolicy } from "../config/group-policy.js";
|
import type { ChannelGroupPolicy } from "../config/group-policy.js";
|
||||||
|
import { Logger } from "tslog";
|
||||||
|
|
||||||
type TelegramHandlersParams = {
|
type TelegramHandlersParams = {
|
||||||
cfg: MoltbotConfig;
|
cfg: MoltbotConfig;
|
||||||
@ -57,7 +58,7 @@ type TelegramHandlersParams = {
|
|||||||
storeAllowFrom: string[],
|
storeAllowFrom: string[],
|
||||||
options?: { forceWasMentioned?: boolean; messageIdOverride?: string },
|
options?: { forceWasMentioned?: boolean; messageIdOverride?: string },
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
logger: { info: (obj: Record<string, unknown>, msg: string) => void };
|
logger: Logger<Record<string, unknown>>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const registerTelegramHandlers = ({
|
export const registerTelegramHandlers = ({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user