🆙 Updated Prefixes

This commit is contained in:
duckietm
2026-06-03 09:39:53 +02:00
parent e1c65ad5ac
commit 90f2fa5fd8
6 changed files with 44 additions and 1 deletions
File diff suppressed because one or more lines are too long
@@ -498,6 +498,7 @@ export class IncomingHeader
public static PREFIX_RECEIVED = 7002; public static PREFIX_RECEIVED = 7002;
public static ACTIVE_PREFIX_UPDATED = 7003; public static ACTIVE_PREFIX_UPDATED = 7003;
public static USER_NICK_ICONS = 7004; public static USER_NICK_ICONS = 7004;
public static CUSTOM_PREFIX_PURCHASE_FAILED = 7005;
// YouTube Room Broadcast // YouTube Room Broadcast
public static YOUTUBE_ROOM_BROADCAST = 8001; public static YOUTUBE_ROOM_BROADCAST = 8001;
@@ -0,0 +1,16 @@
import { IMessageEvent } from '@nitrots/api';
import { MessageEvent } from '@nitrots/events';
import { CustomPrefixPurchaseFailedParser } from '../../../parser';
export class CustomPrefixPurchaseFailedEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, CustomPrefixPurchaseFailedParser);
}
public getParser(): CustomPrefixPurchaseFailedParser
{
return this.parser as CustomPrefixPurchaseFailedParser;
}
}
@@ -1,3 +1,4 @@
export * from './ActivePrefixUpdatedEvent'; export * from './ActivePrefixUpdatedEvent';
export * from './CustomPrefixPurchaseFailedEvent';
export * from './PrefixReceivedEvent'; export * from './PrefixReceivedEvent';
export * from './UserPrefixesEvent'; export * from './UserPrefixesEvent';
@@ -0,0 +1,23 @@
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
export class CustomPrefixPurchaseFailedParser implements IMessageParser
{
private _message: string;
public flush(): boolean
{
this._message = '';
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._message = wrapper.readString();
return true;
}
public get message(): string { return this._message; }
}
@@ -1,3 +1,4 @@
export * from './ActivePrefixUpdatedParser'; export * from './ActivePrefixUpdatedParser';
export * from './CustomPrefixPurchaseFailedParser';
export * from './PrefixReceivedParser'; export * from './PrefixReceivedParser';
export * from './UserPrefixesParser'; export * from './UserPrefixesParser';