From f364d55c597d417fa9e19c7a1af8d559982e2542 Mon Sep 17 00:00:00 2001 From: socram03 Date: Sat, 25 Jun 2022 16:35:16 -0400 Subject: [PATCH] fixes --- mod.ts | 5 +++++ structures/NewsChannel.ts | 4 +--- structures/TextChannel.ts | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mod.ts b/mod.ts index 9336da3..2663b56 100644 --- a/mod.ts +++ b/mod.ts @@ -10,3 +10,8 @@ export * from "./structures/Message.ts"; export * from "./structures/BaseGuild.ts"; export * from "./structures/Attachment.ts"; export * from "./structures/AnonymousGuild.ts"; +export * from "./structures/DMChannel.ts"; +export * from "./structures/TextChannel.ts"; +export * from "./structures/VoiceChannel.ts"; +export * from "./structures/ThreadChannel.ts"; +export * from "./structures/NewsChannel.ts"; diff --git a/structures/NewsChannel.ts b/structures/NewsChannel.ts index bd47f06..664532e 100644 --- a/structures/NewsChannel.ts +++ b/structures/NewsChannel.ts @@ -1,6 +1,4 @@ -import { Guild } from "./Guild.ts"; -import { TextChannel } from "./TextChannel.ts"; -import { DiscordChannel, Session } from "../mod.ts"; +import { DiscordChannel, Guild, Session, TextChannel } from "../mod.ts"; export class NewsChannel extends TextChannel { constructor(session: Session, data: DiscordChannel, guildId: Guild["id"]) { diff --git a/structures/TextChannel.ts b/structures/TextChannel.ts index 4c82bee..6c9a729 100644 --- a/structures/TextChannel.ts +++ b/structures/TextChannel.ts @@ -10,7 +10,7 @@ import { GetMessagesOptions } from "../util/Routes.ts"; * https://discord.com/developers/docs/resources/channel#create-channel-invite-json-params */ -export interface DiscordInvite { +export interface DiscordInviteOptions { max_age?: number; max_uses?: number; unique?: boolean; @@ -54,7 +54,7 @@ export class TextChannel extends GuildChannel { return messages[0] ? messages.map((x: DiscordMessage) => new Message(this.session, x)) : []; } // TODO return Invite Class - createInvite(options?: DiscordInvite) { + createInvite(options?: DiscordInviteOptions) { return this.session.rest.runMethod( this.session.rest, "POST",