[PCCompat > Global] api.commands.registerCommand: fix destructuring error

This commit is contained in:
Ducko 2021-04-04 17:16:56 +01:00 committed by Keanu
parent 958c1129b7
commit 3f46914b3f
Signed by: keanucode
GPG Key ID: A7431C0D513CA93B
1 changed files with 2 additions and 2 deletions

View File

@ -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) => {