🆙 added missing AvailableCommands

This commit is contained in:
DuckieTM
2026-03-21 12:15:25 +01:00
parent f198fbfb99
commit 569e0ff67b
9 changed files with 64 additions and 1 deletions
@@ -0,0 +1,37 @@
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
export class AvailableCommandsParser implements IMessageParser
{
private _commands: { key: string; description: string }[];
public flush(): boolean
{
this._commands = [];
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._commands = [];
const count = wrapper.readInt();
for(let i = 0; i < count; i++)
{
this._commands.push({
key: wrapper.readString(),
description: wrapper.readString()
});
}
return true;
}
public get commands(): { key: string; description: string }[]
{
return this._commands;
}
}
@@ -0,0 +1 @@
export * from './AvailableCommandsParser';
@@ -7,6 +7,7 @@ export * from './camera';
export * from './campaign';
export * from './catalog';
export * from './client';
export * from './commands';
export * from './competition';
export * from './crafting';
export * from './desktop';