Skip to content

Commit 96b5d09

Browse files
committed
add callback
1 parent ae42629 commit 96b5d09

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/plugin-nft-collections/src/actions/get-collections.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { State } from "@elizaos/core";
2+
import { HandlerCallback } from "@elizaos/core";
13
import { Action, IAgentRuntime, Memory, Provider } from "@elizaos/core";
24

35
export const getCollectionsAction = (
@@ -13,12 +15,21 @@ export const getCollectionsAction = (
1315
.toLowerCase()
1416
.includes("nft collections");
1517
},
16-
handler: async (runtime: IAgentRuntime, message: Memory) => {
18+
handler: async (
19+
runtime: IAgentRuntime,
20+
message: Memory,
21+
state: State,
22+
options: any,
23+
callback: HandlerCallback
24+
) => {
1725
try {
1826
const response = await nftCollectionProvider.get(
1927
runtime,
2028
message
2129
);
30+
callback({
31+
text: response,
32+
});
2233
await runtime.messageManager.createMemory({
2334
id: message.id,
2435
content: { text: response },

0 commit comments

Comments
 (0)