aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-05 16:14:12 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-05 16:14:12 -0400
commitad2077fa157d49c1099f21ac2effe05903c39035 (patch)
tree4ada5fb9a6243d21411500dc46b203ace06718e1 /src/lib
parentdbb2de6e5c4b0cf80a5be8e62bbabaac2f3dd516 (diff)
downloadtanzanite-ad2077fa157d49c1099f21ac2effe05903c39035.tar.gz
tanzanite-ad2077fa157d49c1099f21ac2effe05903c39035.tar.bz2
tanzanite-ad2077fa157d49c1099f21ac2effe05903c39035.zip
fixed ~500 errors from breaking changes
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts6
-rw-r--r--src/lib/extensions/discord-akairo/BushSlashMessage.ts9
-rw-r--r--src/lib/extensions/discord.js/BushActivity.ts3
-rw-r--r--src/lib/extensions/discord.js/BushApplicationCommand.ts4
-rw-r--r--src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts9
-rw-r--r--src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts13
-rw-r--r--src/lib/extensions/discord.js/BushBaseGuildEmojiManager.d.ts3
-rw-r--r--src/lib/extensions/discord.js/BushBaseGuildTextChannel.ts18
-rw-r--r--src/lib/extensions/discord.js/BushButtonInteraction.ts12
-rw-r--r--src/lib/extensions/discord.js/BushCategoryChannel.ts5
-rw-r--r--src/lib/extensions/discord.js/BushChannel.d.ts3
-rw-r--r--src/lib/extensions/discord.js/BushChannelManager.d.ts3
-rw-r--r--src/lib/extensions/discord.js/BushClientUser.d.ts12
-rw-r--r--src/lib/extensions/discord.js/BushCommandInteraction.ts19
-rw-r--r--src/lib/extensions/discord.js/BushDMChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushEmoji.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuild.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuildChannel.ts5
-rw-r--r--src/lib/extensions/discord.js/BushGuildEmoji.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuildManager.d.ts15
-rw-r--r--src/lib/extensions/discord.js/BushGuildMember.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuildMemberManager.d.ts24
-rw-r--r--src/lib/extensions/discord.js/BushMessage.ts20
-rw-r--r--src/lib/extensions/discord.js/BushMessageManager.d.ts18
-rw-r--r--src/lib/extensions/discord.js/BushMessageReaction.ts3
-rw-r--r--src/lib/extensions/discord.js/BushNewsChannel.ts10
-rw-r--r--src/lib/extensions/discord.js/BushPresence.ts3
-rw-r--r--src/lib/extensions/discord.js/BushReactionEmoji.ts3
-rw-r--r--src/lib/extensions/discord.js/BushRole.ts3
-rw-r--r--src/lib/extensions/discord.js/BushSelectMenuInteraction.ts12
-rw-r--r--src/lib/extensions/discord.js/BushStageChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushStageInstance.ts3
-rw-r--r--src/lib/extensions/discord.js/BushStoreChannel.ts5
-rw-r--r--src/lib/extensions/discord.js/BushTextChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushThreadChannel.ts9
-rw-r--r--src/lib/extensions/discord.js/BushThreadManager.d.ts4
-rw-r--r--src/lib/extensions/discord.js/BushThreadMember.ts3
-rw-r--r--src/lib/extensions/discord.js/BushThreadMemberManager.d.ts5
-rw-r--r--src/lib/extensions/discord.js/BushUser.ts3
-rw-r--r--src/lib/extensions/discord.js/BushUserManager.d.ts3
-rw-r--r--src/lib/extensions/discord.js/BushVoiceChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushVoiceState.ts3
43 files changed, 159 insertions, 141 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index 42d3d13..d8705a3 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -315,11 +315,11 @@ export class BushClientUtil extends ClientUtil {
const style = Constants.MessageButtonStyles.PRIMARY;
let curPage = 0;
if (typeof embeds !== 'object') throw new Error('embeds must be an object');
- const msg: Message = await message.util.reply({
+ const msg = (await message.util.reply({
content: text || null,
embeds: [embeds[curPage]],
components: [getPaginationRow()]
- });
+ })) as Message;
const filter = (interaction: ButtonInteraction) =>
interaction.customId.startsWith('paginate_') && interaction.message == msg;
const collector = msg.createMessageComponentCollector({ filter, time: 300000 });
@@ -409,7 +409,7 @@ export class BushClientUtil extends ClientUtil {
public async sendWithDeleteButton(message: BushMessage | BushSlashMessage, options: MessageOptions): Promise<void> {
const paginateEmojis = this.#paginateEmojis;
updateOptions();
- const msg = await message.util.reply(options as MessageOptions & { split?: false });
+ const msg = (await message.util.reply(options as MessageOptions & { split?: false })) as Message;
const filter = (interaction: ButtonInteraction) => interaction.customId == 'paginate__stop' && interaction.message == msg;
const collector = msg.createMessageComponentCollector({ filter, time: 300000 });
collector.on('collect', async (interaction: MessageComponentInteraction) => {
diff --git a/src/lib/extensions/discord-akairo/BushSlashMessage.ts b/src/lib/extensions/discord-akairo/BushSlashMessage.ts
index eee6ac2..215cf79 100644
--- a/src/lib/extensions/discord-akairo/BushSlashMessage.ts
+++ b/src/lib/extensions/discord-akairo/BushSlashMessage.ts
@@ -4,6 +4,7 @@ import { BushGuild } from '../discord.js/BushGuild';
import { BushGuildMember } from '../discord.js/BushGuildMember';
import { BushUser } from '../discord.js/BushUser';
import { BushClient } from './BushClient';
+import { BushCommand } from './BushCommand';
import { BushCommandUtil } from './BushCommandUtil';
export class BushSlashMessage extends AkairoMessage {
@@ -12,11 +13,7 @@ export class BushSlashMessage extends AkairoMessage {
public declare guild: BushGuild;
public declare author: BushUser;
public declare member: BushGuildMember;
- public constructor(
- client: BushClient,
- interaction: CommandInteraction,
- { slash, replied }: { slash?: boolean; replied?: boolean }
- ) {
- super(client, interaction, { slash, replied });
+ public constructor(client: BushClient, interaction: CommandInteraction, command: BushCommand) {
+ super(client, interaction, command);
}
}
diff --git a/src/lib/extensions/discord.js/BushActivity.ts b/src/lib/extensions/discord.js/BushActivity.ts
index 4dc4e74..96c924d 100644
--- a/src/lib/extensions/discord.js/BushActivity.ts
+++ b/src/lib/extensions/discord.js/BushActivity.ts
@@ -1,10 +1,11 @@
import { Activity } from 'discord.js';
+import { RawActivityData } from 'discord.js/typings/rawDataTypes';
import { BushEmoji } from './BushEmoji';
import { BushPresence } from './BushPresence';
export class BushActivity extends Activity {
public declare emoji: BushEmoji | null;
- public constructor(presence: BushPresence, data?: unknown) {
+ public constructor(presence: BushPresence, data?: RawActivityData) {
super(presence, data);
}
}
diff --git a/src/lib/extensions/discord.js/BushApplicationCommand.ts b/src/lib/extensions/discord.js/BushApplicationCommand.ts
index 171e2ad..0d7c000 100644
--- a/src/lib/extensions/discord.js/BushApplicationCommand.ts
+++ b/src/lib/extensions/discord.js/BushApplicationCommand.ts
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/ban-types */
-/* eslint-disable @typescript-eslint/no-unused-vars */
import { ApplicationCommand, Snowflake } from 'discord.js';
+import { RawApplicationCommandData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
@@ -8,7 +8,7 @@ export class BushApplicationCommand<PermissionsFetchType = {}> extends Applicati
public declare readonly client: BushClient;
public declare guild: BushGuild | null;
- public constructor(client: BushClient, data: unknown, guild?: BushGuild, guildID?: Snowflake) {
+ public constructor(client: BushClient, data: RawApplicationCommandData, guild?: BushGuild, guildID?: Snowflake) {
super(client, data, guild, guildID);
}
}
diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts
index 0e071ff..8eec9a7 100644
--- a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts
+++ b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts
@@ -1,4 +1,6 @@
+import { APIApplicationCommand } from 'discord-api-types';
import { ApplicationCommandData, CachedManager, Collection, FetchApplicationCommandOptions, Snowflake } from 'discord.js';
+import { RawApplicationCommandData } from 'discord.js/typings/rawDataTypes';
import { BushApplicationCommandResolvable, BushClient } from '../discord-akairo/BushClient';
import { BushApplicationCommand } from './BushApplicationCommand';
import { BushApplicationCommandPermissionsManager } from './BushApplicationCommandPermissionsManager';
@@ -9,8 +11,7 @@ export class BushApplicationCommandManager<
PermissionsOptionsExtras = { guild: BushGuildResolvable },
PermissionsGuildType = null
> extends CachedManager<Snowflake, ApplicationCommandType, BushApplicationCommandResolvable> {
- public constructor(client: BushClient, iterable?: Iterable<unknown>);
- public declare readonly client: BushClient;
+ public constructor(client: BushClient, iterable?: Iterable<RawApplicationCommandData>);
public permissions: BushApplicationCommandPermissionsManager<
{ command?: BushApplicationCommandResolvable } & PermissionsOptionsExtras,
{ command: BushApplicationCommandResolvable } & PermissionsOptionsExtras,
@@ -39,5 +40,7 @@ export class BushApplicationCommandManager<
): Promise<Collection<Snowflake, ApplicationCommandType>>;
public set(commands: ApplicationCommandData[]): Promise<Collection<Snowflake, ApplicationCommandType>>;
public set(commands: ApplicationCommandData[], guildId: Snowflake): Promise<Collection<Snowflake, BushApplicationCommand>>;
- private static transformCommand(command: ApplicationCommandData): unknown;
+ private static transformCommand(
+ command: ApplicationCommandData
+ ): Omit<APIApplicationCommand, 'id' | 'application_id' | 'guild_id'>;
}
diff --git a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts
index 443fee2..ece4a60 100644
--- a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts
+++ b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts
@@ -1,3 +1,4 @@
+import { APIApplicationCommandPermission } from 'discord-api-types';
import {
ApplicationCommand,
ApplicationCommandManager,
@@ -9,6 +10,7 @@ import {
GuildApplicationCommandPermissionData,
Snowflake
} from 'discord.js';
+import { ApplicationCommandPermissionTypes } from 'discord.js/typings/enums';
import { BushClient, BushRoleResolvable, BushUserResolvable } from '../discord-akairo/BushClient';
export class BushApplicationCommandPermissionsManager<
@@ -19,11 +21,12 @@ export class BushApplicationCommandPermissionsManager<
CommandIdType
> extends BaseManager {
public constructor(manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand);
- public declare readonly client: BushClient;
+ private manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand;
+
+ public client: BushClient;
public commandId: CommandIdType;
public guild: GuildType;
public guildId: Snowflake | null;
- public manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand;
public add(
options: FetchSingleOptions & { permissions: ApplicationCommandPermissionData[] }
): Promise<ApplicationCommandPermissions[]>;
@@ -50,5 +53,9 @@ export class BushApplicationCommandPermissionsManager<
}
): Promise<Collection<Snowflake, ApplicationCommandPermissions[]>>;
private permissionsPath(guildId: Snowflake, commandId?: Snowflake): unknown;
- private static transformPermissions(permissions: ApplicationCommandPermissionData, received?: boolean): unknown;
+ private static transformPermissions(
+ permissions: ApplicationCommandPermissionData,
+ received: true
+ ): Omit<APIApplicationCommandPermission, 'type'> & { type: keyof ApplicationCommandPermissionTypes };
+ private static transformPermissions(permissions: ApplicationCommandPermissionData): APIApplicationCommandPermission;
}
diff --git a/src/lib/extensions/discord.js/BushBaseGuildEmojiManager.d.ts b/src/lib/extensions/discord.js/BushBaseGuildEmojiManager.d.ts
index 165ea6e..3e00d96 100644
--- a/src/lib/extensions/discord.js/BushBaseGuildEmojiManager.d.ts
+++ b/src/lib/extensions/discord.js/BushBaseGuildEmojiManager.d.ts
@@ -1,9 +1,10 @@
import { Snowflake } from 'discord-api-types';
import { CachedManager } from 'discord.js';
+import { RawGuildEmojiData } from 'discord.js/typings/rawDataTypes';
import { BushClient, BushEmojiIdentifierResolvable, BushEmojiResolvable } from '../discord-akairo/BushClient';
import { BushGuildEmoji } from './BushGuildEmoji';
export class BushBaseGuildEmojiManager extends CachedManager<Snowflake, BushGuildEmoji, BushEmojiResolvable> {
- public constructor(client: BushClient, iterable?: Iterable<unknown>);
+ public constructor(client: BushClient, iterable?: Iterable<RawGuildEmojiData>);
public resolveIdentifier(emoji: BushEmojiIdentifierResolvable): string | null;
}
diff --git a/src/lib/extensions/discord.js/BushBaseGuildTextChannel.ts b/src/lib/extensions/discord.js/BushBaseGuildTextChannel.ts
new file mode 100644
index 0000000..734642e
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushBaseGuildTextChannel.ts
@@ -0,0 +1,18 @@
+import { AllowedThreadTypeForTextChannel, BaseGuildTextChannel, Collection, Snowflake } from 'discord.js';
+import { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
+import { BushCategoryChannel, BushClient, BushGuildMember } from '../..';
+import { BushGuild } from './BushGuild';
+import { BushMessageManager } from './BushMessageManager';
+import { BushThreadManager } from './BushThreadManager';
+
+export class BushBaseGuildTextChannel extends BaseGuildTextChannel {
+ public constructor(guild: BushGuild, data?: RawGuildChannelData, client?: BushClient, immediatePatch?: boolean) {
+ super(guild, data, client, immediatePatch);
+ }
+ public declare messages: BushMessageManager;
+ public declare threads: BushThreadManager<AllowedThreadTypeForTextChannel>;
+ public declare readonly client: BushClient;
+ public declare guild: BushGuild;
+ public declare readonly members: Collection<Snowflake, BushGuildMember>;
+ public declare readonly parent: BushCategoryChannel | null;
+}
diff --git a/src/lib/extensions/discord.js/BushButtonInteraction.ts b/src/lib/extensions/discord.js/BushButtonInteraction.ts
index 846786c..413522f 100644
--- a/src/lib/extensions/discord.js/BushButtonInteraction.ts
+++ b/src/lib/extensions/discord.js/BushButtonInteraction.ts
@@ -1,19 +1,17 @@
import { APIInteractionGuildMember } from 'discord-api-types/v9';
-import { ButtonInteraction, PartialDMChannel } from 'discord.js';
-import { BushClient } from '../discord-akairo/BushClient';
-import { BushDMChannel } from './BushDMChannel';
+import { ButtonInteraction } from 'discord.js';
+import { RawMessageButtonInteractionData } from 'discord.js/typings/rawDataTypes';
+import { BushClient, BushTextBasedChannels } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushGuildMember } from './BushGuildMember';
-import { BushNewsChannel } from './BushNewsChannel';
-import { BushTextChannel } from './BushTextChannel';
import { BushUser } from './BushUser';
export class BushButtonInteraction extends ButtonInteraction {
- public declare readonly channel: BushTextChannel | BushDMChannel | BushNewsChannel | PartialDMChannel | null;
+ public declare readonly channel: BushTextBasedChannels | null;
public declare readonly guild: BushGuild | null;
public declare member: BushGuildMember | APIInteractionGuildMember | null;
public declare user: BushUser;
- public constructor(client: BushClient, data: unknown) {
+ public constructor(client: BushClient, data: RawMessageButtonInteractionData) {
super(client, data);
}
}
diff --git a/src/lib/extensions/discord.js/BushCategoryChannel.ts b/src/lib/extensions/discord.js/BushCategoryChannel.ts
index a66b2c6..f5d26f0 100644
--- a/src/lib/extensions/discord.js/BushCategoryChannel.ts
+++ b/src/lib/extensions/discord.js/BushCategoryChannel.ts
@@ -1,4 +1,5 @@
import { CategoryChannel, Collection, Snowflake } from 'discord.js';
+import { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushGuildChannel } from './BushGuildChannel';
@@ -10,7 +11,7 @@ export class BushCategoryChannel extends CategoryChannel {
public declare guild: BushGuild;
public declare readonly members: Collection<Snowflake, BushGuildMember>;
public declare readonly parent: CategoryChannel | null;
- public constructor(guild: BushGuild, data?: unknown) {
- super(guild, data);
+ public constructor(guild: BushGuild, data?: RawGuildChannelData, client?: BushClient, immediatePatch?: boolean) {
+ super(guild, data, client, immediatePatch);
}
}
diff --git a/src/lib/extensions/discord.js/BushChannel.d.ts b/src/lib/extensions/discord.js/BushChannel.d.ts
index 5aa3422..333ce06 100644
--- a/src/lib/extensions/discord.js/BushChannel.d.ts
+++ b/src/lib/extensions/discord.js/BushChannel.d.ts
@@ -1,11 +1,12 @@
import { Snowflake } from 'discord-api-types';
import { Channel, ChannelMention } from 'discord.js';
import { ChannelTypes } from 'discord.js/typings/enums';
+import { RawChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient, BushTextBasedChannels } from '../discord-akairo/BushClient';
import { BushThreadChannel } from './BushThreadChannel';
export class BushChannel extends Channel {
- public constructor(client: BushClient, data?: unknown, immediatePatch?: boolean);
+ public constructor(client: BushClient, data?: RawChannelData, immediatePatch?: boolean);
public readonly createdAt: Date;
public readonly createdTimestamp: number;
public deleted: boolean;
diff --git a/src/lib/extensions/discord.js/BushChannelManager.d.ts b/src/lib/extensions/discord.js/BushChannelManager.d.ts
index 1aa19c5..924f5b6 100644
--- a/src/lib/extensions/discord.js/BushChannelManager.d.ts
+++ b/src/lib/extensions/discord.js/BushChannelManager.d.ts
@@ -1,9 +1,10 @@
import { Snowflake } from 'discord-api-types';
import { CachedManager, Client, FetchChannelOptions } from 'discord.js';
+import { RawChannelData } from 'discord.js/typings/rawDataTypes';
import { BushChannelResolvable } from '../discord-akairo/BushClient';
import { BushChannel } from './BushChannel';
export class BushChannelManager extends CachedManager<Snowflake, BushChannel, BushChannelResolvable> {
- public constructor(client: Client, iterable: Iterable<unknown>);
+ public constructor(client: Client, iterable: Iterable<RawChannelData>);
public fetch(id: Snowflake, options?: FetchChannelOptions): Promise<BushChannel | null>;
}
diff --git a/src/lib/extensions/discord.js/BushClientUser.d.ts b/src/lib/extensions/discord.js/BushClientUser.d.ts
index 119f8ce..035c6d9 100644
--- a/src/lib/extensions/discord.js/BushClientUser.d.ts
+++ b/src/lib/extensions/discord.js/BushClientUser.d.ts
@@ -3,7 +3,7 @@ import {
Base64Resolvable,
BufferResolvable,
ClientUserEditData,
- Presence,
+ Presence as BushPresence,
PresenceData,
PresenceStatusData
} from 'discord.js';
@@ -13,11 +13,11 @@ export class BushClientUser extends BushUser {
public mfaEnabled: boolean;
public verified: boolean;
public edit(data: ClientUserEditData): Promise<this>;
- public setActivity(options?: ActivityOptions): Presence;
- public setActivity(name: string, options?: ActivityOptions): Presence;
- public setAFK(afk: boolean, shardId?: number | number[]): Presence;
+ public setActivity(options?: ActivityOptions): BushPresence;
+ public setActivity(name: string, options?: ActivityOptions): BushPresence;
+ public setAFK(afk: boolean, shardId?: number | number[]): BushPresence;
public setAvatar(avatar: BufferResolvable | Base64Resolvable): Promise<this>;
- public setPresence(data: PresenceData): Presence;
- public setStatus(status: PresenceStatusData, shardId?: number | number[]): Presence;
+ public setPresence(data: PresenceData): BushPresence;
+ public setStatus(status: PresenceStatusData, shardId?: number | number[]): BushPresence;
public setUsername(username: string): Promise<this>;
}
diff --git a/src/lib/extensions/discord.js/BushCommandInteraction.ts b/src/lib/extensions/discord.js/BushCommandInteraction.ts
index e4fdb53..9e30f79 100644
--- a/src/lib/extensions/discord.js/BushCommandInteraction.ts
+++ b/src/lib/extensions/discord.js/BushCommandInteraction.ts
@@ -1,15 +1,7 @@
import { APIInteractionGuildMember } from 'discord-api-types/v9';
-import {
- ApplicationCommand,
- CommandInteraction,
- DMChannel,
- Invite,
- NewsChannel,
- PartialDMChannel,
- Snowflake,
- TextChannel
-} from 'discord.js';
-import { BushClient } from '../discord-akairo/BushClient';
+import { ApplicationCommand, CommandInteraction, Invite, Snowflake } from 'discord.js';
+import { RawCommandInteractionData } from 'discord.js/typings/rawDataTypes';
+import { BushClient, BushTextBasedChannels } from '../discord-akairo/BushClient';
import { BushApplicationCommand } from './BushApplicationCommand';
import { BushGuild } from './BushGuild';
import { BushGuildChannel } from './BushGuildChannel';
@@ -28,9 +20,12 @@ export type BushGuildResolvable =
| Snowflake;
export class BushCommandInteraction extends CommandInteraction {
+ public constructor(client: BushClient, data: RawCommandInteractionData) {
+ super(client, data);
+ }
public declare readonly client: BushClient;
public declare readonly command: BushApplicationCommand | ApplicationCommand<{ guild: BushGuildResolvable }> | null;
- public declare readonly channel: TextChannel | DMChannel | NewsChannel | PartialDMChannel | null;
+ public declare readonly channel: BushTextBasedChannels | null;
public declare readonly guild: BushGuild | null;
public declare member: BushGuildMember | APIInteractionGuildMember | null;
public declare user: BushUser;
diff --git a/src/lib/extensions/discord.js/BushDMChannel.ts b/src/lib/extensions/discord.js/BushDMChannel.ts
index 9bf814b..4b44f83 100644
--- a/src/lib/extensions/discord.js/BushDMChannel.ts
+++ b/src/lib/extensions/discord.js/BushDMChannel.ts
@@ -1,4 +1,5 @@
import { DMChannel } from 'discord.js';
+import { RawDMChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushMessageManager } from './BushMessageManager';
import { BushUser } from './BushUser';
@@ -8,7 +9,7 @@ export class BushDMChannel extends DMChannel {
public declare messages: BushMessageManager;
public declare recipient: BushUser;
- public constructor(client: BushClient, data?: unknown) {
+ public constructor(client: BushClient, data?: RawDMChannelData) {
super(client, data);
}
}
diff --git a/src/lib/extensions/discord.js/BushEmoji.ts b/src/lib/extensions/discord.js/BushEmoji.ts
index ba48166..db1cc11 100644
--- a/src/lib/extensions/discord.js/BushEmoji.ts
+++ b/src/lib/extensions/discord.js/BushEmoji.ts
@@ -1,9 +1,10 @@
import { Emoji } from 'discord.js';
+import { RawEmojiData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
export class BushEmoji extends Emoji {
public declare readonly client: BushClient;
- public constructor(client: BushClient, emoji: unknown) {
+ public constructor(client: BushClient, emoji: RawEmojiData) {
super(client, emoji);
}
}
diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts
index 9468941..dafa1a4 100644
--- a/src/lib/extensions/discord.js/BushGuild.ts
+++ b/src/lib/extensions/discord.js/BushGuild.ts
@@ -1,4 +1,5 @@
import { Guild } from 'discord.js';
+import { RawGuildData } from 'discord.js/typings/rawDataTypes';
import { Guild as GuildDB, GuildModel } from '../../models/Guild';
import { ModLogType } from '../../models/ModLog';
import { BushClient, BushUserResolvable } from '../discord-akairo/BushClient';
@@ -10,7 +11,7 @@ export class BushGuild extends Guild {
public declare readonly client: BushClient;
public declare readonly me: BushGuildMember | null;
public declare members: BushGuildMemberManager;
- public constructor(client: BushClient, data: unknown) {
+ public constructor(client: BushClient, data: RawGuildData) {
super(client, data);
}
diff --git a/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts b/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts
index c0400ce..38afa94 100644
--- a/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts
+++ b/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts
@@ -1,12 +1,13 @@
/* eslint-disable @typescript-eslint/ban-types */
import { ApplicationCommandData, BaseFetchOptions, Collection, Snowflake } from 'discord.js';
+import { RawApplicationCommandData } from 'discord.js/typings/rawDataTypes';
import { BushApplicationCommandResolvable, BushClient } from '../discord-akairo/BushClient';
import { BushApplicationCommand } from './BushApplicationCommand';
import { BushApplicationCommandManager } from './BushApplicationCommandManager';
import { BushGuild } from './BushGuild';
export class BushGuildApplicationCommandManager extends BushApplicationCommandManager<BushApplicationCommand, {}, BushGuild> {
- public constructor(guild: BushGuild, iterable?: Iterable<unknown>);
+ public constructor(guild: BushGuild, iterable?: Iterable<RawApplicationCommandData>);
public declare readonly client: BushClient;
public guild: BushGuild;
public create(command: ApplicationCommandData): Promise<BushApplicationCommand>;
diff --git a/src/lib/extensions/discord.js/BushGuildChannel.ts b/src/lib/extensions/discord.js/BushGuildChannel.ts
index 7eada41..7daa80d 100644
--- a/src/lib/extensions/discord.js/BushGuildChannel.ts
+++ b/src/lib/extensions/discord.js/BushGuildChannel.ts
@@ -1,11 +1,12 @@
import { GuildChannel } from 'discord.js';
+import { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
export class BushGuildChannel extends GuildChannel {
public declare readonly client: BushClient;
public declare guild: BushGuild;
- public constructor(guild: BushGuild, data?: unknown) {
- super(guild, data);
+ public constructor(guild: BushGuild, data?: RawGuildChannelData, client?: BushClient, immediatePatch?: boolean) {
+ super(guild, data, client, immediatePatch);
}
}
diff --git a/src/lib/extensions/discord.js/BushGuildEmoji.ts b/src/lib/extensions/discord.js/BushGuildEmoji.ts
index c03c1b5..0ac5ebd 100644
--- a/src/lib/extensions/discord.js/BushGuildEmoji.ts
+++ b/src/lib/extensions/discord.js/BushGuildEmoji.ts
@@ -1,4 +1,5 @@
import { GuildEmoji } from 'discord.js';
+import { RawGuildEmojiData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushGuildEmojiRoleManager } from './BushGuildEmojiRoleManager';
@@ -9,7 +10,7 @@ export class BushGuildEmoji extends GuildEmoji {
public declare guild: BushGuild;
public declare author: BushUser | null;
public declare readonly roles: BushGuildEmojiRoleManager;
- public constructor(client: BushClient, data: unknown, guild: BushGuild) {
+ public constructor(client: BushClient, data: RawGuildEmojiData, guild: BushGuild) {
super(client, data, guild);
}
}
diff --git a/src/lib/extensions/discord.js/BushGuildManager.d.ts b/src/lib/extensions/discord.js/BushGuildManager.d.ts
index 5bfe706..4ec9276 100644
--- a/src/lib/extensions/discord.js/BushGuildManager.d.ts
+++ b/src/lib/extensions/discord.js/BushGuildManager.d.ts
@@ -1,20 +1,13 @@
import { Snowflake } from 'discord-api-types';
-import {
- CachedManager,
- Collection,
- FetchGuildOptions,
- FetchGuildsOptions,
- Guild,
- GuildCreateOptions,
- OAuth2Guild
-} from 'discord.js';
+import { CachedManager, Collection, FetchGuildOptions, FetchGuildsOptions, GuildCreateOptions, OAuth2Guild } from 'discord.js';
+import { RawGuildData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuildResolvable } from './BushCommandInteraction';
import { BushGuild } from './BushGuild';
export class BushGuildManager extends CachedManager<Snowflake, BushGuild, BushGuildResolvable> {
- public constructor(client: BushClient, iterable?: Iterable<unknown>);
- public create(name: string, options?: GuildCreateOptions): Promise<Guild>;
+ public constructor(client: BushClient, iterable?: Iterable<RawGuildData>);
+ public create(name: string, options?: GuildCreateOptions): Promise<BushGuild>;
public fetch(options: Snowflake | FetchGuildOptions): Promise<BushGuild>;
public fetch(options?: FetchGuildsOptions): Promise<Collection<Snowflake, OAuth2Guild>>;
}
diff --git a/src/lib/extensions/discord.js/BushGuildMember.ts b/src/lib/extensions/discord.js/BushGuildMember.ts
index ec0e323..1606ad6 100644
--- a/src/lib/extensions/discord.js/BushGuildMember.ts
+++ b/src/lib/extensions/discord.js/BushGuildMember.ts
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { GuildMember, Role } from 'discord.js';
+import { RawGuildMemberData } from 'discord.js/typings/rawDataTypes';
import { ModLogType } from '../../models/ModLog';
import { BushClient, BushUserResolvable } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
@@ -75,7 +76,7 @@ export class BushGuildMember extends GuildMember {
public declare readonly client: BushClient;
public declare guild: BushGuild;
public declare user: BushUser;
- public constructor(client: BushClient, data: unknown, guild: BushGuild) {
+ public constructor(client: BushClient, data: RawGuildMemberData, guild: BushGuild) {
super(client, data, guild);
}
diff --git a/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts b/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts
index 7bdad83..b3f2b1b 100644
--- a/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts
+++ b/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts
@@ -6,35 +6,35 @@ import {
Collection,
FetchMemberOptions,
FetchMembersOptions,
- GuildMember,
GuildMemberEditData,
GuildPruneMembersOptions,
GuildSearchMembersOptions,
- Snowflake,
- User
+ Snowflake
} from 'discord.js';
+import { RawGuildMemberData } from 'discord.js/typings/rawDataTypes';
import { BushClient, BushGuildMemberResolvable, BushUserResolvable } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushGuildMember } from './BushGuildMember';
+import { BushUser } from './BushUser';
export class BushGuildMemberManager extends CachedManager<Snowflake, BushGuildMember, BushGuildMemberResolvable> {
- public constructor(guild: BushGuild, iterable?: Iterable<unknown>);
+ public constructor(guild: BushGuild, iterable?: Iterable<RawGuildMemberData>);
public declare readonly client: BushClient;
public guild: BushGuild;
public add(
user: BushUserResolvable,
options: AddGuildMemberOptions & { fetchWhenExisting: false }
- ): Promise<GuildMember | null>;
- public add(user: BushUserResolvable, options: AddGuildMemberOptions): Promise<GuildMember>;
- public ban(user: BushUserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>;
+ ): Promise<BushGuildMember | null>;
+ public add(user: BushUserResolvable, options: AddGuildMemberOptions): Promise<BushGuildMember>;
+ public ban(user: BushUserResolvable, options?: BanOptions): Promise<BushGuildMember | BushUser | Snowflake>;
public edit(user: BushUserResolvable, data: GuildMemberEditData, reason?: string): Promise<void>;
public fetch(
options: BushUserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: BushUserResolvable })
- ): Promise<GuildMember>;
- public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
- public kick(user: BushUserResolvable, reason?: string): Promise<BushGuildMember | User | Snowflake>;
+ ): Promise<BushGuildMember>;
+ public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, BushGuildMember>>;
+ public kick(user: BushUserResolvable, reason?: string): Promise<BushGuildMember | BushUser | Snowflake>;
public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>;
public prune(options?: GuildPruneMembersOptions): Promise<number>;
- public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
- public unban(user: BushUserResolvable, reason?: string): Promise<User>;
+ public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, BushGuildMember>>;
+ public unban(user: BushUserResolvable, reason?: string): Promise<BushUser>;
}
diff --git a/src/lib/extensions/discord.js/BushMessage.ts b/src/lib/extensions/discord.js/BushMessage.ts
index 5638801..921d03e 100644
--- a/src/lib/extensions/discord.js/BushMessage.ts
+++ b/src/lib/extensions/discord.js/BushMessage.ts
@@ -1,29 +1,23 @@
/* eslint-disable @typescript-eslint/no-empty-interface */
import { Message, Partialize } from 'discord.js';
-import { BushClient } from '../discord-akairo/BushClient';
-import { BushDMChannel } from './BushDMChannel';
+import { RawMessageData } from 'discord.js/typings/rawDataTypes';
+import { BushClient, BushTextBasedChannels } from '../discord-akairo/BushClient';
+import { BushCommandUtil } from '../discord-akairo/BushCommandUtil';
import { BushGuild } from './BushGuild';
import { BushGuildMember } from './BushGuildMember';
-import { BushNewsChannel } from './BushNewsChannel';
-import { BushTextChannel } from './BushTextChannel';
-import { BushThreadChannel } from './BushThreadChannel';
import { BushUser } from './BushUser';
export interface BushPartialMessage
extends Partialize<BushMessage, 'type' | 'system' | 'pinned' | 'tts', 'content' | 'cleanContent' | 'author'> {}
export class BushMessage extends Message {
public declare readonly client: BushClient;
- // public util: BushCommandUtil;
+ public override util: BushCommandUtil;
public declare readonly guild: BushGuild | null;
public declare readonly member: BushGuildMember | null;
public declare author: BushUser;
- public declare channel: BushTextChannel | BushDMChannel | BushNewsChannel | BushThreadChannel;
- public constructor(
- client: BushClient,
- data: unknown,
- channel: BushTextChannel | BushDMChannel | BushNewsChannel | BushThreadChannel
- ) {
- super(client, data, channel);
+ public declare readonly channel: BushTextBasedChannels;
+ public constructor(client: BushClient, data: RawMessageData) {
+ super(client, data);
// this.util = new BushCommandUtil(client.commandHandler, this);
}
public override fetch(force?: boolean): Promise<BushMessage> {
diff --git a/src/lib/extensions/discord.js/BushMessageManager.d.ts b/src/lib/extensions/discord.js/BushMessageManager.d.ts
index bf795ad..8495130 100644
--- a/src/lib/extensions/discord.js/BushMessageManager.d.ts
+++ b/src/lib/extensions/discord.js/BushMessageManager.d.ts
@@ -1,4 +1,3 @@
-/* eslint-disable @typescript-eslint/no-explicit-any */
import {
BaseFetchOptions,
CachedManager,
@@ -7,23 +6,20 @@ import {
EmojiIdentifierResolvable,
MessageEditOptions,
MessagePayload,
- Snowflake,
- TextBasedChannelFields
+ MessageResolvable,
+ Snowflake
} from 'discord.js';
-import { BushClient, BushMessageResolvable } from '../discord-akairo/BushClient';
-import { BushDMChannel } from './BushDMChannel';
+import { RawMessageData } from 'discord.js/typings/rawDataTypes';
+import { BushMessageResolvable, BushTextBasedChannels } from '../..';
import { BushMessage } from './BushMessage';
-import { BushTextChannel } from './BushTextChannel';
-import { BushThreadChannel } from './BushThreadChannel';
export class BushMessageManager extends CachedManager<Snowflake, BushMessage, BushMessageResolvable> {
- public constructor(channel: BushTextChannel | BushDMChannel | BushThreadChannel, iterable?: Iterable<unknown>);
- public declare readonly client: BushClient;
- public channel: TextBasedChannelFields;
+ public constructor(channel: BushTextBasedChannels, iterable?: Iterable<RawMessageData>);
+ public channel: BushTextBasedChannels;
public cache: Collection<Snowflake, BushMessage>;
public crosspost(message: BushMessageResolvable): Promise<BushMessage>;
public delete(message: BushMessageResolvable): Promise<void>;
- public edit(message: BushMessageResolvable, options: MessagePayload | MessageEditOptions): Promise<BushMessage>;
+ public edit(message: MessageResolvable, options: MessagePayload | MessageEditOptions): Promise<BushMessage>;
public fetch(message: Snowflake, options?: BaseFetchOptions): Promise<BushMessage>;
public fetch(options?: ChannelLogsQueryOptions, cacheOptions?: BaseFetchOptions): Promise<Collection<Snowflake, BushMessage>>;
public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, BushMessage>>;
diff --git a/src/lib/extensions/discord.js/BushMessageReaction.ts b/src/lib/extensions/discord.js/BushMessageReaction.ts
index c57aafa..b0bc5d7 100644
--- a/src/lib/extensions/discord.js/BushMessageReaction.ts
+++ b/src/lib/extensions/discord.js/BushMessageReaction.ts
@@ -1,4 +1,5 @@
import { MessageReaction } from 'discord.js';
+import { RawMessageReactionData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuildEmoji } from './BushGuildEmoji';
import { BushMessage } from './BushMessage';
@@ -8,7 +9,7 @@ export class BushMessageReaction extends MessageReaction {
public declare readonly client: BushClient;
public declare readonly emoji: BushGuildEmoji | BushReactionEmoji;
- public constructor(client: BushClient, data: unknown, message: BushMessage) {
+ public constructor(client: BushClient, data: RawMessageReactionData, message: BushMessage) {
super(client, data, message);
}
}
diff --git a/src/lib/extensions/discord.js/BushNewsChannel.ts b/src/lib/extensions/discord.js/BushNewsChannel.ts
index 9682632..f44ff4a 100644
--- a/src/lib/extensions/discord.js/BushNewsChannel.ts
+++ b/src/lib/extensions/discord.js/BushNewsChannel.ts
@@ -1,6 +1,7 @@
-import { AllowedThreadTypeForNewsChannel, NewsChannel } from 'discord.js';
+import { AllowedThreadTypeForTextChannel, Collection, NewsChannel, Snowflake } from 'discord.js';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
+import { BushGuildMember } from './BushGuildMember';
import { BushMessageManager } from './BushMessageManager';
import { BushThreadManager } from './BushThreadManager';
@@ -8,9 +9,6 @@ export class BushNewsChannel extends NewsChannel {
public declare readonly client: BushClient;
public declare guild: BushGuild;
public declare messages: BushMessageManager;
- public declare threads: BushThreadManager<AllowedThreadTypeForNewsChannel>;
- // eslint-disable-next-line @typescript-eslint/ban-types
- public constructor(guild: BushGuild, data?: object) {
- super(guild, data);
- }
+ public declare members: Collection<Snowflake, BushGuildMember>;
+ public declare threads: BushThreadManager<AllowedThreadTypeForTextChannel>;
}
diff --git a/src/lib/extensions/discord.js/BushPresence.ts b/src/lib/extensions/discord.js/BushPresence.ts
index 13c7567..ff1937c 100644
--- a/src/lib/extensions/discord.js/BushPresence.ts
+++ b/src/lib/extensions/discord.js/BushPresence.ts
@@ -1,4 +1,5 @@
import { Presence } from 'discord.js';
+import { RawPresenceData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushGuildMember } from './BushGuildMember';
@@ -9,7 +10,7 @@ export class BushPresence extends Presence {
public declare readonly member: BushGuildMember | null;
public declare readonly user: BushUser | null;
- public constructor(client: BushClient, data?: unknown) {
+ public constructor(client: BushClient, data?: RawPresenceData) {
super(client, data);
}
}
diff --git a/src/lib/extensions/discord.js/BushReactionEmoji.ts b/src/lib/extensions/discord.js/BushReactionEmoji.ts
index a25c1b8..3aee2fb 100644
--- a/src/lib/extensions/discord.js/BushReactionEmoji.ts
+++ b/src/lib/extensions/discord.js/BushReactionEmoji.ts
@@ -1,11 +1,12 @@
import { ReactionEmoji } from 'discord.js';
+import { RawReactionEmojiData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushMessageReaction } from './BushMessageReaction';
export class BushReactionEmoji extends ReactionEmoji {
public declare readonly client: BushClient;
public declare reaction: BushMessageReaction;
- public constructor(reaction: BushMessageReaction, emoji: unknown) {
+ public constructor(reaction: BushMessageReaction, emoji: RawReactionEmojiData) {
super(reaction, emoji);
}
}
diff --git a/src/lib/extensions/discord.js/BushRole.ts b/src/lib/extensions/discord.js/BushRole.ts
index 57533c9..084b019 100644
--- a/src/lib/extensions/discord.js/BushRole.ts
+++ b/src/lib/extensions/discord.js/BushRole.ts
@@ -1,4 +1,5 @@
import { Collection, Role, Snowflake } from 'discord.js';
+import { RawRoleData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushGuildMember } from './BushGuildMember';
@@ -7,7 +8,7 @@ export class BushRole extends Role {
public declare readonly client: BushClient;
public declare guild: BushGuild;
public declare readonly members: Collection<Snowflake, BushGuildMember>;
- public constructor(client: BushClient, data: unknown, guild: BushGuild) {
+ public constructor(client: BushClient, data: RawRoleData, guild: BushGuild) {
super(client, data, guild);
}
}
diff --git a/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts b/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts
index 18db8ef..a16d8c2 100644
--- a/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts
+++ b/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts
@@ -1,19 +1,17 @@
import { APIInteractionGuildMember } from 'discord-api-types/v9';
-import { PartialDMChannel, SelectMenuInteraction } from 'discord.js';
-import { BushClient } from '../discord-akairo/BushClient';
-import { BushDMChannel } from './BushDMChannel';
+import { SelectMenuInteraction } from 'discord.js';
+import { RawMessageSelectMenuInteractionData } from 'discord.js/typings/rawDataTypes';
+import { BushClient, BushTextBasedChannels } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushGuildMember } from './BushGuildMember';
-import { BushNewsChannel } from './BushNewsChannel';
-import { BushTextChannel } from './BushTextChannel';
import { BushUser } from './BushUser';
export class BushSelectMenuInteraction extends SelectMenuInteraction {
- public declare readonly channel: BushTextChannel | BushDMChannel | BushNewsChannel | PartialDMChannel | null;
+ public declare readonly channel: BushTextBasedChannels | null;
public declare readonly guild: BushGuild | null;
public declare member: BushGuildMember | APIInteractionGuildMember | null;
public declare user: BushUser;
- public constructor(client: BushClient, data: unknown) {
+ public constructor(client: BushClient, data: RawMessageSelectMenuInteractionData) {
super(client, data);
}
}
diff --git a/src/lib/extensions/discord.js/BushStageChannel.ts b/src/lib/extensions/discord.js/BushStageChannel.ts
index 5bd3f45..4df64e8 100644
--- a/src/lib/extensions/discord.js/BushStageChannel.ts
+++ b/src/lib/extensions/discord.js/BushStageChannel.ts
@@ -1,4 +1,5 @@
import { Collection, Snowflake, StageChannel } from 'discord.js';
+import { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushCategoryChannel } from './BushCategoryChannel';
import { BushGuild } from './BushGuild';
@@ -11,7 +12,7 @@ export class BushStageChannel extends StageChannel {
public declare readonly members: Collection<Snowflake, BushGuildMember>;
public declare guild: BushGuild;
public declare readonly parent: BushCategoryChannel | null;
- public constructor(guild: BushGuild, data?: unknown) {
+ public constructor(guild: BushGuild, data?: RawGuildChannelData) {
super(guild, data);
}
}
diff --git a/src/lib/extensions/discord.js/BushStageInstance.ts b/src/lib/extensions/discord.js/BushStageInstance.ts
index f162d33..ab09863 100644
--- a/src/lib/extensions/discord.js/BushStageInstance.ts
+++ b/src/lib/extensions/discord.js/BushStageInstance.ts
@@ -1,4 +1,5 @@
import { StageInstance } from 'discord.js';
+import { RawStageInstanceData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushStageChannel } from './BushStageChannel';
@@ -7,7 +8,7 @@ export class BushStageInstance extends StageInstance {
public declare readonly client: BushClient;
public declare readonly channel: BushStageChannel | null;
public declare readonly guild: BushGuild | null;
- public constructor(client: BushClient, data: unknown, channel: BushStageChannel) {
+ public constructor(client: BushClient, data: RawStageInstanceData, channel: BushStageChannel) {
super(client, data, channel);
}
}
diff --git a/src/lib/extensions/discord.js/BushStoreChannel.ts b/src/lib/extensions/discord.js/BushStoreChannel.ts
index 8ce22c0..20bfeab 100644
--- a/src/lib/extensions/discord.js/BushStoreChannel.ts
+++ b/src/lib/extensions/discord.js/BushStoreChannel.ts
@@ -1,4 +1,5 @@
import { Collection, Snowflake, StoreChannel } from 'discord.js';
+import { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushCategoryChannel } from './BushCategoryChannel';
import { BushGuild } from './BushGuild';
@@ -10,7 +11,7 @@ export class BushStoreChannel extends StoreChannel {
public declare readonly members: Collection<Snowflake, BushGuildMember>;
public declare readonly parent: BushCategoryChannel | null;
- public constructor(guild: BushGuild, data?: unknown) {
- super(guild, data);
+ public constructor(guild: BushGuild, data?: RawGuildChannelData, client?: BushClient) {
+ super(guild, data, client);
}
}
diff --git a/src/lib/extensions/discord.js/BushTextChannel.ts b/src/lib/extensions/discord.js/BushTextChannel.ts
index 26e3858..db3ad8f 100644
--- a/src/lib/extensions/discord.js/BushTextChannel.ts
+++ b/src/lib/extensions/discord.js/BushTextChannel.ts
@@ -1,4 +1,5 @@
import { TextChannel } from 'discord.js';
+import { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushMessageManager } from './BushMessageManager';
@@ -7,7 +8,7 @@ export class BushTextChannel extends TextChannel {
public declare readonly client: BushClient;
public declare guild: BushGuild;
public declare messages: BushMessageManager;
- public constructor(guild: BushGuild, data?: unknown) {
+ public constructor(guild: BushGuild, data?: RawGuildChannelData) {
super(guild, data);
}
}
diff --git a/src/lib/extensions/discord.js/BushThreadChannel.ts b/src/lib/extensions/discord.js/BushThreadChannel.ts
index 455939d..b78aff7 100644
--- a/src/lib/extensions/discord.js/BushThreadChannel.ts
+++ b/src/lib/extensions/discord.js/BushThreadChannel.ts
@@ -1,6 +1,5 @@
-/* eslint-disable @typescript-eslint/ban-types */
-
import { Collection, Snowflake, ThreadChannel } from 'discord.js';
+import { RawThreadChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushGuildMember } from './BushGuildMember';
@@ -13,12 +12,10 @@ export class BushThreadChannel extends ThreadChannel {
public declare guild: BushGuild;
public declare messages: BushMessageManager;
public declare members: BushThreadMemberManager;
-
public declare readonly client: BushClient;
public declare readonly guildMembers: Collection<Snowflake, BushGuildMember>;
-
public declare readonly parent: BushTextChannel | BushNewsChannel | null;
- public constructor(guild: BushGuild, data?: object) {
- super(guild, data);
+ public constructor(guild: BushGuild, data?: RawThreadChannelData, client?: BushClient, fromInteraction?: boolean) {
+ super(guild, data, client, fromInteraction);
}
}
diff --git a/src/lib/extensions/discord.js/BushThreadManager.d.ts b/src/lib/extensions/discord.js/BushThreadManager.d.ts
index 6b8250b..027d532 100644
--- a/src/lib/extensions/discord.js/BushThreadManager.d.ts
+++ b/src/lib/extensions/discord.js/BushThreadManager.d.ts
@@ -1,4 +1,3 @@
-/* eslint-disable @typescript-eslint/no-explicit-any */
import {
BaseFetchOptions,
CachedManager,
@@ -8,13 +7,14 @@ import {
ThreadChannelResolvable,
ThreadCreateOptions
} from 'discord.js';
+import { RawThreadChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient, BushFetchedThreads, BushThreadChannelResolvable } from '../discord-akairo/BushClient';
import { BushNewsChannel } from './BushNewsChannel';
import { BushTextChannel } from './BushTextChannel';
import { BushThreadChannel } from './BushThreadChannel';
export class BushThreadManager<AllowedThreadType> extends CachedManager<Snowflake, BushThreadChannel, ThreadChannelResolvable> {
- public constructor(channel: BushTextChannel | BushNewsChannel, iterable?: Iterable<unknown>);
+ public constructor(channel: BushTextChannel | BushNewsChannel, iterable?: Iterable<RawThreadChannelData>);
public declare readonly client: BushClient;
public channel: BushTextChannel | BushNewsChannel;
public create(options: ThreadCreateOptions<AllowedThreadType>): Promise<BushThreadChannel>;
diff --git a/src/lib/extensions/discord.js/BushThreadMember.ts b/src/lib/extensions/discord.js/BushThreadMember.ts
index 4ef51ae..77f2b20 100644
--- a/src/lib/extensions/discord.js/BushThreadMember.ts
+++ b/src/lib/extensions/discord.js/BushThreadMember.ts
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/ban-types */
import { ThreadMember } from 'discord.js';
+import { RawThreadMemberData } from 'discord.js/typings/rawDataTypes';
import { BushGuildMember } from './BushGuildMember';
import { BushThreadChannel } from './BushThreadChannel';
import { BushUser } from './BushUser';
@@ -8,7 +9,7 @@ export class BushThreadMember extends ThreadMember {
public declare readonly guildMember: BushGuildMember | null;
public declare readonly user: BushUser | null;
public declare thread: BushThreadChannel;
- public constructor(thread: BushThreadChannel, data?: object) {
+ public constructor(thread: BushThreadChannel, data?: RawThreadMemberData) {
super(thread, data);
}
}
diff --git a/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts b/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts
index ba9b90b..cbc28de 100644
--- a/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts
+++ b/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts
@@ -1,12 +1,11 @@
-/* eslint-disable @typescript-eslint/no-explicit-any */
-/* eslint-disable @typescript-eslint/no-empty-interface */
import { CachedManager, Collection, Snowflake, ThreadChannel, ThreadMember, UserResolvable } from 'discord.js';
+import { RawThreadMemberData } from 'discord.js/typings/rawDataTypes';
import { BushClient, BushThreadMemberResolvable } from '../discord-akairo/BushClient';
import { BushThreadChannel } from './BushThreadChannel';
import { BushThreadMember } from './BushThreadMember';
export class BushThreadMemberManager extends CachedManager<Snowflake, BushThreadMember, BushThreadMemberResolvable> {
- public constructor(thread: BushThreadChannel, iterable?: Iterable<unknown>);
+ public constructor(thread: BushThreadChannel, iterable?: Iterable<RawThreadMemberData>);
public declare readonly client: BushClient;
public thread: ThreadChannel;
public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>;
diff --git a/src/lib/extensions/discord.js/BushUser.ts b/src/lib/extensions/discord.js/BushUser.ts
index 54a67b5..9a183e1 100644
--- a/src/lib/extensions/discord.js/BushUser.ts
+++ b/src/lib/extensions/discord.js/BushUser.ts
@@ -1,11 +1,12 @@
import { User } from 'discord.js';
+import { RawUserData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushDMChannel } from './BushDMChannel';
export class BushUser extends User {
public declare readonly client: BushClient;
public declare readonly dmChannel: BushDMChannel | null;
- public constructor(client: BushClient, data: unknown) {
+ public constructor(client: BushClient, data: RawUserData) {
super(client, data);
}
diff --git a/src/lib/extensions/discord.js/BushUserManager.d.ts b/src/lib/extensions/discord.js/BushUserManager.d.ts
index 176b449..49fc680 100644
--- a/src/lib/extensions/discord.js/BushUserManager.d.ts
+++ b/src/lib/extensions/discord.js/BushUserManager.d.ts
@@ -1,9 +1,10 @@
import { Snowflake } from 'discord-api-types';
import { BaseFetchOptions, CachedManager } from 'discord.js';
+import { RawUserData } from 'discord.js/typings/rawDataTypes';
import { BushClient, BushUserResolvable } from '../discord-akairo/BushClient';
import { BushUser } from './BushUser';
export class BushUserManager extends CachedManager<Snowflake, BushUser, BushUserResolvable> {
- public constructor(client: BushClient, iterable?: Iterable<unknown>);
+ public constructor(client: BushClient, iterable?: Iterable<RawUserData>);
public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<BushUser>;
}
diff --git a/src/lib/extensions/discord.js/BushVoiceChannel.ts b/src/lib/extensions/discord.js/BushVoiceChannel.ts
index 82a68b1..ab0da15 100644
--- a/src/lib/extensions/discord.js/BushVoiceChannel.ts
+++ b/src/lib/extensions/discord.js/BushVoiceChannel.ts
@@ -1,4 +1,5 @@
import { Collection, Snowflake, VoiceChannel } from 'discord.js';
+import { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushGuildMember } from './BushGuildMember';
@@ -6,7 +7,7 @@ import { BushGuildMember } from './BushGuildMember';
export class BushVoiceChannel extends VoiceChannel {
public declare readonly client: BushClient;
public declare readonly members: Collection<Snowflake, BushGuildMember>;
- public constructor(guild: BushGuild, data?: unknown) {
+ public constructor(guild: BushGuild, data?: RawGuildChannelData) {
super(guild, data);
}
}
diff --git a/src/lib/extensions/discord.js/BushVoiceState.ts b/src/lib/extensions/discord.js/BushVoiceState.ts
index 416b0d8..d9570ad 100644
--- a/src/lib/extensions/discord.js/BushVoiceState.ts
+++ b/src/lib/extensions/discord.js/BushVoiceState.ts
@@ -1,4 +1,5 @@
import { VoiceState } from 'discord.js';
+import { RawVoiceStateData } from 'discord.js/typings/rawDataTypes';
import { BushGuild } from './BushGuild';
import { BushGuildMember } from './BushGuildMember';
import { BushStageChannel } from './BushStageChannel';
@@ -8,7 +9,7 @@ export class BushVoiceState extends VoiceState {
public declare readonly channel: BushVoiceChannel | BushStageChannel | null;
public declare guild: BushGuild;
public declare readonly member: BushGuildMember | null;
- public constructor(guild: BushGuild, data: unknown) {
+ public constructor(guild: BushGuild, data: RawVoiceStateData) {
super(guild, data);
}
}