diff --git a/plugins/commands.js b/plugins/commands.js index 3c86e02..6df6f7f 100644 --- a/plugins/commands.js +++ b/plugins/commands.js @@ -52,7 +52,11 @@ function inject(bot, dcclient) { var sender = bot.playersAddedPlayers[usernameraw]; var username = bot.getplayerusername[sender]; var message = message.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, ''); - bot.command_handler.run(username, usernameraw, message, sender); + for (const property of bot.tabcompleteplayers) { + if (property.match===username) { + bot.command_handler.run(username, usernameraw, message, sender); + } + } } catch (e) { return; }