(pack)
| 157 | } |
| 158 | |
| 159 | async unpack(pack) { |
| 160 | this.id = pack.id ? pack.id : null; |
| 161 | this.guild = pack.guild && this.client.guilds.cache.has(pack.guild) ? this.client.guilds.cache.get(pack.guild) : this.guild; |
| 162 | this.timestamp = pack.timestamp ? pack.timestamp : null; |
| 163 | this.submitted = pack.submitted ? pack.submitted : null; |
| 164 | this.user = pack.user && this.client.users.cache.has(pack.user) ? this.client.users.cache.get(pack.user) : null; |
| 165 | this.type = pack.type ? pack.type : null; |
| 166 | this.moderator = pack.moderator && this.client.users.cache.has(pack.moderator) ? this.client.users.cache.get(pack.moderator) : null; |
| 167 | this.reason = pack.reason ? pack.reason : null; |
| 168 | this.silent = pack.silent ? pack.silent : null; |
| 169 | this.duration = pack.duration ? pack.duration : null; |
| 170 | this.deletedMessageCount = pack.deletedMessageCount ? pack.deletedMessageCount : null; |
| 171 | this.messageContent = pack.messageContent ? pack.messageContent : null; |
| 172 | this.badNickname = pack.badNickname ? pack.badNickname : null; |
| 173 | this.link = pack.link ? pack.link : null; |
| 174 | this.channel = pack.channel && this.client.channels.cache.has(pack.channel) ? this.client.channels.cache.get(pack.channel) : null; |
| 175 | return this; |
| 176 | } |
| 177 | |
| 178 | async embed() { |
| 179 | const caseEmbed = new ModEmbed(this); |
no outgoing calls
no test coverage detected