[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

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