One idea that I have implemented in my bots that would prove to be reliable to your question would be using a fuzzy search mechanic within your message checking. I use http://fusejs.io/ library for my fuzzy searches. You will need to handle making an array of commands first. Example:
const Fuse = require('fuse.js');
const commandarray = ['help','ping','commands','etc'];
var options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 2,
keys: undefined
};
Then use the fuzzy search library to interact with your incoming messages that begin with your prefix and send them thru the fuzzy. Its response will be the closest match to your command. Meaning if you typed "!hep", the response from the fuzzy would be "help" and then you can proceed to interact with the sender by initiating the help command. Just make sure to only make it fuzzy search messages sent with a prefix first, dont let it search every message sent in a channel or it will do a command closest to every message on every word sent. something like:
const prefix = '!';
const fuse = new Fuse(commandarray, options);
client.on('message', message => {
if (message.content.startsWith(`${prefix}`)) {
const fuzzyresult = fuse.search(message);
(now fuzzyresult will return the index of the command thats in the array that is the closest match to the message sent on discord)
(now you grab your array of commands, input the index, and turn it into a string)
let cmdslice = commandarray.slice(fuzzyresult);
let cmdslice.length = 1;
let cmd = cmdslice.toString();
if (cmd === 'help') {
do this function
} else if (cmd === 'ping') {
do this function instead
} etc etc etc
}
});
This is a little messy but should help you achieve your request.