F
F
FUILSTANS2021-03-03 21:33:57
JavaScript
FUILSTANS, 2021-03-03 21:33:57

Deleting a command after using it, how to do it?

I'm too dumb help and please clearly explain my mistake to me I
want the bot to delete the command and send a GIF after
client.on('message', msg=> {
if (msg.content === '$apple') {
msg.channel. send(' https://tenor.com/view/apple-death-note-gif-5394056 ');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shizzzzik, 2021-03-03
@shizzzzik

Try this:
client.on('message', msg=> {
if (msg.content === '$apple') {
message.delete();
msg.channel.send(' https://tenor.com/ view/apple-death-note-gif-5394056 ');
}
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question