OwnerOnly precondition not working
Hello there. I just yoinked the OwnerOnly precondition from the guide and the Github repo but I just can't make it work. I don't get an error, I also yoinked the precondition failure messages, I don't get any info about why its not working. I only get "The application did not respond". Without the precondition my command works.
OwnerOnly.ts
8 Replies
Da command
Solution
fixed it
Please elaborate on what you had to change for future readers
What did you do to fix it? I'm running into an issue where the check will get as far as the ternary operator and then it hangs with no error info ๐ซ
After i made the failure messages work it said the "OwnerOnly" is unavailable, so I tried renaming the file, etc. and then it just worked for some reason.
Also i checked some repos linked here under tag how they made their BotOwner precondition.
https://github.com/SpecteraLabs/Spectera/blob/main/src/preconditions/BotOwner.ts
https://github.com/SpecteraLabs/Spectera/blob/main/src/listeners/commands/chatInputCommandDenied.ts
This made it work for me (thank you Spectera if you read this somehow). It could also work with the precondition in the guide by renaming it to smth like "BotOwner", I didn't try that
GitHub
Spectera/src/preconditions/BotOwner.ts at main ยท SpecteraLabs/Spect...
A multipurpose discord bot which is still being made :zap: - SpecteraLabs/Spectera
GitHub
Spectera/src/listeners/commands/chatInputCommandDenied.ts at main ยท...
A multipurpose discord bot which is still being made :zap: - SpecteraLabs/Spectera
@nonsensetwice
๐ค
I'll have to examine this. Thanks for the details. I'll take another crack at it later this evening ๐
You're welcome! You could also use the CLI, generate a new project and just put your stuff in there, this works too. I don't really exactly know what the issue is but yeah. ๐