From 3f46914b3f91223197393d4ab703a54451f1f396 Mon Sep 17 00:00:00 2001 From: Oj Date: Sun, 4 Apr 2021 17:16:56 +0100 Subject: [PATCH] [PCCompat > Global] api.commands.registerCommand: fix destructuring error --- moduleWrappers/powercord/entities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moduleWrappers/powercord/entities.js b/moduleWrappers/powercord/entities.js index 87fa6c8..13a7b78 100644 --- a/moduleWrappers/powercord/entities.js +++ b/moduleWrappers/powercord/entities.js @@ -7,14 +7,14 @@ window.powercord = { // TODO: implement alias goosemodScope.patcher.commands.add(command, description, - ( { message: [ { text } ] } ) => { + ( { args: [ { text } ] } ) => { const out = executor(text.split(' ')); // Run original executor func if (!out.send) return; // PC impl. sends internal message when out.send === true, so we also do the same via our previous Patcher API function, seen below goosemodScope.patcher.internalMessage(out.result); }, [ { type: 3, required: false, name: 'args', description: 'Arguments for PC command' } // Argument for any string for compat. with PC's classical commands - ]) + ]); }, unregisterCommand: (command) => {