{"version":3,"file":"modifier.cjs","names":["BaseMessage"],"sources":["../../src/messages/modifier.ts"],"sourcesContent":["import { BaseMessage, BaseMessageFields } from \"./base.js\";\nimport { MessageStructure } from \"./message.js\";\n\nexport interface RemoveMessageFields<\n  TStructure extends MessageStructure = MessageStructure,\n> extends Omit<BaseMessageFields<TStructure, \"remove\">, \"content\"> {\n  /**\n   * The ID of the message to remove.\n   */\n  id: string;\n}\n\n/**\n * Message responsible for deleting other messages.\n */\nexport class RemoveMessage<\n  TStructure extends MessageStructure = MessageStructure,\n> extends BaseMessage<TStructure, \"remove\"> {\n  readonly type = \"remove\" as const;\n\n  /**\n   * The ID of the message to remove.\n   */\n  id: string;\n\n  constructor(fields: RemoveMessageFields<TStructure>) {\n    super({\n      ...fields,\n      content: [],\n    });\n    this.id = fields.id;\n  }\n\n  override get _printableFields(): Record<string, unknown> {\n    return {\n      ...super._printableFields,\n      id: this.id,\n    };\n  }\n\n  static isInstance(obj: unknown): obj is RemoveMessage {\n    return super.isInstance(obj) && obj.type === \"remove\";\n  }\n}\n"],"mappings":";;;;;AAeA,IAAa,gBAAb,cAEUA,aAAAA,YAAkC;CAC1C,OAAgB;;;;CAKhB;CAEA,YAAY,QAAyC;AACnD,QAAM;GACJ,GAAG;GACH,SAAS,EAAE;GACZ,CAAC;AACF,OAAK,KAAK,OAAO;;CAGnB,IAAa,mBAA4C;AACvD,SAAO;GACL,GAAG,MAAM;GACT,IAAI,KAAK;GACV;;CAGH,OAAO,WAAW,KAAoC;AACpD,SAAO,MAAM,WAAW,IAAI,IAAI,IAAI,SAAS"}