{"version":3,"file":"cap.mjs","names":[],"sources":["../../../src/message/twitch-types/cap.ts"],"sourcesContent":["import {\n  type IRCMessageData,\n  IRCMessage,\n  requireParameter,\n} from \"../irc/irc-message\";\n\n// https://ircv3.net/specs/core/capability-negotiation.html\n\n// example messages:\n// :tmi.twitch.tv CAP * LS :twitch.tv/commands twitch.tv/tags twitch.tv/membership\n// :tmi.twitch.tv CAP * ACK :twitch.tv/commands twitch.tv/tags twitch.tv/membership\n// :tmi.twitch.tv CAP * NAK :twitch.tv/invalid\n\nexport class CapMessage extends IRCMessage {\n  public readonly subCommand: string;\n  public readonly capabilities: string[];\n  public constructor(message: IRCMessageData) {\n    super(message);\n    // ignore the first parameter (the '*') since twitch doesn't ever send anything but a '*' in that slot\n    this.subCommand = requireParameter(this, 1);\n    this.capabilities = requireParameter(this, 2).split(\" \");\n  }\n}\n"],"mappings":";;AAaA,IAAa,aAAb,cAAgC,WAAW;CACzC;CACA;CACA,YAAmB,SAAyB;AAC1C,QAAM,QAAQ;AAEd,OAAK,aAAa,iBAAiB,MAAM,EAAE;AAC3C,OAAK,eAAe,iBAAiB,MAAM,EAAE,CAAC,MAAM,IAAI"}