Skip to content

Commit

Permalink
remove all references to r9k (is now "unique chat")
Browse files Browse the repository at this point in the history
  • Loading branch information
d-fischer committed Apr 20, 2023
1 parent 3a2ca40 commit 6e587ff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/api/src/endpoints/chat/HelixChatSettings.ts
Expand Up @@ -61,7 +61,7 @@ export class HelixChatSettings extends DataObject<HelixChatSettingsData> {
}

/**
* Whether unique chat mode (formerly known as r9k) is enabled.
* Whether unique chat mode is enabled.
*/
get uniqueChatModeEnabled(): boolean {
return this[rawDataSymbol].unique_chat_mode;
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/interfaces/endpoints/chat.input.ts
Expand Up @@ -35,7 +35,7 @@ export interface HelixUpdateChatSettingsParams {
emoteOnlyModeEnabled?: boolean;

/**
* Whether unique chat mode (formerly known as r9k) should be enabled.
* Whether unique chat mode should be enabled.
*/
uniqueChatModeEnabled?: boolean;

Expand Down
15 changes: 1 addition & 14 deletions packages/chat/src/ChatClient.ts
Expand Up @@ -320,17 +320,6 @@ export class ChatClient extends EventEmitter {
*/
readonly onMessageRemove = this.registerEvent<[channel: string, messageId: string, msg: ClearMsg]>();

/**
* Fires when unique chat mode is toggled in a channel.
*
* @deprecated Use {@link ChatClient#onUniqueChat} instead.
*
* @eventListener
* @param channel The channel where unique chat mode is being toggled.
* @param enabled Whether unique chat mode is being enabled. If false, it's being disabled.
*/
readonly onR9k = this.registerEvent<[channel: string, enabled: boolean]>();

/**
* Fires when unique chat mode is toggled in a channel.
*
Expand Down Expand Up @@ -1136,16 +1125,14 @@ export class ChatClient extends EventEmitter {
break;
}

// r9k
// unique chat
case 'r9k_on': {
this.emit(this.onUniqueChat, broadcasterName, true);
this.emit(this.onR9k, broadcasterName, true);
break;
}

case 'r9k_off': {
this.emit(this.onUniqueChat, broadcasterName, false);
this.emit(this.onR9k, broadcasterName, false);
break;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/easy-bot/src/Bot.ts
Expand Up @@ -236,7 +236,7 @@ export class Bot extends EventEmitter {
readonly onMessageRemove = this.registerEvent<[event: MessageRemoveEvent]>();

/**
* Fires when R9K mode is toggled in a channel.
* Fires when unique chat mode is toggled in a channel.
*
* @eventListener
* @param event The event object.
Expand Down

0 comments on commit 6e587ff

Please sign in to comment.