mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
[PCCompat > Global] api.commands.registerCommand: fix destructuring error
This commit is contained in:
parent
958c1129b7
commit
3f46914b3f
1 changed files with 2 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue