[PCCompat > Global] api.commands.registerCommand: fix destructuring error
This commit is contained in:
parent
958c1129b7
commit
3f46914b3f
|
@ -7,14 +7,14 @@ window.powercord = {
|
||||||
// TODO: implement alias
|
// TODO: implement alias
|
||||||
|
|
||||||
goosemodScope.patcher.commands.add(command, description,
|
goosemodScope.patcher.commands.add(command, description,
|
||||||
( { message: [ { text } ] } ) => {
|
( { args: [ { text } ] } ) => {
|
||||||
const out = executor(text.split(' ')); // Run original executor func
|
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
|
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);
|
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
|
{ type: 3, required: false, name: 'args', description: 'Arguments for PC command' } // Argument for any string for compat. with PC's classical commands
|
||||||
])
|
]);
|
||||||
},
|
},
|
||||||
|
|
||||||
unregisterCommand: (command) => {
|
unregisterCommand: (command) => {
|
||||||
|
|
Loading…
Reference in New Issue