diff --git a/index.js b/index.js index 3a87bfc..406dad5 100644 --- a/index.js +++ b/index.js @@ -250,7 +250,7 @@ client.on('message', message => { }, Money, con); */ // retrieve the current user xp and add additional xp - if (message.toString()[0] !== config.prefix) { + if (!message.content.startsWith(config.prefix)) { con.query(`SELECT * FROM xp WHERE id = ${message.author.id}`, (err, rows) => { if (err) { throw err; @@ -372,4 +372,4 @@ client.on('message', message => { }); // login to Discord with your app's token -client.login(config.token); \ No newline at end of file +client.login(config.token);