Skip to content

Commit

Permalink
first plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
v1xingyue committed Jan 9, 2025
1 parent f854bfd commit 0c263a3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/first-plugin-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,17 @@ pnpm run start:client
```

## 1.3 代码解析

### 入口模块

每一个 `eliza` 的插件都是一个 `npm` 包,插件的入口模块是 `index.ts`,插件的入口模块需要导出 `Plugin` 对象, 其中定义插件的相关配置:

```ts
export const twitterPlugin: Plugin = {
name: "twitter",
description: "Twitter integration plugin for posting tweets",
actions: [postAction],
evaluators: [],
providers: [],
};
```

0 comments on commit 0c263a3

Please sign in to comment.