diff options
| author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-23 18:13:05 -0500 |
|---|---|---|
| committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-23 18:13:05 -0500 |
| commit | a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a (patch) | |
| tree | 9b0f8ed8a93c22c90512751e3f2f5937e1925760 /src/lib/extensions | |
| parent | 5557677f1570eb564a30cfcebb6030235dc84d47 (diff) | |
| download | tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.gz tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.bz2 tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.zip | |
fix discord.js breaking changes, some other stuff
Diffstat (limited to 'src/lib/extensions')
36 files changed, 477 insertions, 242 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index cb1e50b..01620a8 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -24,6 +24,7 @@ import { patch, type PatchedElements } from '@notenoughupdates/events-intercept' import * as Sentry from '@sentry/node'; import { AkairoClient, ContextMenuCommandHandler, version as akairoVersion } from 'discord-akairo'; import { + ActivityType, Intents, Options, Structures, @@ -61,7 +62,7 @@ import { BushConstants } from '../../utils/BushConstants.js'; import { BushLogger } from '../../utils/BushLogger.js'; import { BushButtonInteraction } from '../discord.js/BushButtonInteraction.js'; import { BushCategoryChannel } from '../discord.js/BushCategoryChannel.js'; -import { BushCommandInteraction } from '../discord.js/BushCommandInteraction.js'; +import { BushChatInputCommandInteraction } from '../discord.js/BushChatInputCommandInteraction.js'; import { BushDMChannel } from '../discord.js/BushDMChannel.js'; import { BushGuild } from '../discord.js/BushGuild.js'; import { BushGuildEmoji } from '../discord.js/BushGuildEmoji.js'; @@ -193,7 +194,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re activities: [ { name: 'Beep Boop', - type: 'WATCHING' + type: ActivityType.Watching } ], status: 'online' @@ -252,7 +253,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re automateCategories: false, autoRegisterSlashCommands: true, skipBuiltInPostInhibitors: true, - useSlashPermissions: true, + useSlashPermissions: false, aliasReplacement: /-/g }); this.contextMenuCommandHandler = new ContextMenuCommandHandler(this, { @@ -320,7 +321,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re Structures.extend('VoiceState', () => BushVoiceState); Structures.extend('Role', () => BushRole); Structures.extend('User', () => BushUser); - Structures.extend('CommandInteraction', () => BushCommandInteraction); + Structures.extend('ChatInputCommandInteraction', () => BushChatInputCommandInteraction); Structures.extend('ButtonInteraction', () => BushButtonInteraction); Structures.extend('SelectMenuInteraction', () => BushSelectMenuInteraction); } @@ -440,13 +441,17 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re */ public async start() { this.intercept('ready', async (arg, done) => { - await this.guilds.fetch(); - const promises = this.guilds.cache.map((guild) => { - return guild.members.fetch(); - }); + console.debug('ready start'); + console.time('ready'); + const promises = this.guilds.cache + .filter((g) => g.large) + .map((guild) => { + return guild.members.fetch(); + }); await Promise.all(promises); this.customReady = true; this.taskHandler.startAll(); + console.timeEnd('ready'); return done(null, `intercepted ${arg}`); }); diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index 12becd3..79aa4c1 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -26,13 +26,13 @@ import { GuildMember, Message, MessageEmbed, + Permissions, ThreadMember, User, Util as DiscordUtil, type ColorResolvable, type CommandInteraction, type InteractionReplyOptions, - type PermissionResolvable, type Snowflake, type TextChannel, type UserResolvable @@ -43,6 +43,8 @@ import { inspect, promisify } from 'util'; import CommandErrorListener from '../../../listeners/commands/commandError.js'; import { Format } from '../../common/util/Format.js'; +export type StripPrivate<T> = { [K in keyof T]: T[K] extends Record<string, any> ? StripPrivate<T[K]> : T[K] }; + export class BushClientUtil extends ClientUtil { /** * The client. @@ -208,7 +210,7 @@ export class BushClientUtil extends ClientUtil { if (author) embed = embed.setAuthor({ name: author.username, - iconURL: author.displayAvatarURL({ dynamic: true }), + iconURL: author.displayAvatarURL(), url: `https://discord.com/users/${author.id}` }); if (color) embed = embed.setColor(color); @@ -425,7 +427,7 @@ export class BushClientUtil extends ClientUtil { * @returns The combined elements or `ifEmpty`. * * @example - * const permissions = oxford(['ADMINISTRATOR', 'SEND_MESSAGES', 'MANAGE_MESSAGES'], 'and', 'none'); + * const permissions = oxford([Permissions.FLAGS.ADMINISTRATOR, Permissions.FLAGS.SEND_MESSAGES, Permissions.FLAGS.MANAGE_MESSAGES], 'and', 'none'); * console.log(permissions); // ADMINISTRATOR, SEND_MESSAGES and MANAGE_MESSAGES */ public oxford(array: string[], conjunction: string, ifEmpty?: string): string | undefined { @@ -785,10 +787,10 @@ export class BushClientUtil extends ClientUtil { * @param permissions The permissions to check for. * @returns The missing permissions or null if none are missing. */ - public userGuildPermCheck(message: BushMessage | BushSlashMessage, permissions: PermissionResolvable) { + public userGuildPermCheck(message: BushMessage | BushSlashMessage, permissions: bigint[]) { const missing = message.member?.permissions.missing(permissions) ?? []; - return missing.length ? missing : null; + return missing.length ? missing.map((p) => Permissions.FLAGS[p]) : null; } /** @@ -797,10 +799,10 @@ export class BushClientUtil extends ClientUtil { * @param permissions The permissions to check for. * @returns The missing permissions or null if none are missing. */ - public clientGuildPermCheck(message: BushMessage | BushSlashMessage, permissions: PermissionResolvable) { + public clientGuildPermCheck(message: BushMessage | BushSlashMessage, permissions: bigint[]) { const missing = message.guild?.me?.permissions.missing(permissions) ?? []; - return missing.length ? missing : null; + return missing.length ? missing.map((p) => Permissions.FLAGS[p]) : null; } /** @@ -811,19 +813,18 @@ export class BushClientUtil extends ClientUtil { * @param checkChannel Whether to check the channel permissions instead of the guild permissions. * @returns The missing permissions or null if none are missing. */ - public clientSendAndPermCheck( - message: BushMessage | BushSlashMessage, - permissions: PermissionResolvable = [], - checkChannel = false - ) { + public clientSendAndPermCheck(message: BushMessage | BushSlashMessage, permissions: bigint[] = [], checkChannel = false) { const missing = []; - const sendPerm = message.channel!.isThread() ? 'SEND_MESSAGES' : 'SEND_MESSAGES_IN_THREADS'; + const sendPerm = message.channel!.isThread() ? Permissions.FLAGS.SEND_MESSAGES : Permissions.FLAGS.SEND_MESSAGES_IN_THREADS; if (!message.guild!.me!.permissionsIn(message.channel!.id!).has(sendPerm)) missing.push(sendPerm); missing.push( ...(checkChannel - ? message.guild!.me!.permissionsIn(message.channel!.id!).missing(permissions) + ? message + .guild!.me!.permissionsIn(message.channel!.id!) + .missing(permissions) + .map((p) => Permissions.FLAGS[p]) : this.clientGuildPermCheck(message, permissions) ?? []) ); @@ -894,6 +895,12 @@ export class BushClientUtil extends ClientUtil { return Object.fromEntries(values); } + public get invite() { + return `https://discord.com/api/oauth2/authorize?client_id=${client.user!.id}&permissions=${ + Permissions.ALL + }&scope=bot%20applications.commands`; + } + /** * A wrapper for the Argument class that adds custom typings. */ diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts index fb488be..0456b80 100644 --- a/src/lib/extensions/discord-akairo/BushCommand.ts +++ b/src/lib/extensions/discord-akairo/BushCommand.ts @@ -315,12 +315,12 @@ export interface BaseBushCommandOptions /** * Permissions required by the client to run this command. */ - clientPermissions: PermissionResolvable | PermissionResolvable[] | BushMissingPermissionSupplier; + clientPermissions: bigint | bigint[] | BushMissingPermissionSupplier; /** * Permissions required by the user to run this command. */ - userPermissions: PermissionResolvable | PermissionResolvable[] | BushMissingPermissionSupplier; + userPermissions: bigint | bigint[] | BushMissingPermissionSupplier; /** * Restrict this argument to owners diff --git a/src/lib/extensions/discord-akairo/BushSlashMessage.ts b/src/lib/extensions/discord-akairo/BushSlashMessage.ts index cefd360..d342ea6 100644 --- a/src/lib/extensions/discord-akairo/BushSlashMessage.ts +++ b/src/lib/extensions/discord-akairo/BushSlashMessage.ts @@ -1,4 +1,5 @@ import { + BushGuildTextBasedChannel, type BushClient, type BushCommandUtil, type BushGuild, @@ -7,14 +8,14 @@ import { type BushUser } from '#lib'; import { AkairoMessage } from 'discord-akairo'; -import { type CommandInteraction } from 'discord.js'; +import { type ChatInputCommandInteraction, type ContextMenuCommandInteraction } from 'discord.js'; export class BushSlashMessage extends AkairoMessage { public declare client: BushClient; public declare util: BushCommandUtil<BushSlashMessage>; public declare author: BushUser; public declare member: BushGuildMember | null; - public constructor(client: BushClient, interaction: CommandInteraction) { + public constructor(client: BushClient, interaction: ChatInputCommandInteraction | ContextMenuCommandInteraction) { super(client, interaction); } } @@ -22,5 +23,10 @@ export class BushSlashMessage extends AkairoMessage { export interface BushSlashMessage extends AkairoMessage { get channel(): BushTextBasedChannel | null; get guild(): BushGuild | null; - inGuild(): this is this & { guild: BushGuild; member: BushGuildMember }; + inGuild(): this is BushSlashMessageInGuild & this; +} + +interface BushSlashMessageInGuild { + guild: BushGuild; + channel: BushGuildTextBasedChannel; } diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.ts index 2aa366d..24a7b22 100644 --- a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts +++ b/src/lib/extensions/discord.js/BushApplicationCommandManager.ts @@ -3,10 +3,12 @@ import type { BushApplicationCommandPermissionsManager, BushApplicationCommandResolvable, BushClient, - BushGuildResolvable + BushGuildResolvable, + StripPrivate } from '#lib'; import type { APIApplicationCommand } from 'discord-api-types'; import { + ApplicationCommandManager, CachedManager, type ApplicationCommandData, type Collection, @@ -17,11 +19,14 @@ import { /** * Manages API methods for application commands and stores their cache. */ -export class BushApplicationCommandManager< - ApplicationCommandScope = BushApplicationCommand<{ guild: BushGuildResolvable }>, - PermissionsOptionsExtras = { guild: BushGuildResolvable }, - PermissionsGuildType = null -> extends CachedManager<Snowflake, ApplicationCommandScope, BushApplicationCommandResolvable> { +export declare class BushApplicationCommandManager< + ApplicationCommandScope = BushApplicationCommand<{ guild: BushGuildResolvable }>, + PermissionsOptionsExtras = { guild: BushGuildResolvable }, + PermissionsGuildType = null + > + extends CachedManager<Snowflake, ApplicationCommandScope, BushApplicationCommandResolvable> + implements StripPrivate<ApplicationCommandManager<ApplicationCommandScope, PermissionsOptionsExtras, PermissionsGuildType>> +{ public constructor(client: BushClient, iterable?: Iterable<unknown>); /** diff --git a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts index ff32be4..f07bde9 100644 --- a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts +++ b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts @@ -1,6 +1,7 @@ import type { BushClient, BushRoleResolvable, BushUserResolvable } from '#lib'; import type { APIApplicationCommandPermission } from 'discord-api-types'; import { + ApplicationCommandPermissionType, BaseManager, type ApplicationCommand, type ApplicationCommandManager, @@ -11,12 +12,11 @@ import { type GuildApplicationCommandPermissionData, type Snowflake } from 'discord.js'; -import type { ApplicationCommandPermissionTypes } from 'discord.js/typings/enums'; /** * Manages API methods for permissions of Application Commands. */ -export class BushApplicationCommandPermissionsManager< +export declare class BushApplicationCommandPermissionsManager< BaseOptions, FetchSingleOptions, FullPermissionsOptions, @@ -179,6 +179,6 @@ export class BushApplicationCommandPermissionsManager< private static transformPermissions( permissions: ApplicationCommandPermissionData, received: true - ): Omit<APIApplicationCommandPermission, 'type'> & { type: keyof ApplicationCommandPermissionTypes }; + ): Omit<APIApplicationCommandPermission, 'type'> & { type: keyof ApplicationCommandPermissionType }; private static transformPermissions(permissions: ApplicationCommandPermissionData): APIApplicationCommandPermission; } diff --git a/src/lib/extensions/discord.js/BushBaseGuildEmojiManager.d.ts b/src/lib/extensions/discord.js/BushBaseGuildEmojiManager.ts index 347ff65..66abbc2 100644 --- a/src/lib/extensions/discord.js/BushBaseGuildEmojiManager.d.ts +++ b/src/lib/extensions/discord.js/BushBaseGuildEmojiManager.ts @@ -1,11 +1,14 @@ import type { BushClient, BushEmojiIdentifierResolvable, BushEmojiResolvable, BushGuildEmoji } from '#lib'; -import { CachedManager, type Snowflake } from 'discord.js'; +import { BaseGuildEmojiManager, CachedManager, type Snowflake } from 'discord.js'; import { type RawGuildEmojiData } from 'discord.js/typings/rawDataTypes'; /** * Holds methods to resolve GuildEmojis and stores their cache. */ -export class BushBaseGuildEmojiManager extends CachedManager<Snowflake, BushGuildEmoji, BushEmojiResolvable> { +export declare class BushBaseGuildEmojiManager + extends CachedManager<Snowflake, BushGuildEmoji, BushEmojiResolvable> + implements BaseGuildEmojiManager +{ public constructor(client: BushClient, iterable?: Iterable<RawGuildEmojiData>); /** diff --git a/src/lib/extensions/discord.js/BushBaseGuildVoiceChannel.d.ts b/src/lib/extensions/discord.js/BushBaseGuildVoiceChannel.ts index 21be206..2ffb2fd 100644 --- a/src/lib/extensions/discord.js/BushBaseGuildVoiceChannel.d.ts +++ b/src/lib/extensions/discord.js/BushBaseGuildVoiceChannel.ts @@ -6,7 +6,7 @@ import { BushGuildMember } from './BushGuildMember'; /** * Represents a voice-based guild channel on Discord. */ -export class BushBaseGuildVoiceChannel extends BaseGuildVoiceChannel { +export declare class BushBaseGuildVoiceChannel extends BaseGuildVoiceChannel { public readonly members: Collection<Snowflake, BushGuildMember>; public guild: BushGuild; public readonly parent: BushCategoryChannel | null; diff --git a/src/lib/extensions/discord.js/BushCategoryChannel.ts b/src/lib/extensions/discord.js/BushCategoryChannel.ts index b711a54..ac82bf0 100644 --- a/src/lib/extensions/discord.js/BushCategoryChannel.ts +++ b/src/lib/extensions/discord.js/BushCategoryChannel.ts @@ -1,4 +1,19 @@ -import { BushNonThreadGuildBasedChannel, type BushClient, type BushGuild, type BushGuildMember } from '#lib'; +import { + BushDMChannel, + BushGuildBasedChannel, + BushNewsChannel, + BushNonThreadGuildBasedChannel, + BushStageChannel, + BushStoreChannel, + BushTextBasedChannel, + BushTextChannel, + BushThreadChannel, + BushVoiceBasedChannel, + BushVoiceChannel, + type BushClient, + type BushGuild, + type BushGuildMember +} from '#lib'; import { CategoryChannel, type Collection, type Snowflake } from 'discord.js'; import { type RawGuildChannelData } from 'discord.js/typings/rawDataTypes'; @@ -16,3 +31,17 @@ export class BushCategoryChannel extends CategoryChannel { super(guild, data, client, immediatePatch); } } + +export interface BushCategoryChannel extends CategoryChannel { + isText(): this is BushTextChannel; + isDM(): this is BushDMChannel; + 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; + isVoiceBased(): this is BushVoiceBasedChannel; +} diff --git a/src/lib/extensions/discord.js/BushChannel.d.ts b/src/lib/extensions/discord.js/BushChannel.d.ts deleted file mode 100644 index 42443ba..0000000 --- a/src/lib/extensions/discord.js/BushChannel.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { BushClient, BushTextBasedChannel, BushThreadChannel } from '#lib'; -import { Channel, type ChannelMention, type Snowflake } from 'discord.js'; -import type { ChannelTypes } from 'discord.js/typings/enums'; -import type { RawChannelData } from 'discord.js/typings/rawDataTypes'; -import { BushBaseGuildVoiceChannel } from './BushBaseGuildVoiceChannel'; - -/** - * Represents any channel on Discord. - */ -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 id: Snowflake; - public readonly partial: false; - public type: keyof typeof ChannelTypes; - public delete(): Promise<this>; - public fetch(force?: boolean): Promise<this>; - public isText(): this is BushTextBasedChannel; - public isVoice(): this is BushBaseGuildVoiceChannel; - public isThread(): this is BushThreadChannel; - public toString(): ChannelMention; -} diff --git a/src/lib/extensions/discord.js/BushChannel.ts b/src/lib/extensions/discord.js/BushChannel.ts new file mode 100644 index 0000000..50ec723 --- /dev/null +++ b/src/lib/extensions/discord.js/BushChannel.ts @@ -0,0 +1,41 @@ +/* eslint-disable deprecation/deprecation */ +import type { + BushCategoryChannel, + BushClient, + BushDMChannel, + BushNewsChannel, + BushStageChannel, + BushStoreChannel, + BushTextBasedChannel, + BushTextChannel, + BushThreadChannel, + BushVoiceBasedChannel, + BushVoiceChannel +} from '#lib'; +import { Channel, ChannelType, type Snowflake } from 'discord.js'; +import type { RawChannelData } from 'discord.js/typings/rawDataTypes'; + +/** + * Represents any channel on Discord. + */ +export declare class BushChannel extends Channel { + public constructor(client: BushClient, data?: RawChannelData, immediatePatch?: boolean); + public readonly createdAt: Date; + public readonly createdTimestamp: number; + public deleted: boolean; + public id: Snowflake; + public readonly partial: false; + public type: ChannelType; + public delete(): Promise<this>; + public fetch(force?: boolean): Promise<this>; + public isText(): this is BushTextChannel; + public isDM(): this is BushDMChannel; + 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; + public isVoiceBased(): this is BushVoiceBasedChannel; +} diff --git a/src/lib/extensions/discord.js/BushChannelManager.d.ts b/src/lib/extensions/discord.js/BushChannelManager.ts index 514cdd3..ff93209 100644 --- a/src/lib/extensions/discord.js/BushChannelManager.d.ts +++ b/src/lib/extensions/discord.js/BushChannelManager.ts @@ -1,11 +1,14 @@ import type { BushAnyChannel, BushChannelResolvable } from '#lib'; -import { CachedManager, type Client, type FetchChannelOptions, type Snowflake } from 'discord.js'; +import { CachedManager, ChannelManager, type Client, type FetchChannelOptions, type Snowflake } from 'discord.js'; import type { RawChannelData } from 'discord.js/typings/rawDataTypes'; /** * A manager of channels belonging to a client */ -export class BushChannelManager extends CachedManager<Snowflake, BushAnyChannel, BushChannelResolvable> { +export declare class BushChannelManager + extends CachedManager<Snowflake, BushAnyChannel, BushChannelResolvable> + implements ChannelManager +{ public constructor(client: Client, iterable: Iterable<RawChannelData>); /** diff --git a/src/lib/extensions/discord.js/BushCommandInteraction.ts b/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts index f4be5ed..56bef21 100644 --- a/src/lib/extensions/discord.js/BushCommandInteraction.ts +++ b/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts @@ -11,7 +11,7 @@ import type { BushUser } from '#lib'; import type { APIInteractionGuildMember } from '@discordjs/builders/node_modules/discord-api-types'; -import { CommandInteraction, type CacheType, type CacheTypeReducer, type Invite, type Snowflake } from 'discord.js'; +import { ChatInputCommandInteraction, type CacheType, type CacheTypeReducer, type Invite, type Snowflake } from 'discord.js'; import type { RawCommandInteractionData } from 'discord.js/typings/rawDataTypes'; export type BushGuildResolvable = @@ -26,7 +26,7 @@ export type BushGuildResolvable = /** * Represents a command interaction. */ -export class BushCommandInteraction<Cached extends CacheType = CacheType> extends CommandInteraction<Cached> { +export class BushChatInputCommandInteraction<Cached extends CacheType = CacheType> extends ChatInputCommandInteraction<Cached> { public declare readonly client: BushClient; public declare readonly command: BushApplicationCommand | BushApplicationCommand<{ guild: BushGuildResolvable }> | null; public declare readonly channel: CacheTypeReducer< diff --git a/src/lib/extensions/discord.js/BushClientEvents.d.ts b/src/lib/extensions/discord.js/BushClientEvents.ts index b5ad749..02f0017 100644 --- a/src/lib/extensions/discord.js/BushClientEvents.d.ts +++ b/src/lib/extensions/discord.js/BushClientEvents.ts @@ -43,10 +43,7 @@ import type { export interface BushClientEvents extends AkairoClientEvents { applicationCommandCreate: [command: BushApplicationCommand]; applicationCommandDelete: [command: BushApplicationCommand]; - applicationCommandUpdate: [ - oldCommand: BushApplicationCommand | null, - newCommand: BushApplicationCommand - ]; + applicationCommandUpdate: [oldCommand: BushApplicationCommand | null, newCommand: BushApplicationCommand]; channelCreate: [channel: BushNonThreadGuildBasedChannel]; channelDelete: [channel: BushDMChannel | BushNonThreadGuildBasedChannel]; channelPinsUpdate: [channel: BushTextBasedChannel, date: Date]; @@ -78,37 +75,18 @@ export interface BushClientEvents extends AkairoClientEvents { nonce: string | undefined; } ]; - guildMemberUpdate: [ - oldMember: BushGuildMember | PartialBushGuildMember, - newMember: BushGuildMember - ]; + guildMemberUpdate: [oldMember: BushGuildMember | PartialBushGuildMember, newMember: BushGuildMember]; guildUpdate: [oldGuild: BushGuild, newGuild: BushGuild]; inviteCreate: [invite: Invite]; inviteDelete: [invite: Invite]; messageCreate: [message: BushMessage]; messageDelete: [message: BushMessage | PartialBushMessage]; - messageReactionRemoveAll: [ - message: BushMessage | PartialBushMessage, - reactions: Collection<string, BushMessageReaction> - ]; - messageReactionRemoveEmoji: [ - reaction: BushMessageReaction | PartialBushMessageReaction - ]; - messageDeleteBulk: [ - messages: Collection<Snowflake, BushMessage | PartialBushMessage> - ]; - messageReactionAdd: [ - reaction: BushMessageReaction | PartialBushMessageReaction, - user: BushUser | PartialBushUser - ]; - messageReactionRemove: [ - reaction: BushMessageReaction | PartialBushMessageReaction, - user: BushUser | PartialBushUser - ]; - messageUpdate: [ - oldMessage: BushMessage | PartialBushMessage, - newMessage: BushMessage | PartialBushMessage - ]; + messageReactionRemoveAll: [message: BushMessage | PartialBushMessage, reactions: Collection<string, BushMessageReaction>]; + messageReactionRemoveEmoji: [reaction: BushMessageReaction | PartialBushMessageReaction]; + messageDeleteBulk: [messages: Collection<Snowflake, BushMessage | PartialBushMessage>]; + m |
