"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Message = void 0; const Base_1 = require("./Base"); const User_1 = require("./User"); class Message extends Base_1.Base { /** * id of the message */ id; /** * if the message's author is blocked */ blocked; /** * if the message is sent by a bot */ bot; /** * contents of the message */ content; content_parsed; /** * author's server nickname */ nick; author_color; /** * when this message was edited (or null if never) */ edited_timestamp; /** * when this message was sent */ timestamp; /** * whether this was a TTS message */ tts; /** * users specifically mentioned in the message */ mentions; /** * whether this message mentions everyone */ mention_everyone; /** * roles specifically mentioned in this message */ mention_roles; /** * any embedded content */ embeds; /** * any attached files */ attachments; /** * the author of this message */ author; /** * whether this message is pinned */ pinned; /** * [type of message](https://discord.com/developers/docs/resources/channel#message-object-message-types) */ type; constructor(client, props) { super(client); Object.assign(this, props); this.id = props.id; this.blocked = props.blocked; this.bot = props.bot; this.content = props.content; this.content_parsed = props.content_parsed; this.nick = props.nick; this.author_color = props.author_color; this.edited_timestamp = props.edited_timestamp; this.timestamp = props.timestamp; this.tts = props.tts; this.mentions = props.mentions.map((mentionData) => new User_1.User(client, mentionData)); this.mention_everyone = props.mention_everyone; this.mention_roles = props.mention_roles; this.embeds = props.embeds; this.attachments = props.attachments; this.author = new User_1.User(client, props.author); this.pinned = props.pinned; this.type = props.type; } } exports.Message = Message;