Hi there, I am trying to code an announce command. So, the code I need, should provide that only I should be able to announce. Thanks for reading!
Edit 1: the one in this post doesn’t work for me.
Hi there, I am trying to code an announce command. So, the code I need, should provide that only I should be able to announce. Thanks for reading!
Edit 1: the one in this post doesn’t work for me.
Hey there!
Can you tell me what it didn’t work and could you tell me the errors, if any?
Ah, I see. The command
variable is only available if you were using a command handler, and also the fact that you were following Discord’s guide on creating a command handler. In your case, you’ll have to use the message
variable instead of the command
variable.
So try message.content.startsWith(prefix + "say")
instead of command === "say"
. Make sure to define prefix
as the prefix of your bot.
Thanks for the solution. I used another thing instead and it worked, -kinda…
but there is a problem:
me being the owner and still can not use it
solved thanks
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.