diff options
| author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-04-20 18:37:22 -0400 |
|---|---|---|
| committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-04-20 18:37:22 -0400 |
| commit | f01be2e3ce820e5737416180efa3e5852ece72c4 (patch) | |
| tree | a972af929940173e4e2d9f843124a8dfb293bc90 /src/lib | |
| parent | bcb3dc5fcd21f7626d4c5a8c009dca5658a4436b (diff) | |
| download | tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.tar.gz tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.tar.bz2 tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.zip | |
fix invite link, remove store channel, update to use builder methods, fix breaking changes
Diffstat (limited to 'src/lib')
31 files changed, 148 insertions, 234 deletions
diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts index db3e709..5534728 100644 --- a/src/lib/common/AutoMod.ts +++ b/src/lib/common/AutoMod.ts @@ -1,7 +1,15 @@ import { banResponse, Moderation, type BushButtonInteraction, type BushMessage } from '#lib'; import assert from 'assert'; import chalk from 'chalk'; -import { ActionRow, ButtonComponent, ButtonStyle, Embed, GuildMember, PermissionFlagsBits, type TextChannel } from 'discord.js'; +import { + ActionRowBuilder, + ButtonBuilder, + ButtonStyle, + EmbedBuilder, + GuildMember, + PermissionFlagsBits, + type TextChannel +} from 'discord.js'; /** * Handles auto moderation functionality. @@ -153,7 +161,7 @@ export class AutoMod { const color = this.punish({ severity: Severity.TEMP_MUTE, reason: 'everyone mention and scam phrase' } as BadWordDetails); void this.message.guild!.sendLogChannel('automod', { embeds: [ - new Embed() + new EmbedBuilder() .setTitle(`[Severity ${Severity.TEMP_MUTE}] Mention Scam Deleted`) .setDescription( `**User:** ${this.message.author} (${this.message.author.tag})\n**Sent From:** <#${this.message.channel.id}> [Jump to context](${this.message.url})` @@ -163,8 +171,8 @@ export class AutoMod { .setTimestamp() ], components: [ - new ActionRow().addComponents( - new ButtonComponent({ + new ActionRowBuilder<ButtonBuilder>().addComponents( + new ButtonBuilder({ style: ButtonStyle.Danger, label: 'Ban User', customId: `automod;ban;${this.message.author.id};everyone mention and scam phrase` @@ -316,7 +324,7 @@ export class AutoMod { await this.message.guild!.sendLogChannel('automod', { embeds: [ - new Embed() + new EmbedBuilder() .setTitle(`[Severity ${highestOffence.severity}] Automod Action Performed`) .setDescription( `**User:** ${this.message.author} (${this.message.author.tag})\n**Sent From:** <#${ @@ -331,8 +339,8 @@ export class AutoMod { components: highestOffence.severity >= 2 ? [ - new ActionRow().addComponents( - new ButtonComponent({ + new ActionRowBuilder<ButtonBuilder>().addComponents( + new ButtonBuilder({ style: ButtonStyle.Danger, label: 'Ban User', customId: `automod;ban;${this.message.author.id};${highestOffence.reason}` diff --git a/src/lib/common/ButtonPaginator.ts b/src/lib/common/ButtonPaginator.ts index e3d4207..59dcb68 100644 --- a/src/lib/common/ButtonPaginator.ts +++ b/src/lib/common/ButtonPaginator.ts @@ -1,14 +1,7 @@ import { DeleteButton, type BushMessage, type BushSlashMessage } from '#lib'; import { CommandUtil } from 'discord-akairo'; -import { APIEmbed } from 'discord-api-types/v9'; -import { - ActionRow, - ButtonComponent, - ButtonStyle, - Embed, - type MessageActionRowComponent, - type MessageComponentInteraction -} from 'discord.js'; +import { APIEmbed } from 'discord-api-types/v10'; +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, type MessageComponentInteraction } from 'discord.js'; /** * Sends multiple embeds with controls to switch between them @@ -22,7 +15,7 @@ export class ButtonPaginator { /** * The embeds to paginate */ - protected embeds: Embed[] | APIEmbed[]; + protected embeds: EmbedBuilder[] | APIEmbed[]; /** * The optional text to send with the paginator @@ -53,7 +46,7 @@ export class ButtonPaginator { */ protected constructor( message: BushMessage | BushSlashMessage, - embeds: Embed[] | APIEmbed[], + embeds: EmbedBuilder[] | APIEmbed[], text: string | null, deleteOnExit: boolean, startOn: number @@ -66,8 +59,8 @@ export class ButtonPaginator { // add footers for (let i = 0; i < embeds.length; i++) { - if (embeds[i] instanceof Embed) { - (embeds[i] as Embed).setFooter({ text: `Page ${(i + 1).toLocaleString()}/${embeds.length.toLocaleString()}` }); + if (embeds[i] instanceof EmbedBuilder) { + (embeds[i] as EmbedBuilder).setFooter({ text: `Page ${(i + 1).toLocaleString()}/${embeds.length.toLocaleString()}` }); } else { (embeds[i] as APIEmbed).footer = { text: `Page ${(i + 1).toLocaleString()}/${embeds.length.toLocaleString()}` @@ -177,33 +170,33 @@ export class ButtonPaginator { * @param disableAll Whether to disable all buttons * @returns The generated {@link ActionRow} */ - protected getPaginationRow(disableAll = false): ActionRow<MessageActionRowComponent> { - return new ActionRow().addComponents( - new ButtonComponent({ + protected getPaginationRow(disableAll = false) { + return new ActionRowBuilder<ButtonBuilder>().addComponents( + new ButtonBuilder({ style: ButtonStyle.Primary, customId: 'paginate_beginning', emoji: PaginateEmojis.BEGINNING, disabled: disableAll || this.curPage === 0 }), - new ButtonComponent({ + new ButtonBuilder({ style: ButtonStyle.Primary, customId: 'paginate_back', emoji: PaginateEmojis.BACK, disabled: disableAll || this.curPage === 0 }), - new ButtonComponent({ + new ButtonBuilder({ style: ButtonStyle.Primary, customId: 'paginate_stop', emoji: PaginateEmojis.STOP, disabled: disableAll }), - new ButtonComponent({ + new ButtonBuilder({ style: ButtonStyle.Primary, customId: 'paginate_next', emoji: PaginateEmojis.FORWARD, disabled: disableAll || this.curPage === this.numPages - 1 }), - new ButtonComponent({ + new ButtonBuilder({ style: ButtonStyle.Primary, customId: 'paginate_end', emoji: PaginateEmojis.END, @@ -222,7 +215,7 @@ export class ButtonPaginator { */ public static async send( message: BushMessage | BushSlashMessage, - embeds: (Embed | APIEmbed)[], + embeds: EmbedBuilder[] | APIEmbed[], text: string | null = null, deleteOnExit = true, startOn = 1 diff --git a/src/lib/common/ConfirmationPrompt.ts b/src/lib/common/ConfirmationPrompt.ts index 4ff00ce..e86c236 100644 --- a/src/lib/common/ConfirmationPrompt.ts +++ b/src/lib/common/ConfirmationPrompt.ts @@ -1,5 +1,5 @@ import { type BushMessage, type BushSlashMessage } from '#lib'; -import { ActionRow, ButtonComponent, ButtonStyle, type MessageComponentInteraction, type MessageOptions } from 'discord.js'; +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, type MessageComponentInteraction, type MessageOptions } from 'discord.js'; /** * Sends a message with buttons for the user to confirm or cancel the action. @@ -29,9 +29,9 @@ export class ConfirmationPrompt { */ protected async send(): Promise<boolean> { this.messageOptions.components = [ - new ActionRow().addComponents( - new ButtonComponent({ style: ButtonStyle.Success, customId: 'confirmationPrompt_confirm', label: 'Yes' }), - new ButtonComponent({ style: ButtonStyle.Danger, customId: 'confirmationPrompt_cancel', label: 'No' }) + new ActionRowBuilder<ButtonBuilder>().addComponents( + new ButtonBuilder({ style: ButtonStyle.Success, customId: 'confirmationPrompt_confirm', label: 'Yes' }), + new ButtonBuilder({ style: ButtonStyle.Danger, customId: 'confirmationPrompt_cancel', label: 'No' }) ) ]; diff --git a/src/lib/common/DeleteButton.ts b/src/lib/common/DeleteButton.ts index 0a9fd79..4874f78 100644 --- a/src/lib/common/DeleteButton.ts +++ b/src/lib/common/DeleteButton.ts @@ -1,8 +1,8 @@ import { PaginateEmojis, type BushMessage, type BushSlashMessage } from '#lib'; import { CommandUtil } from 'discord-akairo'; import { - ActionRow, - ButtonComponent, + ActionRowBuilder, + ButtonBuilder, ButtonStyle, MessageComponentInteraction, MessageEditOptions, @@ -66,8 +66,8 @@ export class DeleteButton { */ protected updateComponents(edit = false, disable = false): void { this.messageOptions.components = [ - new ActionRow().addComponents( - new ButtonComponent({ + new ActionRowBuilder<ButtonBuilder>().addComponents( + new ButtonBuilder({ style: ButtonStyle.Primary, customId: 'paginate__stop', emoji: PaginateEmojis.STOP, diff --git a/src/lib/common/util/Moderation.ts b/src/lib/common/util/Moderation.ts index afe220c..f388121 100644 --- a/src/lib/common/util/Moderation.ts +++ b/src/lib/common/util/Moderation.ts @@ -11,7 +11,7 @@ import { type ModLogType } from '#lib'; import assert from 'assert'; -import { ActionRow, ButtonComponent, ButtonStyle, Embed, PermissionFlagsBits, type Snowflake } from 'discord.js'; +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, PermissionFlagsBits, type Snowflake } from 'discord.js'; enum punishMap { 'warned' = 'warn', @@ -265,7 +265,7 @@ export class Moderation { const ending = await options.guild.getSetting('punishmentEnding'); const dmEmbed = ending && ending.length && options.sendFooter - ? new Embed().setDescription(ending).setColor(util.colors.newBlurple) + ? new EmbedBuilder().setDescription(ending).setColor(util.colors.newBlurple) : undefined; const appealsEnabled = !!( @@ -286,9 +286,9 @@ export class Moderation { let components; if (appealsEnabled && options.modlog) components = [ - new ActionRow({ + new ActionRowBuilder<ButtonBuilder>({ components: [ - new ButtonComponent({ + new ButtonBuilder({ customId: `appeal;${this.punishmentToPresentTense(options.punishment)};${options.guild.id};${client.users.resolveId( options.user )};${options.modlog}`, diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 2fb559c..6516161 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -22,10 +22,11 @@ import type { } from '#lib'; import { patch, type PatchedElements } from '@notenoughupdates/events-intercept'; import * as Sentry from '@sentry/node'; -import { AkairoClient, ContextMenuCommandHandler, version as akairoVersion } from 'discord-akairo'; -import { GatewayIntentBits } from 'discord-api-types/v9'; +import { AkairoClient, ContextMenuCommandHandler, PromptContentModifier, version as akairoVersion } from 'discord-akairo'; +import { GatewayIntentBits } from 'discord-api-types/v10'; import { ActivityType, + MessagePayload, Options, Partials, Structures, @@ -36,7 +37,6 @@ import { type Message, type MessageEditOptions, type MessageOptions, - type MessagePayload, type ReplyMessageOptions, type Snowflake, type WebhookEditMessageOptions @@ -78,7 +78,6 @@ import { BushNewsChannel } from '../discord.js/BushNewsChannel.js'; import { BushPresence } from '../discord.js/BushPresence.js'; import { BushRole } from '../discord.js/BushRole.js'; import { BushSelectMenuInteraction } from '../discord.js/BushSelectMenuInteraction.js'; -import { BushStoreChannel } from '../discord.js/BushStoreChannel.js'; import { BushTextChannel } from '../discord.js/BushTextChannel.js'; import { BushThreadChannel } from '../discord.js/BushThreadChannel.js'; import { BushThreadMember } from '../discord.js/BushThreadMember.js'; @@ -235,6 +234,17 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re directory: path.join(__dirname, '..', '..', '..', 'tasks'), automateCategories: true }); + + const modify: PromptContentModifier = async (message, text, data) => { + const ending = '\n\n Type **cancel** to cancel the command'; + const options = typeof text === 'function' ? await text(message, data) : text; + if (typeof options === 'string') return text + ending; + if (options instanceof MessagePayload) { + if (options.options.content) options.options.content += ending; + } else options.content += ending; + return options; + }; + this.commandHandler = new BushCommandHandler(this, { directory: path.join(__dirname, '..', '..', '..', 'commands'), prefix: async ({ guild }: Message) => { @@ -251,9 +261,8 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re prompt: { start: 'Placeholder argument prompt. **If you see this please tell my developers**.', retry: 'Placeholder failed argument prompt. **If you see this please tell my developers**.', - modifyStart: (_: Message, str: string): string => `${str}\n\n Type \`cancel\` to cancel the command`, - modifyRetry: (_: Message, str: string): string => - `${str.replace('{error}', this.util.emojis.error)}\n\n Type \`cancel\` to cancel the command`, + modifyStart: modify, + modifyRetry: modify, timeout: ':hourglass: You took too long the command has been cancelled.', ended: 'You exceeded the maximum amount of tries the command has been cancelled', cancel: 'The command has been cancelled', @@ -317,7 +326,6 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re Structures.extend('VoiceChannel', () => BushVoiceChannel); Structures.extend('CategoryChannel', () => BushCategoryChannel); Structures.extend('NewsChannel', () => BushNewsChannel); - Structures.extend('StoreChannel', () => BushStoreChannel); Structures.extend('ThreadChannel', () => BushThreadChannel); Structures.extend('GuildMember', () => BushGuildMember); Structures.extend('ThreadMember', () => BushThreadMember); diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index e92abe7..563df3d 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -22,10 +22,10 @@ import assert from 'assert'; import { exec } from 'child_process'; import deepLock from 'deep-lock'; import { ClientUtil, Util as AkairoUtil } from 'discord-akairo'; -import { APIEmbed, APIMessage, OAuth2Scopes, Routes } from 'discord-api-types/v9'; +import { APIEmbed, APIMessage, OAuth2Scopes, Routes } from 'discord-api-types/v10'; import { Constants as DiscordConstants, - Embed, + EmbedBuilder, GuildMember, Message, PermissionFlagsBits, @@ -920,7 +920,11 @@ export class BushClientUtil extends ClientUtil { */ public get invite() { return client.generateInvite({ - permissions: PermissionsBitField.All, + permissions: + PermissionsBitField.All - + PermissionFlagsBits.UseEmbeddedActivities - + PermissionFlagsBits.ViewGuildInsights - + PermissionFlagsBits.Stream, scopes: [OAuth2Scopes.Bot, OAuth2Scopes.ApplicationsCommands] }); } @@ -970,17 +974,17 @@ export class BushClientUtil extends ClientUtil { * @param embed The options to be applied to the (first) embed. * @param lines Each line of the description as an element in an array. */ - public overflowEmbed(embed: Omit<APIEmbed, 'description'>, lines: string[], maxLength = 4096): Embed[] { - const embeds: Embed[] = []; + public overflowEmbed(embed: Omit<APIEmbed, 'description'>, lines: string[], maxLength = 4096): EmbedBuilder[] { + const embeds: EmbedBuilder[] = []; const makeEmbed = () => { - embeds.push(new Embed().setColor(embed.color ?? null)); + embeds.push(new EmbedBuilder().setColor(embed.color ?? null)); return embeds.at(-1)!; }; for (const line of lines) { let current = embeds.length ? embeds.at(-1)! : makeEmbed(); - const joined = current.description ? `${current.description}\n${line}` : line; + const joined = current.data.description ? `${current.data.description}\n${line}` : line; if (joined.length >= maxLength) current = makeEmbed(); current.setDescription(joined); diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts index ff3748e..febe95a 100644 --- a/src/lib/extensions/discord-akairo/BushCommand.ts +++ b/src/lib/extensions/discord-akairo/BushCommand.ts @@ -18,7 +18,6 @@ import { type BushRole, type BushSlashMessage, type BushStageChannel, - type BushStoreChannel, type BushTask, type BushTextChannel, type BushThreadChannel, @@ -72,10 +71,6 @@ export interface OverriddenBaseArgumentType extends BaseArgumentType { categoryChannels: Collection<string, BushCategoryChannel> | null; newsChannel: BushNewsChannel | null; newsChannels: Collection<string, BushNewsChannel> | null; - // eslint-disable-next-line deprecation/deprecation - storeChannel: BushStoreChannel | null; - // eslint-disable-next-line deprecation/deprecation - storeChannels: Collection<string, BushStoreChannel> | null; stageChannel: BushStageChannel | null; stageChannels: Collection<string, BushStageChannel> | null; threadChannel: BushThreadChannel | null; diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.ts index 68153b9..dc27dbf 100644 --- a/src/lib/extensions/discord.js/BushApplicationCommandManager.ts +++ b/src/lib/extensions/discord.js/BushApplicationCommandManager.ts @@ -6,7 +6,7 @@ import type { BushGuildResolvable, StripPrivate } from '#lib'; -import type { APIApplicationCommand } from 'discord-api-types/v9'; +import type { APIApplicationCommand } from 'discord-api-types/v10'; import { ApplicationCommandManager, CachedManager, diff --git a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts index 49d4234..401f3e2 100644 --- a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts +++ b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts @@ -1,5 +1,5 @@ import type { BushClient, BushRoleResolvable, BushUserResolvable } from '#lib'; -import type { APIApplicationCommandPermission } from 'discord-api-types/v9'; +import type { APIApplicationCommandPermission } from 'discord-api-types/v10'; import { ApplicationCommandPermissionType, BaseManager, diff --git a/src/lib/extensions/discord.js/BushButtonInteraction.ts b/src/lib/extensions/discord.js/BushButtonInteraction.ts index 89cfabd..368d19d 100644 --- a/src/lib/extensions/discord.js/BushButtonInteraction.ts +++ b/src/lib/extensions/discord.js/BushButtonInteraction.ts @@ -1,5 +1,5 @@ import type { BushClient, BushGuild, BushGuildMember, BushGuildTextBasedChannel, BushTextBasedChannel, BushUser } from '#lib'; -import type { APIInteractionGuildMember } from 'discord-api-types/v9'; +import type { APIInteractionGuildMember } from 'discord-api-types/v10'; import { ButtonInteraction, type CacheType, type CacheTypeReducer } from 'discord.js'; import type { RawMessageButtonInteractionData } from 'discord.js/typings/rawDataTypes'; diff --git a/src/lib/extensions/discord.js/BushCategoryChannel.ts b/src/lib/extensions/discord.js/BushCategoryChannel.ts index 8c02a68..a2e1e1c 100644 --- a/src/lib/extensions/discord.js/BushCategoryChannel.ts +++ b/src/lib/extensions/discord.js/BushCategoryChannel.ts @@ -3,7 +3,6 @@ import { BushGuildBasedChannel, BushNewsChannel, BushStageChannel, - BushStoreChannel, BushTextBasedChannel, BushTextChannel, BushThreadChannel, @@ -35,8 +34,6 @@ export interface BushCategoryChannel extends CategoryChannel { isVoice(): this is BushVoiceChannel; isCategory(): this is BushCategoryChannel; isNews(): this is BushNewsChannel; - // eslint-disable-next-line deprecation/deprecation - isStore(): this is BushStoreChannel; isThread(): this is BushThreadChannel; isStage(): this is BushStageChannel; isTextBased(): this is BushGuildBasedChannel & BushTextBasedChannel; diff --git a/src/lib/extensions/discord.js/BushCategoryChannelChildManager.ts b/src/lib/extensions/discord.js/BushCategoryChannelChildManager.ts index b9a7ac7..2b0d56b 100644 --- a/src/lib/extensions/discord.js/BushCategoryChannelChildManager.ts +++ b/src/lib/extensions/discord.js/BushCategoryChannelChildManager.ts @@ -1,20 +1,23 @@ -/* eslint-disable deprecation/deprecation */ import type { BushCategoryChannel, BushGuild, BushGuildChannelResolvable, BushMappedChannelCategoryTypes, BushNonCategoryGuildBasedChannel, - BushStoreChannel, BushTextChannel } from '#lib'; -import type { CategoryChannelType, CategoryCreateChannelOptions, ChannelType, DataManager, Snowflake } from 'discord.js'; +import type { + CategoryChannelChildManager, + CategoryChannelType, + CategoryCreateChannelOptions, + DataManager, + Snowflake +} from 'discord.js'; -export declare class BushCategoryChannelChildManager extends DataManager< - Snowflake, - BushNonCategoryGuildBasedChannel, - BushGuildChannelResolvable -> { +export declare class BushCategoryChannelChildManager + extends DataManager<Snowflake, BushNonCategoryGuildBasedChannel, BushGuildChannelResolvable> + implements CategoryChannelChildManager +{ private constructor(channel: BushCategoryChannel); /** @@ -33,20 +36,9 @@ export declare class BushCategoryChannelChildManager extends DataManager< * @param name The name of the new channel * @param options Options for creating the new channel */ - public create<T extends Exclude<CategoryChannelType, ChannelType.GuildStore>>( + public create<T extends CategoryChannelType>( name: string, options: CategoryCreateChannelOptions & { type: T } ): Promise<BushMappedChannelCategoryTypes[T]>; - /** - * Creates a new channel within this category. - * <info>You cannot create a channel of type {@link ChannelType.GuildCategory} inside a CategoryChannel.</info> - * @param name The name of the new channel - * @param options Options for creating the new channel - * @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/4414590563479) for more information - */ - public create( - name: string, - options: CategoryCreateChannelOptions & { type: ChannelType.GuildStore } - ): Promise<BushStoreChannel>; public create(name: string, options?: CategoryCreateChannelOptions): Promise<BushTextChannel>; } diff --git a/src/lib/extensions/discord.js/BushChannel.ts b/src/lib/extensions/discord.js/BushChannel.ts index 3f0d070..e66135c 100644 --- a/src/lib/extensions/discord.js/BushChannel.ts +++ b/src/lib/extensions/discord.js/BushChannel.ts @@ -1,11 +1,9 @@ -/* eslint-disable deprecation/deprecation */ import type { BushCategoryChannel, BushClient, BushDMChannel, BushNewsChannel, BushStageChannel, - BushStoreChannel, BushTextBasedChannel, BushTextChannel, BushThreadChannel, @@ -34,7 +32,6 @@ export declare class BushChannel extends Channel { public isVoice(): this is BushVoiceChannel; public isCategory(): this is BushCategoryChannel; public isNews(): this is BushNewsChannel; - public isStore(): this is BushStoreChannel; public isThread(): this is BushThreadChannel; public isStage(): this is BushStageChannel; public isTextBased(): this is BushTextBasedChannel; diff --git a/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts b/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts index 5dbf7b9..2491a68 100644 --- a/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts +++ b/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts @@ -10,7 +10,7 @@ import type { BushTextBasedChannel, BushUser } from '#lib'; -import type { APIInteractionGuildMember } from 'discord-api-types/v9'; +import type { APIInteractionGuildMember } from 'discord-api-types/v10'; import { ChatInputCommandInteraction, type CacheType, type CacheTypeReducer, type Invite, type Snowflake } from 'discord.js'; import type { RawCommandInteractionData } from 'discord.js/typings/rawDataTypes'; diff --git a/src/lib/extensions/discord.js/BushClientEvents.ts b/src/lib/extensions/discord.js/BushClientEvents.ts index 4a10ce5..fc9993e 100644 --- a/src/lib/extensions/discord.js/BushClientEvents.ts +++ b/src/lib/extensions/discord.js/BushClientEvents.ts @@ -97,7 +97,8 @@ export interface BushClientEvents extends AkairoClientEvents { reaction: BushMessageReaction | PartialBushMessageReaction ]; messageDeleteBulk: [ - messages: Collection<Snowflake, BushMessage | PartialBushMessage> + messages: Collection<Snowflake, BushMessage | PartialBushMessage>, + channel: BushTextBasedChannel ]; messageReactionAdd: [ reaction: BushMessageReaction | PartialBushMessageReaction, @@ -119,14 +120,18 @@ export interface BushClientEvents extends AkairoClientEvents { roleUpdate: [oldRole: BushRole, newRole: BushRole]; threadCreate: [thread: BushThreadChannel, newlyCreated: boolean]; threadDelete: [thread: BushThreadChannel]; - threadListSync: [threads: Collection<Snowflake, BushThreadChannel>]; + threadListSync: [ + threads: Collection<Snowflake, BushThreadChannel>, + guild: BushGuild + ]; threadMemberUpdate: [ oldMember: BushThreadMember, newMember: BushThreadMember ]; threadMembersUpdate: [ oldMembers: Collection<Snowflake, BushThreadMember>, - newMembers: Collection<Snowflake, BushThreadMember> + newMembers: Collection<Snowflake, BushThreadMember>, + thread: BushThreadChannel ]; threadUpdate: [oldThread: BushThreadChannel, newThread: BushThreadChannel]; typingStart: [typing: Typing]; diff --git a/src/lib/extensions/discord.js/BushDMChannel.ts b/src/lib/extensions/discord.js/BushDMChannel.ts index dc7d309..87382ec 100644 --- a/src/lib/extensions/discord.js/BushDMChannel.ts +++ b/src/lib/extensions/discord.js/BushDMChannel.ts @@ -1,11 +1,9 @@ -/* eslint-disable deprecation/deprecation */ import type { BushCategoryChannel, BushClient, BushMessageManager, BushNewsChannel, BushStageChannel, - BushStoreChannel, BushTextBasedChannel, BushTextChannel, BushThreadChannel, @@ -36,7 +34,6 @@ export interface BushDMChannel extends DMChannel { isVoice(): this is BushVoiceChannel; isCategory(): this is BushCategoryChannel; isNews(): this is BushNewsChannel; - isStore(): this is BushStoreChannel; isThread(): this is BushThreadChannel; isStage(): this is BushStageChannel; isTextBased(): this is BushTextBasedChannel; diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts index b0a34e7..8b1b5fa 100644 --- a/src/lib/extensions/discord.js/BushGuild.ts +++ b/src/lib/extensions/discord.js/BushGuild.ts @@ -20,7 +20,7 @@ import { type GuildLogType, type GuildModel } from '#lib'; -import { APIMessage } from 'discord-api-types/v9'; +import { APIMessage } from 'discord-api-types/v10'; import { Collection, Guild, diff --git a/src/lib/extensions/discord.js/BushGuildChannel.ts b/src/lib/extensions/discord.js/BushGuildChannel.ts index dd523e5..62bf05a 100644 --- a/src/lib/extensions/discord.js/BushGuildChannel.ts +++ b/ |
