Replies: 1 comment
-
if(msg.content == ".commandname" && msg.author.id == client.user.id) {
msg.delete(); // this will remove the msg that's content is ".commandname"
msg.channel.send("test") // this will then send a new message to the same channel with the message "test"
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a command system which looks like this:
if(msg.content == '.commandname' && msg.author.id == client.user.id){ //code }
I want it to delete the part where the user types .commandname, I am new to this so if anyone minds helping me that would be appriciated.Beta Was this translation helpful? Give feedback.
All reactions