diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/common/ButtonPaginator.ts | 11 | ||||
-rw-r--r-- | src/lib/extensions/discord.js/BushDMChannel.ts | 2 | ||||
-rw-r--r-- | src/lib/extensions/discord.js/BushMessage.ts | 4 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/common/ButtonPaginator.ts b/src/lib/common/ButtonPaginator.ts index 15c07fa..e3d4207 100644 --- a/src/lib/common/ButtonPaginator.ts +++ b/src/lib/common/ButtonPaginator.ts @@ -1,7 +1,14 @@ import { DeleteButton, type BushMessage, type BushSlashMessage } from '#lib'; import { CommandUtil } from 'discord-akairo'; import { APIEmbed } from 'discord-api-types/v9'; -import { ActionRow, ActionRowComponent, ButtonComponent, ButtonStyle, Embed, type MessageComponentInteraction } from 'discord.js'; +import { + ActionRow, + ButtonComponent, + ButtonStyle, + Embed, + type MessageActionRowComponent, + type MessageComponentInteraction +} from 'discord.js'; /** * Sends multiple embeds with controls to switch between them @@ -170,7 +177,7 @@ export class ButtonPaginator { * @param disableAll Whether to disable all buttons * @returns The generated {@link ActionRow} */ - protected getPaginationRow(disableAll = false): ActionRow<ActionRowComponent> { + protected getPaginationRow(disableAll = false): ActionRow<MessageActionRowComponent> { return new ActionRow().addComponents( new ButtonComponent({ style: ButtonStyle.Primary, diff --git a/src/lib/extensions/discord.js/BushDMChannel.ts b/src/lib/extensions/discord.js/BushDMChannel.ts index d73ad70..dc7d309 100644 --- a/src/lib/extensions/discord.js/BushDMChannel.ts +++ b/src/lib/extensions/discord.js/BushDMChannel.ts @@ -22,7 +22,6 @@ import type { RawDMChannelData } from 'discord.js/typings/rawDataTypes'; export class BushDMChannel extends DMChannel { public declare readonly client: BushClient; public declare messages: BushMessageManager; - public declare recipient: BushUser; public constructor(client: BushClient, data?: RawDMChannelData) { super(client, data); @@ -30,6 +29,7 @@ export class BushDMChannel extends DMChannel { } export interface BushDMChannel extends DMChannel { + get recipient(): BushUser | null; isText(): this is BushTextChannel; isDM(): this is BushDMChannel; isDMBased(): this is PartialGroupDMChannel | BushDMChannel; diff --git a/src/lib/extensions/discord.js/BushMessage.ts b/src/lib/extensions/discord.js/BushMessage.ts index c424d12..48e1792 100644 --- a/src/lib/extensions/discord.js/BushMessage.ts +++ b/src/lib/extensions/discord.js/BushMessage.ts @@ -10,8 +10,8 @@ import type { BushUser } from '#lib'; import { - ActionRowComponent, Message, + MessageActionRowComponent, type EmojiIdentifierResolvable, type If, type MessageEditOptions, @@ -55,7 +55,7 @@ export interface BushMessage<Cached extends boolean = boolean> extends Message<C react(emoji: EmojiIdentifierResolvable): Promise<BushMessageReaction>; removeAttachments(): Promise<BushMessage>; reply(options: string | MessagePayload | ReplyMessageOptions): Promise<BushMessage>; - resolveComponent(customId: string): ActionRowComponent | null; + resolveComponent(customId: string): MessageActionRowComponent | null; startThread(options: StartThreadOptions): Promise<BushThreadChannel>; suppressEmbeds(suppress?: boolean): Promise<BushMessage>; unpin(): Promise<BushMessage>; |