Add better syntax for the fm command

This commit is contained in:
SileNce5k 2024-03-07 11:03:01 +01:00
parent b539f41d51
commit 5b202ae9d3
No known key found for this signature in database
GPG key ID: 961132EB78C8915F

View file

@ -15,6 +15,10 @@ module.exports = function(client, owners, message, globalPrefix){
message.content = message.content.replace(regex, prefix);
}
let args = message.content.slice(prefix.length).split(" ")
if(args[0] !== "fm" && args[0].startsWith("fm")){
let firstElement = args[0];
args.splice(0, 1, firstElement.substring(0, 2), firstElement.substring(2));
}
const commandName = args.shift().toLowerCase();
const command = client.commands.get(commandName);