When DM the bot this will crash with the error below.
Steps to reproduce:
Right click on bot
Message
write /test
{"level":30,"time":1673884652389,"pid":31169,"hostname":"dwa16","msg":"New Interaction: Type: 2, ID: 1064574149634310256"}
/home/dbu/projects/kycaml-bot/dist/api/handlers/interactions.js:48
const userId = req.body.member.user.id;
^
TypeError: Cannot read properties of undefined (reading 'user')
at handleTestCommand (/home/dbu/projects/kycaml-bot/dist/api/handlers/interactions.js:48:36)
at handleInteractions (/home/dbu/projects/kycaml-bot/dist/api/handlers/interactions.js:34:24)
at Layer.handle [as handle_request] (/home/dbu/projects/kycaml-bot/node_modules/express/lib/router/layer.js:95:5)
at next (/home/dbu/projects/kycaml-bot/node_modules/express/lib/router/route.js:144:13)
at Route.dispatch (/home/dbu/projects/kycaml-bot/node_modules/express/lib/router/route.js:114:3)
at Layer.handle [as handle_request] (/home/dbu/projects/kycaml-bot/node_modules/express/lib/router/layer.js:95:5)
at /home/dbu/projects/kycaml-bot/node_modules/express/lib/router/index.js:284:15
at Function.process_params (/home/dbu/projects/kycaml-bot/node_modules/express/lib/router/index.js:346:12)
at next (/home/dbu/projects/kycaml-bot/node_modules/express/lib/router/index.js:280:10)
at /home/dbu/projects/kycaml-bot/node_modules/body-parser/lib/read.js:137:5
Node.js v18.12.1
make: *** [Makefile:22: start] Error 1
When DM the bot this will crash with the error below. Steps to reproduce:
Right click on bot Message write /test