Skip to content

Commit

Permalink
billsonnn#9 - GuildMemberMgmtFailedMessageEvent added
Browse files Browse the repository at this point in the history
  • Loading branch information
oobjectt committed Dec 24, 2022
1 parent 26741b7 commit 5f41be1
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/nitro/communication/NitroMessages.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class IncomingHeader
public static GROUP_PURCHASED = 2808;
public static GROUP_SETTINGS = 3965;
public static GROUP_BADGE_PARTS = 2238;
public static GUILD_MEMBER_MGMT_FAILED = 818;
public static ITEM_DIMMER_SETTINGS = 2710;
public static ITEM_STACK_HELPER = 2816;
public static ITEM_WALL = 1369;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../api';
import { MessageEvent } from '../../../../../events';
import { GuildMemberMgmtFailedMessageParser } from '../../parser';

export class GuildMemberMgmtFailedMessageEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, GuildMemberMgmtFailedMessageParser);
}

public getParser(): GuildMemberMgmtFailedMessageParser
{
return this.parser as GuildMemberMgmtFailedMessageParser;
}
}
1 change: 1 addition & 0 deletions src/nitro/communication/messages/incoming/user/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * from './access';
export * from './ApproveNameMessageEvent';
export * from './data';
export * from './GuildMemberMgmtFailedMessageEvent';
export * from './GuildMembershipsMessageEvent';
export * from './HabboGroupBadgesMessageEvent';
export * from './IgnoredUsersEvent';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';

export class GuildMemberMgmtFailedMessageParser implements IMessageParser
{
private _guildId: number;
private _reason: number;

public flush(): boolean
{
this._guildId = -1;
this._reason = -1;

return true;
}

public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;

this._guildId = wrapper.readInt();
this._reason = wrapper.readInt();

return true;
}

public get guildId(): number
{
return this._guildId;
}

public get reason(): number
{
return this._reason;
}
}
1 change: 1 addition & 0 deletions src/nitro/communication/messages/parser/user/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * from './access';
export * from './ApproveNameResultParser';
export * from './data';
export * from './GuildMemberMgmtFailedMessageParser';
export * from './GuildMembershipsMessageParser';
export * from './HabboGroupBadgesMessageParser';
export * from './HabboGroupEntryData';
Expand Down

0 comments on commit 5f41be1

Please sign in to comment.