mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
24 lines
461 B
JavaScript
24 lines
461 B
JavaScript
"use strict";
|
|
|
|
import Equality from "../Util/Equality";
|
|
import {reg} from "../Util/ArgumentRegulariser";
|
|
|
|
export default class Channel extends Equality {
|
|
constructor(data, client){
|
|
super();
|
|
this.id = data.id;
|
|
this.client = client;
|
|
}
|
|
|
|
get createdAt() {
|
|
return new Date((+this.id / 4194304) + 1420070400000);
|
|
}
|
|
|
|
get isPrivate() {
|
|
return !this.server;
|
|
}
|
|
|
|
delete(){
|
|
return this.client.deleteChannel.apply(this.client, reg(this, arguments));
|
|
}
|
|
}
|