minor changes

This commit is contained in:
Yuzu 2022-06-26 17:58:01 -05:00
parent 0e82520f15
commit 8bbbf7ec12
2 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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),