From 9f705a0e5a90177784d45d20200dbaa46a569e78 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 13 Dec 2021 20:22:20 -0500 Subject: fix more bugs --- src/lib/extensions/discord.js/BushButtonInteraction.ts | 10 ++++++++-- src/lib/extensions/discord.js/BushChannel.d.ts | 3 ++- src/lib/extensions/discord.js/BushCommandInteraction.ts | 10 ++++++++-- src/lib/extensions/discord.js/BushSelectMenuInteraction.ts | 10 ++++++++-- 4 files changed, 26 insertions(+), 7 deletions(-) (limited to 'src/lib/extensions') diff --git a/src/lib/extensions/discord.js/BushButtonInteraction.ts b/src/lib/extensions/discord.js/BushButtonInteraction.ts index 9e62d46..18d6b35 100644 --- a/src/lib/extensions/discord.js/BushButtonInteraction.ts +++ b/src/lib/extensions/discord.js/BushButtonInteraction.ts @@ -1,10 +1,16 @@ -import type { BushClient, BushGuild, BushGuildMember, BushTextBasedChannels, BushUser } from '#lib'; +import type { BushClient, BushGuild, BushGuildMember, BushGuildTextBasedChannel, BushTextBasedChannels, BushUser } from '#lib'; import type { APIInteractionGuildMember } from 'discord-api-types/v9'; import { ButtonInteraction, type CacheType, type CacheTypeReducer } from 'discord.js'; import type { RawMessageButtonInteractionData } from 'discord.js/typings/rawDataTypes'; export class BushButtonInteraction extends ButtonInteraction { - public declare readonly channel: CacheTypeReducer; + public declare readonly channel: CacheTypeReducer< + Cached, + BushGuildTextBasedChannel | null, + BushGuildTextBasedChannel | null, + BushGuildTextBasedChannel | null, + BushTextBasedChannels | null + >; public declare readonly guild: CacheTypeReducer; public declare member: CacheTypeReducer; public declare user: BushUser; diff --git a/src/lib/extensions/discord.js/BushChannel.d.ts b/src/lib/extensions/discord.js/BushChannel.d.ts index 9a78b9a..497c33a 100644 --- a/src/lib/extensions/discord.js/BushChannel.d.ts +++ b/src/lib/extensions/discord.js/BushChannel.d.ts @@ -7,7 +7,8 @@ export class BushChannel extends Channel { public constructor(client: BushClient, data?: RawChannelData, immediatePatch?: boolean); public readonly createdAt: Date; public readonly createdTimestamp: number; - public deleted: boolean; + public get deleted(): boolean; + public set deleted(value: boolean); public id: Snowflake; public readonly partial: false; public type: keyof typeof ChannelTypes; diff --git a/src/lib/extensions/discord.js/BushCommandInteraction.ts b/src/lib/extensions/discord.js/BushCommandInteraction.ts index b61ec9b..174fd9c 100644 --- a/src/lib/extensions/discord.js/BushCommandInteraction.ts +++ b/src/lib/extensions/discord.js/BushCommandInteraction.ts @@ -10,14 +10,20 @@ import type { import type { APIInteractionGuildMember } from 'discord-api-types/v9'; import { CommandInteraction, type CacheType, type CacheTypeReducer, type Invite, type Snowflake } from 'discord.js'; import type { RawCommandInteractionData } from 'discord.js/typings/rawDataTypes'; -import { BushTextBasedChannels, type BushClient } from '../discord-akairo/BushClient'; +import { BushGuildTextBasedChannel, BushTextBasedChannels, type BushClient } from '../discord-akairo/BushClient'; export type BushGuildResolvable = BushGuild | BushGuildChannel | BushGuildMember | BushGuildEmoji | Invite | BushRole | Snowflake; export class BushCommandInteraction extends CommandInteraction { public declare readonly client: BushClient; public declare readonly command: BushApplicationCommand | BushApplicationCommand<{ guild: BushGuildResolvable }> | null; - public declare readonly channel: CacheTypeReducer; + public declare readonly channel: CacheTypeReducer< + Cached, + BushGuildTextBasedChannel | null, + BushGuildTextBasedChannel | null, + BushGuildTextBasedChannel | null, + BushTextBasedChannels | null + >; public declare readonly guild: CacheTypeReducer; public declare member: CacheTypeReducer; public declare user: BushUser; diff --git a/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts b/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts index 6b33c20..d33ddd3 100644 --- a/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts +++ b/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts @@ -1,10 +1,16 @@ -import type { BushClient, BushGuild, BushGuildMember, BushTextBasedChannels, BushUser } from '#lib'; +import type { BushClient, BushGuild, BushGuildMember, BushGuildTextBasedChannel, BushTextBasedChannels, BushUser } from '#lib'; import type { APIInteractionGuildMember } from 'discord-api-types/v9'; import { SelectMenuInteraction, type CacheType, type CacheTypeReducer } from 'discord.js'; import type { RawMessageSelectMenuInteractionData } from 'discord.js/typings/rawDataTypes'; export class BushSelectMenuInteraction extends SelectMenuInteraction { - public declare readonly channel: CacheTypeReducer; + public declare readonly channel: CacheTypeReducer< + Cached, + BushGuildTextBasedChannel | null, + BushGuildTextBasedChannel | null, + BushGuildTextBasedChannel | null, + BushTextBasedChannels | null + >; public declare readonly guild: CacheTypeReducer; public declare member: CacheTypeReducer; public declare user: BushUser; -- cgit