mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 16:44:33 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* Twitch channel plugin for Clawdbot.
|
||||
* Twitch channel plugin for Moltbot.
|
||||
*
|
||||
* Main plugin export combining all adapters (outbound, actions, status, gateway).
|
||||
* This is the primary entry point for the Twitch channel integration.
|
||||
*/
|
||||
|
||||
import type { ClawdbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import { buildChannelConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import { twitchMessageActions } from "./actions.js";
|
||||
import { TwitchConfigSchema } from "./config-schema.js";
|
||||
@@ -33,7 +33,7 @@ import type {
|
||||
* Twitch channel plugin.
|
||||
*
|
||||
* Implements the ChannelPlugin interface to provide Twitch chat integration
|
||||
* for Clawdbot. Supports message sending, receiving, access control, and
|
||||
* for Moltbot. Supports message sending, receiving, access control, and
|
||||
* status monitoring.
|
||||
*/
|
||||
export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
||||
@@ -75,10 +75,10 @@ export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
||||
/** Account configuration management */
|
||||
config: {
|
||||
/** List all configured account IDs */
|
||||
listAccountIds: (cfg: ClawdbotConfig): string[] => listAccountIds(cfg),
|
||||
listAccountIds: (cfg: MoltbotConfig): string[] => listAccountIds(cfg),
|
||||
|
||||
/** Resolve an account config by ID */
|
||||
resolveAccount: (cfg: ClawdbotConfig, accountId?: string | null): TwitchAccountConfig => {
|
||||
resolveAccount: (cfg: MoltbotConfig, accountId?: string | null): TwitchAccountConfig => {
|
||||
const account = getAccountConfig(cfg, accountId ?? DEFAULT_ACCOUNT_ID);
|
||||
if (!account) {
|
||||
// Return a default/empty account if not configured
|
||||
@@ -96,7 +96,7 @@ export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
||||
defaultAccountId: (): string => DEFAULT_ACCOUNT_ID,
|
||||
|
||||
/** Check if an account is configured */
|
||||
isConfigured: (_account: unknown, cfg: ClawdbotConfig): boolean => {
|
||||
isConfigured: (_account: unknown, cfg: MoltbotConfig): boolean => {
|
||||
const account = getAccountConfig(cfg, DEFAULT_ACCOUNT_ID);
|
||||
const tokenResolution = resolveTwitchToken(cfg, { accountId: DEFAULT_ACCOUNT_ID });
|
||||
return account ? isAccountConfigured(account, tokenResolution.token) : false;
|
||||
@@ -130,7 +130,7 @@ export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
||||
kind,
|
||||
runtime,
|
||||
}: {
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
accountId?: string | null;
|
||||
inputs: string[];
|
||||
kind: ChannelResolveKind;
|
||||
@@ -198,7 +198,7 @@ export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
||||
probe,
|
||||
}: {
|
||||
account: TwitchAccountConfig;
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
runtime?: ChannelAccountSnapshot;
|
||||
probe?: unknown;
|
||||
}): ChannelAccountSnapshot => {
|
||||
|
||||
Reference in New Issue
Block a user