FM
FM
how to pass variables from one interaction into the next?
this is my current workflow concept: 1. user runs slash command 2. modal pops up, user enters email 3. bot validates email against regex, API service 4. if no account is found on service that matches the email, a message is provided with the option for the bot to create an account on the service on behalf of the user using the provided email 5. user selects the "Create Account" button when the user enters their email in the initial modal, it is stored as a variable in the modal interaction handler. how do i pass that variable into the button handler? is there a way to do this internally without explicitly exporting the variable?
46 replies
[ERROR] Encountered error on event listener "CorePreChatInputCommandRun"
I'm getting this error repeatedly on an OwnerOnly precondition:
[ERROR] Encountered error on event listener "CorePreChatInputCommandRun" for event "preChatInputCommandRun" at path "/home/effem/effem.dev/COREBot/node_modules/@sapphire/framework/dist/listeners/application-commands/chat-input/CorePreChatInputCommandRun.js" TypeError: Cannot read properties of undefined (reading 'isErr')
at Object.chatInputSequential (/home/effem/effem.dev/COREBot/node_modules/@sapphire/framework/dist/lib/utils/preconditions/conditions/PreconditionConditionAnd.js:22:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async CoreListener.run (/home/effem/effem.dev/COREBot/node_modules/@sapphire/framework/dist/listeners/application-commands/chat-input/CorePreChatInputCommandRun.js:19:25)
at async Object.fromAsync (/home/effem/effem.dev/COREBot/node_modules/@sapphire/result/dist/index.js:613:22)
at async CoreListener._run (/home/effem/effem.dev/COREBot/node_modules/@sapphire/framework/dist/lib/structures/Listener.js:48:22)
[ERROR] Encountered error on event listener "CorePreChatInputCommandRun" for event "preChatInputCommandRun" at path "/home/effem/effem.dev/COREBot/node_modules/@sapphire/framework/dist/listeners/application-commands/chat-input/CorePreChatInputCommandRun.js" TypeError: Cannot read properties of undefined (reading 'isErr')
at Object.chatInputSequential (/home/effem/effem.dev/COREBot/node_modules/@sapphire/framework/dist/lib/utils/preconditions/conditions/PreconditionConditionAnd.js:22:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async CoreListener.run (/home/effem/effem.dev/COREBot/node_modules/@sapphire/framework/dist/listeners/application-commands/chat-input/CorePreChatInputCommandRun.js:19:25)
at async Object.fromAsync (/home/effem/effem.dev/COREBot/node_modules/@sapphire/result/dist/index.js:613:22)
at async CoreListener._run (/home/effem/effem.dev/COREBot/node_modules/@sapphire/framework/dist/lib/structures/Listener.js:48:22)
7 replies