refactor: rename clawdbot to moltbot with legacy compat

This commit is contained in:
Peter Steinberger
2026-01-27 12:19:58 +00:00
parent 83460df96f
commit 6d16a658e5
1839 changed files with 11250 additions and 11199 deletions

View File

@@ -7,7 +7,7 @@ let getTelegramSequentialKey: typeof import("./bot.js").getTelegramSequentialKey
let resetInboundDedupe: typeof import("../auto-reply/reply/inbound-dedupe.js").resetInboundDedupe;
const { sessionStorePath } = vi.hoisted(() => ({
sessionStorePath: `/tmp/clawdbot-telegram-throttler-${Math.random().toString(16).slice(2)}.json`,
sessionStorePath: `/tmp/moltbot-telegram-throttler-${Math.random().toString(16).slice(2)}.json`,
}));
const { loadWebMedia } = vi.hoisted(() => ({
loadWebMedia: vi.fn(),
@@ -289,7 +289,7 @@ describe("createTelegramBot", () => {
message_id: 10,
},
},
me: { username: "clawdbot_bot" },
me: { username: "moltbot_bot" },
getFile: async () => ({ download: async () => new Uint8Array() }),
});
@@ -323,7 +323,7 @@ describe("createTelegramBot", () => {
};
await handler({
message,
me: { username: "clawdbot_bot" },
me: { username: "moltbot_bot" },
getFile: async () => ({ download: async () => new Uint8Array() }),
});
@@ -366,7 +366,7 @@ describe("createTelegramBot", () => {
date: 1736380800,
from: { id: 999, username: "random" },
},
me: { username: "clawdbot_bot" },
me: { username: "moltbot_bot" },
getFile: async () => ({ download: async () => new Uint8Array() }),
});
@@ -403,12 +403,12 @@ describe("createTelegramBot", () => {
await handler({
message,
me: { username: "clawdbot_bot" },
me: { username: "moltbot_bot" },
getFile: async () => ({ download: async () => new Uint8Array() }),
});
await handler({
message: { ...message, text: "hello again" },
me: { username: "clawdbot_bot" },
me: { username: "moltbot_bot" },
getFile: async () => ({ download: async () => new Uint8Array() }),
});
@@ -423,7 +423,7 @@ describe("createTelegramBot", () => {
const handler = getOnHandler("message") as (ctx: Record<string, unknown>) => Promise<void>;
await handler({
message: { chat: { id: 42, type: "private" }, text: "hi" },
me: { username: "clawdbot_bot" },
me: { username: "moltbot_bot" },
getFile: async () => ({ download: async () => new Uint8Array() }),
});