karafra / ai-art

Discord bot generating images from given query
https://karafra.github.io/ai-art/
Apache License 2.0
75 stars 33 forks source link

TypeError: Cannot destructure property 'dtoInstance' of 'commandNode' as it is undefined. #40

Closed rowanfreeman closed 1 year ago

rowanfreeman commented 1 year ago

I successfully deployed the app using docker-compose -f "docker/deploy/docker-compose.yml" up -d.

But when I interact with the bot with /ai-story story, it crashes and I see the following error in the logs.

2023-01-24 16:05:09 This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
2023-01-24 16:05:09 TypeError: Cannot destructure property 'dtoInstance' of 'commandNode' as it is undefined.
2023-01-24 16:05:09     at CommandExplorer.<anonymous> (/usr/src/app/node_modules/@discord-nestjs/core/src/explorers/command/command.explorer.ts:90:17)
2023-01-24 16:05:09     at Generator.next (<anonymous>)
2023-01-24 16:05:09     at /usr/src/app/node_modules/@discord-nestjs/core/dist/explorers/command/command.explorer.js:17:71
2023-01-24 16:05:09     at new Promise (<anonymous>)
2023-01-24 16:05:09     at __awaiter (/usr/src/app/node_modules/@discord-nestjs/core/dist/explorers/command/command.explorer.js:13:12)
2023-01-24 16:05:09     at Client.<anonymous> (/usr/src/app/node_modules/@discord-nestjs/core/src/explorers/command/command.explorer.ts:67:76)
2023-01-24 16:05:09     at Client.emit (node:events:525:35)
2023-01-24 16:05:09     at Client.emit (node:domain:489:12)
2023-01-24 16:05:09     at InteractionCreateAction.handle (/usr/src/app/node_modules/discord.js/src/client/actions/InteractionCreate.js:83:12)
2023-01-24 16:05:09     at Object.module.exports [as INTERACTION_CREATE] (/usr/src/app/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
2023-01-24 16:05:09     at WebSocketManager.handlePacket (/usr/src/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:346:31)
2023-01-24 16:05:09     at WebSocketShard.onPacket (/usr/src/app/node_modules/discord.js/src/client/websocket/WebSocketShard.js:478:22)
2023-01-24 16:05:09     at WebSocketShard.onMessage (/usr/src/app/node_modules/discord.js/src/client/websocket/WebSocketShard.js:317:10)
2023-01-24 16:05:09     at WebSocket.onMessage (/usr/src/app/node_modules/ws/lib/event-target.js:199:18)
2023-01-24 16:05:09     at WebSocket.emit (node:events:513:28)
2023-01-24 16:05:09     at WebSocket.emit (node:domain:489:12)
rowanfreeman commented 1 year ago

I resolved this by removing the bot from my server and re-adding it. However, now the command to do /ai-story story is gone.