I'm getting this error when used my new precondtion.

my file
7 Replies
а к а й с
а к а й сOP2y ago
Command
а к а й с
а к а й сOP2y ago
Precondition
а к а й с
а к а й сOP2y ago
Error:
[ERROR] Encountered error on event listener "CorePreMessageCommandRun" for event "preMessageCommandRun" at path "C:\Users\Des\Desktop\AlertHub-Rewrite\node_modules\@sapphire\framework\dist\optional-listeners\message-command-listeners\CorePreMessageCommandRun.js" TypeError: Cannot read properties of undefined (reading 'isErr')
at Object.messageSequential (C:\Users\Des\Desktop\AlertHub-Rewrite\node_modules\@sapphire\framework\dist\lib\utils\preconditions\conditions\PreconditionConditionAnd.js:10:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async CoreListener.run (C:\Users\Des\Desktop\AlertHub-Rewrite\node_modules\@sapphire\framework\dist\optional-listeners\message-command-listeners\CorePreMessageCommandRun.js:19:25)
at async Object.fromAsync (C:\Users\Des\Desktop\AlertHub-Rewrite\node_modules\@sapphire\result\dist\index.js:615:22)
at async CoreListener._run (C:\Users\Des\Desktop\AlertHub-Rewrite\node_modules\@sapphire\framework\dist\lib\structures\Listener.js:48:22)
[ERROR] Encountered error on event listener "CorePreMessageCommandRun" for event "preMessageCommandRun" at path "C:\Users\Des\Desktop\AlertHub-Rewrite\node_modules\@sapphire\framework\dist\optional-listeners\message-command-listeners\CorePreMessageCommandRun.js" TypeError: Cannot read properties of undefined (reading 'isErr')
at Object.messageSequential (C:\Users\Des\Desktop\AlertHub-Rewrite\node_modules\@sapphire\framework\dist\lib\utils\preconditions\conditions\PreconditionConditionAnd.js:10:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async CoreListener.run (C:\Users\Des\Desktop\AlertHub-Rewrite\node_modules\@sapphire\framework\dist\optional-listeners\message-command-listeners\CorePreMessageCommandRun.js:19:25)
at async Object.fromAsync (C:\Users\Des\Desktop\AlertHub-Rewrite\node_modules\@sapphire\result\dist\index.js:615:22)
at async CoreListener._run (C:\Users\Des\Desktop\AlertHub-Rewrite\node_modules\@sapphire\framework\dist\lib\structures\Listener.js:48:22)
Farleena (Dani)
Did you ever figure out the solution? I ran into a similar failure myself.
24
242y ago
what version of sapphire are you on
Farleena (Dani)
For me the same problem also came up in a precondition. Turned out it was the run method being async (i use slash commands so chatInputRun for me) I changed up my logic and it got solved.
24
242y ago
That doesn't make a lot of sense, you might want to post some steps here to help the original guy out
Want results from more Discord servers?
Add your server