mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 21:16:09 +00:00
20 lines
503 B
TypeScript
20 lines
503 B
TypeScript
import type { Model } from "./Base.ts";
|
|
import { ChannelTypes, DiscordChannel, Session, Snowflake } from "../mod.ts";
|
|
|
|
export abstract class Channel implements Model {
|
|
constructor(session: Session, data: DiscordChannel) {
|
|
this.id = data.id;
|
|
this.session = session;
|
|
this.name = data.name;
|
|
this.type = data.type;
|
|
}
|
|
id: Snowflake;
|
|
session: Session;
|
|
name?: string;
|
|
type: ChannelTypes;
|
|
|
|
toString(): string {
|
|
return `<#${this.id}>`;
|
|
}
|
|
}
|