harmony/src/structures/dmChannel.ts

19 lines
541 B
TypeScript
Raw Normal View History

import { Client } from '../models/client.ts'
2020-10-31 12:33:34 +00:00
import { DMChannelPayload } from '../types/channel.ts'
import { UserPayload } from '../types/user.ts'
import { TextChannel } from './textChannel.ts'
export class DMChannel extends TextChannel {
recipients: UserPayload[]
2020-12-02 12:29:52 +00:00
constructor(client: Client, data: DMChannelPayload) {
super(client, data)
this.recipients = data.recipients
}
2020-12-02 12:29:52 +00:00
protected readFromData(data: DMChannelPayload): void {
super.readFromData(data)
this.recipients = data.recipients ?? this.recipients
}
}