This commit is contained in:
Alex 2020-06-18 02:06:34 -05:00
parent e86016c322
commit 136b88a77d
1 changed files with 4 additions and 4 deletions

View File

@ -49,9 +49,9 @@ client.on("message", async message => {
if(message.author.bot) return;
if(message.content.indexOf(config.prefix) !== 0) return;
// Here we separate our "command" name, and our "arguments" for the command.
// e.g. if we have the message "+say Is this the real life?" , we'll get the following:
// command = say
// args = ["Is", "this", "the", "real", "life?"]
// e.g. if we have the message "+say Is this the real life?" , we'll get the following:
// command = say
// args = ["Is", "this", "the", "real", "life?"]
const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
//////////////////////////////////////////////////////////////////////////////
@ -237,4 +237,4 @@ if(process.argv.slice(2).includes("--TEST")) {
};
//Logging in the bot
client.login(config.token)
client.login(config.token);