I've been trying to write a simple bot for Discord, and I thought of adding a deleteCommand line which will delete the command given from the user and return the answer that I have set to the bot.
Let's say I have this command which is the ping-pong command:
exports.run = function(Aika, message, args) {
message.channel.sendMessage('pong! :P\'${Date.now() - message.createdTimestamp} ms\'');
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 0
};
exports.help = {
name: 'ping',
description: 'Responds with "pong" and gives current ms rate.',
usage: 'ping'
};
and I send "!ping" in the Discord chat, I want this "!ping" to get deleted and then the bot answer "pong!", I couldn't make it delete the command.