poggers
This commit is contained in:
parent
e86016c322
commit
136b88a77d
|
@ -49,9 +49,9 @@ client.on("message", async message => {
|
||||||
if(message.author.bot) return;
|
if(message.author.bot) return;
|
||||||
if(message.content.indexOf(config.prefix) !== 0) return;
|
if(message.content.indexOf(config.prefix) !== 0) return;
|
||||||
// Here we separate our "command" name, and our "arguments" for the command.
|
// 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:
|
// e.g. if we have the message "+say Is this the real life?" , we'll get the following:
|
||||||
// command = say
|
// command = say
|
||||||
// args = ["Is", "this", "the", "real", "life?"]
|
// args = ["Is", "this", "the", "real", "life?"]
|
||||||
const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
|
const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
|
||||||
const command = args.shift().toLowerCase();
|
const command = args.shift().toLowerCase();
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -237,4 +237,4 @@ if(process.argv.slice(2).includes("--TEST")) {
|
||||||
};
|
};
|
||||||
|
|
||||||
//Logging in the bot
|
//Logging in the bot
|
||||||
client.login(config.token)
|
client.login(config.token);
|
Loading…
Reference in New Issue