mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
minor changes
This commit is contained in:
parent
0e82520f15
commit
8bbbf7ec12
@ -2,6 +2,7 @@ import type { Snowflake } from "../util/Snowflake.ts";
|
|||||||
import type { Session } from "../session/Session.ts";
|
import type { Session } from "../session/Session.ts";
|
||||||
import type { DiscordChannel } from "../vendor/external.ts";
|
import type { DiscordChannel } from "../vendor/external.ts";
|
||||||
import { Channel } from "./Channel.ts";
|
import { Channel } from "./Channel.ts";
|
||||||
|
import { Routes } from "../util/mod.ts";
|
||||||
|
|
||||||
export class DMChannel extends Channel {
|
export class DMChannel extends Channel {
|
||||||
constructor(session: Session, data: DiscordChannel) {
|
constructor(session: Session, data: DiscordChannel) {
|
||||||
|
@ -2,11 +2,10 @@ import type { Snowflake } from "../util/Snowflake.ts";
|
|||||||
import type { Session } from "../session/Session.ts";
|
import type { Session } from "../session/Session.ts";
|
||||||
import type { DiscordChannel } from "../vendor/external.ts";
|
import type { DiscordChannel } from "../vendor/external.ts";
|
||||||
import { Channel } from "./Channel.ts";
|
import { Channel } from "./Channel.ts";
|
||||||
import { Guild } from "./Guild.ts";
|
|
||||||
import { Routes } from "../util/mod.ts";
|
import { Routes } from "../util/mod.ts";
|
||||||
|
|
||||||
export abstract class GuildChannel extends Channel {
|
export abstract class GuildChannel extends Channel {
|
||||||
constructor(session: Session, data: DiscordChannel, guildId: Guild["id"]) {
|
constructor(session: Session, data: DiscordChannel, guildId: Snowflake) {
|
||||||
super(session, data);
|
super(session, data);
|
||||||
this.guildId = guildId;
|
this.guildId = guildId;
|
||||||
this.position = data.position;
|
this.position = data.position;
|
||||||
@ -19,8 +18,8 @@ export abstract class GuildChannel extends Channel {
|
|||||||
position?: number;
|
position?: number;
|
||||||
parentId?: Snowflake;
|
parentId?: Snowflake;
|
||||||
|
|
||||||
delete(reason?: string) {
|
async delete(reason?: string) {
|
||||||
return this.session.rest.runMethod<DiscordChannel>(
|
await this.session.rest.runMethod<DiscordChannel>(
|
||||||
this.session.rest,
|
this.session.rest,
|
||||||
"DELETE",
|
"DELETE",
|
||||||
Routes.CHANNEL(this.id),
|
Routes.CHANNEL(this.id),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user