refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { ClawdbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
|
||||
import { telegramPlugin } from "./src/channel.js";
|
||||
@@ -9,7 +9,7 @@ const plugin = {
|
||||
name: "Telegram",
|
||||
description: "Telegram channel plugin",
|
||||
configSchema: emptyPluginConfigSchema(),
|
||||
register(api: ClawdbotPluginApi) {
|
||||
register(api: MoltbotPluginApi) {
|
||||
setTelegramRuntime(api.runtime);
|
||||
api.registerChannel({ plugin: telegramPlugin });
|
||||
},
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name": "@moltbot/telegram",
|
||||
"version": "2026.1.26",
|
||||
"type": "module",
|
||||
"description": "Clawdbot Telegram channel plugin",
|
||||
"clawdbot": {
|
||||
"description": "Moltbot Telegram channel plugin",
|
||||
"moltbot": {
|
||||
"extensions": [
|
||||
"./index.ts"
|
||||
]
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
TelegramConfigSchema,
|
||||
type ChannelMessageActionAdapter,
|
||||
type ChannelPlugin,
|
||||
type ClawdbotConfig,
|
||||
type MoltbotConfig,
|
||||
type ResolvedTelegramAccount,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
|
||||
@@ -408,7 +408,7 @@ export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount> = {
|
||||
},
|
||||
logoutAccount: async ({ accountId, cfg }) => {
|
||||
const envToken = process.env.TELEGRAM_BOT_TOKEN?.trim() ?? "";
|
||||
const nextCfg = { ...cfg } as ClawdbotConfig;
|
||||
const nextCfg = { ...cfg } as MoltbotConfig;
|
||||
const nextTelegram = cfg.channels?.telegram ? { ...cfg.channels.telegram } : undefined;
|
||||
let cleared = false;
|
||||
let changed = false;
|
||||
|
||||
Reference in New Issue
Block a user