1"create a variable called id"
2var id
3"then inside your client message statement change id -> id = message.id"
4client.on('message', message => {
5 id = message.id
6});
7"inside your command type message.fetch(id).then(msg => msg.delete());"
8 if (message.content === !test)
9 message.fetch(id).then(msg => msg.delete());
10}});