diff --git a/plugins/commands.js b/plugins/commands.js index b292028..2b62892 100644 --- a/plugins/commands.js +++ b/plugins/commands.js @@ -60,10 +60,11 @@ function inject(bot, dcclient) { return; } }); - bot.on('cspy', async function(username, message) { - var username = username.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, ''); - var message = message.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, ''); - bot.command_handler.run(username, username, message, 'no uuid1!1!1!'); + bot.on('cspy', async function(usernamee, messagee) { + const username = usernamee.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, ''); + const message = messagee.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, ''); + const sender = bot.playersAddedPlayers[username]; + bot.command_handler.run(username, username, message, sender); }); dcclient.on('messageCreate', async (message) => { try {