Having trouble with reporting precondition failure
I am trying to send an error message when a person who isnt the bot owner runs the
eval
command but i cant get it to work
I followed the docs and even copied the example bot but nothing seems to make the thing work. I tried to console.log error.message but that doesnt console.log either
Precondition
Listener
12 Replies
I tried removing the part and placing it inside a
index.d.ts
file but then the eval command has the error
Type '"OwnerOnly"' is not assignable to type 'PreconditionEntryResolvable'
what do i doRemove the export default
It's conflicting with the class export
Now it stops the command from being executed but it still doesnt send the error message
Does it log in the listener?
i dont think so
no
1. Name of the listener file?
2. Are you actually using message commands and not chat input or context menu commands? They have their own listeners.
1. messageCommandDenied.ts
2. yes i am sure
Where is the listener at? In which folder?
src/listener/commands/messageCommands
It should be listeners plural
src/listeners/commands/messageCommands
I set it to this and it still doesnt work
other listeners such as memberGuildAdd events works
only this one doesnt
it was very simple actually
idk why it doesnt say to add that in the docs
but it worked