Variables
Const MAX_OUTGOING_COMMAND_LENGTH
MAX_OUTGOING_COMMAND_LENGTH: number = MAX_OUTGOING_LINE_LENGTH - 2
Const MAX_OUTGOING_LINE_LENGTH
MAX_OUTGOING_LINE_LENGTH: 4096 = 4096
Const VALID_CMD_REGEX
VALID_CMD_REGEX: RegExp = /^(?:[a-zA-Z]+|[0-9]{3})$/
Const actionRegex
actionRegex: RegExp = /^\u0001ACTION (.*)\u0001$/
Const anonymousUsernameRegex
anonymousUsernameRegex: RegExp = /^justinfan\d+$/
Const badNoticeIDs
badNoticeIDs: string[] = ["whisper_banned", // You have been banned from sending whispers."whisper_banned_recipient", // That user has been banned from receiving whispers."whisper_invalid_args", // Usage: <login> <message>"whisper_invalid_login", // No user matching that login."whisper_invalid_self", // You cannot whisper to yourself."whisper_limit_per_min", // You are sending whispers too fast. Try again in a minute."whisper_limit_per_sec", // You are sending whispers too fast. Try again in a second."whisper_restricted", // Your settings prevent you from sending this whisper."whisper_restricted_recipient", // That user's settings prevent them from receiving this whisper.]
camelCase
camelCase: camelCase
Const channelNameRegex
channelNameRegex: RegExp = /^[a-z0-9_]{1,25}$/
Const commandClassMap
commandClassMap: { CAP: typeof CapMessage; CLEARCHAT: typeof ClearchatMessage; CLEARMSG: typeof ClearmsgMessage; GLOBALUSERSTATE: typeof GlobaluserstateMessage; HOSTTARGET: typeof HosttargetMessage; JOIN: typeof JoinMessage; NOTICE: typeof NoticeMessage; PART: typeof PartMessage; PING: typeof PingMessage; PONG: typeof PongMessage; PRIVMSG: typeof PrivmsgMessage; RECONNECT: typeof ReconnectMessage; ROOMSTATE: typeof RoomstateMessage; USERNOTICE: typeof UsernoticeMessage; USERSTATE: typeof UserstateMessage; WHISPER: typeof WhisperMessage } = {CLEARCHAT: ClearchatMessage,CLEARMSG: ClearmsgMessage,GLOBALUSERSTATE: GlobaluserstateMessage,HOSTTARGET: HosttargetMessage,NOTICE: NoticeMessage,PRIVMSG: PrivmsgMessage,ROOMSTATE: RoomstateMessage,USERNOTICE: UsernoticeMessage,USERSTATE: UserstateMessage,WHISPER: WhisperMessage,JOIN: JoinMessage,PART: PartMessage,RECONNECT: ReconnectMessage,PING: PingMessage,PONG: PongMessage,CAP: CapMessage,} as const
Type declaration
-
[key: string]: typeof IRCMessage
-
CAP: typeof CapMessage
-
CLEARCHAT: typeof ClearchatMessage
-
CLEARMSG: typeof ClearmsgMessage
-
GLOBALUSERSTATE: typeof GlobaluserstateMessage
-
HOSTTARGET: typeof HosttargetMessage
-
JOIN: typeof JoinMessage
-
NOTICE: typeof NoticeMessage
-
PART: typeof PartMessage
-
PING: typeof PingMessage
-
PONG: typeof PongMessage
-
PRIVMSG: typeof PrivmsgMessage
-
RECONNECT: typeof ReconnectMessage
-
ROOMSTATE: typeof RoomstateMessage
-
USERNOTICE: typeof UsernoticeMessage
-
USERSTATE: typeof UserstateMessage
-
WHISPER: typeof WhisperMessage
Let connectionIDCounter
connectionIDCounter: number = 0
Const decodeLookupRegex
decodeLookupRegex: RegExp = /\\\\|\\:|\\s|\\n|\\r|\\/g
Const failureNoticeIDs
failureNoticeIDs: string[] = ["no_permission","bad_ban_admin","bad_ban_anon","bad_ban_broadcaster","bad_ban_global_mod","bad_ban_mod","bad_ban_self","bad_ban_staff","usage_ban",]
Const invisibleSuffix
invisibleSuffix: " ó €€" = " ó €€"
Const log
log: Logger = debugLogger("dank-twitch-irc:client")
Const rgbColorRegex
rgbColorRegex: RegExp = /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
Const successNoticeIDs
successNoticeIDs: string[] = ["ban_success", "already_banned"]
Omits
emoteSets
andemoteSetsRaw
from UserState (because they are not sent forPRIVMSG
messages)