Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update ircv3, refactor message types for it, rename some fields
fixes #495
- Loading branch information
Showing
13 changed files
with
210 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 15 additions & 13 deletions
28
packages/chat/src/caps/twitchCommands/messageTypes/ClearChat.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 14 additions & 8 deletions
22
packages/chat/src/caps/twitchCommands/messageTypes/RoomState.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import type { MessageParam } from 'ircv3'; | ||
import { Message, MessageParamDefinition, MessageType } from 'ircv3'; | ||
import type { MessageInternalConfig, MessageInternalContents } from 'ircv3'; | ||
import { Message } from 'ircv3'; | ||
|
||
@MessageType('ROOMSTATE') | ||
export class RoomState extends Message<RoomState> { | ||
@MessageParamDefinition({ | ||
type: 'channel' | ||
}) | ||
channel!: MessageParam; | ||
interface RoomStateFields { | ||
channel: string; | ||
} | ||
|
||
export interface RoomState extends RoomStateFields {} | ||
export class RoomState extends Message<RoomStateFields> { | ||
static readonly COMMAND = 'ROOMSTATE'; | ||
constructor(command: string, contents?: MessageInternalContents, config?: MessageInternalConfig) { | ||
super(command, contents, config, { | ||
channel: { type: 'channel' } | ||
}); | ||
} | ||
} |
Oops, something went wrong.