Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Message, MessageParam, MessageParamDefinition, MessageType } from 'ircv3';
// this command has no *useful* parameters, all information is in tags
/** @private */
@MessageType('HOSTTARGET')
export default class HostTarget extends Message {
@MessageParamDefinition({
type: 'channel'
})
channel!: MessageParam;
@MessageParamDefinition({
trailing: true
})
targetAndViewers!: MessageParam;
}
import { Message, MessageParam, MessageParamDefinition, MessageType } from 'ircv3';
import ChatUser from '../../../ChatUser';
import { parseEmotes } from '../../../Toolkit/ChatTools';
/** @private */
@MessageType('WHISPER')
export default class Whisper extends Message {
@MessageParamDefinition()
target!: MessageParam;
@MessageParamDefinition({
trailing: true,
optional: true
})
message!: MessageParam;
get userInfo() {
return new ChatUser(this._prefix!.nick, this._tags);
}
get emoteOffsets() {
if (!this._tags) {
import { Message, MessageParam, MessageParamDefinition, MessageType } from 'ircv3';
import ChatUser from '../../../ChatUser';
import { parseEmotes } from '../../../Toolkit/ChatTools';
/** @private */
@MessageType('USERNOTICE')
export default class UserNotice extends Message {
@MessageParamDefinition({
type: 'channel'
})
channel!: MessageParam;
@MessageParamDefinition({
trailing: true,
optional: true
})
message!: MessageParam;
get userInfo() {
return new ChatUser(this._prefix!.nick, this._tags);
}
import { Message, MessageParam, MessageParamDefinition, MessageType } from 'ircv3';
/** @private */
@MessageType('ROOMSTATE')
export default class RoomState extends Message {
@MessageParamDefinition({
type: 'channel'
})
channel!: MessageParam;
}
import { Message, MessageParam, MessageParamDefinition, MessageType } from 'ircv3';
/** @private */
@MessageType('CLEARCHAT')
export default class ClearChat extends Message {
@MessageParamDefinition({
type: 'channel'
})
channel!: MessageParam;
@MessageParamDefinition({
trailing: true,
optional: true
})
user!: MessageParam;
}
import { Message, MessageParam, MessageParamDefinition, MessageType } from 'ircv3';
/** @private */
@MessageType('USERSTATE')
export default class UserState extends Message {
@MessageParamDefinition({
type: 'channel'
})
type!: MessageParam;
}