2020-10-22 15:50:47 +00:00
|
|
|
import { Client } from '../models/client.ts'
|
2020-10-25 17:03:53 +00:00
|
|
|
import { ChannelPayload, ChannelTypes } from '../types/channelTypes.ts'
|
2020-10-22 15:50:47 +00:00
|
|
|
import { Base } from './base.ts'
|
|
|
|
|
|
|
|
export class Channel extends Base {
|
|
|
|
type: ChannelTypes
|
|
|
|
id: string
|
2020-10-24 15:00:42 +00:00
|
|
|
static cacheName = 'channel'
|
2020-10-25 17:03:53 +00:00
|
|
|
get mention (): string {
|
|
|
|
return `<#${this.id}>`
|
|
|
|
}
|
2020-10-22 15:50:47 +00:00
|
|
|
|
|
|
|
constructor (client: Client, data: ChannelPayload) {
|
2020-10-25 06:50:32 +00:00
|
|
|
super(client, data)
|
2020-10-22 15:50:47 +00:00
|
|
|
this.type = data.type
|
|
|
|
this.id = data.id
|
|
|
|
}
|
|
|
|
}
|