How do i make integrate inworldAI into my discord bot(NodeJS)?

So i found the NodeJS integration example however when i tried the discord example it i got error: index.ts:117:22 - error TS2345: Argument of type '(() => void) | undefined' is not assignable to parameter of type '() => void'.
Type 'undefined' is not assignable to type '() => void'

how do i integrate inworld ai so i can use it on discord. Could someone make a detailed tutorial specifically for discord chatbot? do i need to install the entire nodeJS integration or should i use only the discord example package.json?

Discord bot example in package is updated
Try new version again

So you don't need additional actions just yarn install and then yarn start

can you tell me more detailed tutorial? yarn install then when do i start? and what is scene id?


  • Download new updated package and find discord example inside
  • yarn install && yarn start

It should work

From README (@inworld/nodejs-sdk - npm) about INWORLD_SCENE:
// Use a full character name.
// It should be like workspaces/{WORKSPACE_NAME}/characters/{CHARACTER_NAME}.
// Or like workspaces/{WORKSPACE_NAME}/scenes/{SCENE_NAME}.

You can use copy this integration id using character context menu in characters list (the same for scenes)
If you copy scene id first character in this scene will be used. But you can change it to another one during conversation or before it (see CLI example and README)