aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/extensions')
-rw-r--r--src/lib/extensions/BushMessage.ts21
-rw-r--r--src/lib/extensions/discord-akairo/BushArgumentOptions.ts (renamed from src/lib/extensions/BushArgumentOptions.ts)0
-rw-r--r--src/lib/extensions/discord-akairo/BushArgumentTypeCaster.ts (renamed from src/lib/extensions/BushArgumentTypeCaster.ts)2
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts (renamed from src/lib/extensions/BushClient.ts)26
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts (renamed from src/lib/extensions/BushClientUtil.ts)8
-rw-r--r--src/lib/extensions/discord-akairo/BushCommand.ts (renamed from src/lib/extensions/BushCommand.ts)2
-rw-r--r--src/lib/extensions/discord-akairo/BushCommandHandler.ts (renamed from src/lib/extensions/BushCommandHandler.ts)5
-rw-r--r--src/lib/extensions/discord-akairo/BushCommandUtil.ts (renamed from src/lib/extensions/BushCommandUtil.ts)0
-rw-r--r--src/lib/extensions/discord-akairo/BushInhibitor.ts (renamed from src/lib/extensions/BushInhibitor.ts)2
-rw-r--r--src/lib/extensions/discord-akairo/BushInhinitorHandler.ts (renamed from src/lib/extensions/BushInhinitorHandler.ts)0
-rw-r--r--src/lib/extensions/discord-akairo/BushListener.ts (renamed from src/lib/extensions/BushListener.ts)0
-rw-r--r--src/lib/extensions/discord-akairo/BushListenerHandler.ts (renamed from src/lib/extensions/BushListenerHandler.ts)0
-rw-r--r--src/lib/extensions/discord-akairo/BushSlashMessage.ts (renamed from src/lib/extensions/BushSlashMessage.ts)4
-rw-r--r--src/lib/extensions/discord-akairo/BushTask.ts (renamed from src/lib/extensions/BushTask.ts)0
-rw-r--r--src/lib/extensions/discord-akairo/BushTaskHandler.ts (renamed from src/lib/extensions/BushTaskHandler.ts)0
-rw-r--r--src/lib/extensions/discord.js/BushCategoryChannel.ts16
-rw-r--r--src/lib/extensions/discord.js/BushDMChannel.ts14
-rw-r--r--src/lib/extensions/discord.js/BushGuild.ts (renamed from src/lib/extensions/BushGuild.ts)10
-rw-r--r--src/lib/extensions/discord.js/BushGuildChannel.ts11
-rw-r--r--src/lib/extensions/discord.js/BushGuildEmoji.ts15
-rw-r--r--src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts13
-rw-r--r--src/lib/extensions/discord.js/BushGuildMember.ts (renamed from src/lib/extensions/BushGuildMember.ts)8
-rw-r--r--src/lib/extensions/discord.js/BushMessage.ts26
-rw-r--r--src/lib/extensions/discord.js/BushMessageManager.ts14
-rw-r--r--src/lib/extensions/discord.js/BushNewsChannel.ts16
-rw-r--r--src/lib/extensions/discord.js/BushRole.ts13
-rw-r--r--src/lib/extensions/discord.js/BushStoreChannel.ts16
-rw-r--r--src/lib/extensions/discord.js/BushTextChannel.ts13
-rw-r--r--src/lib/extensions/discord.js/BushThreadChannel.ts23
-rw-r--r--src/lib/extensions/discord.js/BushThreadManager.ts11
-rw-r--r--src/lib/extensions/discord.js/BushThreadMember.ts14
-rw-r--r--src/lib/extensions/discord.js/BushThreadMemberManager.ts23
-rw-r--r--src/lib/extensions/discord.js/BushUser.ts (renamed from src/lib/extensions/BushUser.ts)10
-rw-r--r--src/lib/extensions/discord.js/BushVoiceChannel.ts12
34 files changed, 291 insertions, 57 deletions
diff --git a/src/lib/extensions/BushMessage.ts b/src/lib/extensions/BushMessage.ts
deleted file mode 100644
index 6293c55..0000000
--- a/src/lib/extensions/BushMessage.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { DMChannel, Message, NewsChannel, Structures, TextChannel } from 'discord.js';
-import { BushClient } from './BushClient';
-import { BushCommandUtil } from './BushCommandUtil';
-import { BushGuild } from './BushGuild';
-import { BushGuildMember } from './BushGuildMember';
-import { BushUser } from './BushUser';
-
-export class BushMessage extends Message {
- public declare client: BushClient;
- public declare util: BushCommandUtil;
- public declare guild: BushGuild;
- public declare member: BushGuildMember;
- public declare author: BushUser;
- public constructor(client: BushClient, data: unknown, channel: TextChannel | DMChannel | NewsChannel) {
- super(client, data, channel);
- this.client = client;
- this.channel = channel;
- }
-}
-
-Structures.extend('Message', () => BushMessage);
diff --git a/src/lib/extensions/BushArgumentOptions.ts b/src/lib/extensions/discord-akairo/BushArgumentOptions.ts
index bbbc04b..bbbc04b 100644
--- a/src/lib/extensions/BushArgumentOptions.ts
+++ b/src/lib/extensions/discord-akairo/BushArgumentOptions.ts
diff --git a/src/lib/extensions/BushArgumentTypeCaster.ts b/src/lib/extensions/discord-akairo/BushArgumentTypeCaster.ts
index e000063..9afcf8b 100644
--- a/src/lib/extensions/BushArgumentTypeCaster.ts
+++ b/src/lib/extensions/discord-akairo/BushArgumentTypeCaster.ts
@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
-import { BushMessage } from './BushMessage';
+import { BushMessage } from '../discord.js/BushMessage';
export type BushArgumentTypeCaster = (message: BushMessage, phrase: string) => any;
diff --git a/src/lib/extensions/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index 8dd8277..c18fe80 100644
--- a/src/lib/extensions/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -9,20 +9,25 @@ import {
MessagePayload,
ReplyMessageOptions,
Snowflake,
+ Structures,
UserResolvable
} from 'discord.js';
import * as path from 'path';
import { exit } from 'process';
import readline from 'readline';
import { Sequelize } from 'sequelize';
-import { durationTypeCaster } from '../../arguments/duration';
-import * as config from '../../config/options';
-import UpdateCacheTask from '../../tasks/updateCache';
-import * as Models from '../models';
-import AllowedMentions from '../utils/AllowedMentions';
-import { BushCache } from '../utils/BushCache';
-import { BushConstants } from '../utils/BushConstants';
-import { BushLogger } from '../utils/BushLogger';
+import { durationTypeCaster } from '../../../arguments/duration';
+import * as config from '../../../config/options';
+import UpdateCacheTask from '../../../tasks/updateCache';
+import * as Models from '../../models';
+import AllowedMentions from '../../utils/AllowedMentions';
+import { BushCache } from '../../utils/BushCache';
+import { BushConstants } from '../../utils/BushConstants';
+import { BushLogger } from '../../utils/BushLogger';
+import { BushGuild } from '../discord.js/BushGuild';
+import { BushGuildMember } from '../discord.js/BushGuildMember';
+import { BushMessage } from '../discord.js/BushMessage';
+import { BushUser } from '../discord.js/BushUser';
import { BushClientUtil } from './BushClientUtil';
import { BushCommandHandler } from './BushCommandHandler';
import { BushInhibitorHandler } from './BushInhinitorHandler';
@@ -139,6 +144,11 @@ export class BushClient extends AkairoClient {
// Initialize everything
private async _init(): Promise<void> {
+ Structures.extend('User', () => BushUser);
+ Structures.extend('Guild', () => BushGuild);
+ Structures.extend('GuildMember', () => BushGuildMember);
+ Structures.extend('Message', () => BushMessage);
+
this.commandHandler.useListenerHandler(this.listenerHandler);
this.commandHandler.useInhibitorHandler(this.inhibitorHandler);
this.commandHandler.ignorePermissions = this.config.owners;
diff --git a/src/lib/extensions/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index 680f6af..94ad10c 100644
--- a/src/lib/extensions/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -25,10 +25,10 @@ import {
} from 'discord.js';
import got from 'got';
import { promisify } from 'util';
-import { Global } from '../models';
-import { BushCache } from '../utils/BushCache';
+import { Global } from '../../models';
+import { BushCache } from '../../utils/BushCache';
+import { BushMessage } from '../discord.js/BushMessage';
import { BushClient } from './BushClient';
-import { BushMessage } from './BushMessage';
interface hastebinRes {
key: string;
@@ -78,7 +78,7 @@ interface bushColors {
}
export class BushClientUtil extends ClientUtil {
/** The client of this ClientUtil */
- public declare client: BushClient;
+ public declare readonly client: BushClient;
/** The hastebin urls used to post to hastebin, attempts to post in order */
public hasteURLs: string[] = [
'https://hst.sh',
diff --git a/src/lib/extensions/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts
index f22a628..b7071b5 100644
--- a/src/lib/extensions/BushCommand.ts
+++ b/src/lib/extensions/discord-akairo/BushCommand.ts
@@ -2,9 +2,9 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { ArgumentGenerator, ArgumentOptions, ArgumentPromptOptions, Command, CommandOptions } from 'discord-akairo';
import { Snowflake } from 'discord.js';
+import { BushMessage } from '../discord.js/BushMessage';
import { BushClient } from './BushClient';
import { BushCommandHandler } from './BushCommandHandler';
-import { BushMessage } from './BushMessage';
import { BushSlashMessage } from './BushSlashMessage';
export interface BushArgumentOptions extends ArgumentOptions {
diff --git a/src/lib/extensions/BushCommandHandler.ts b/src/lib/extensions/discord-akairo/BushCommandHandler.ts
index aeea101..09baf2e 100644
--- a/src/lib/extensions/BushCommandHandler.ts
+++ b/src/lib/extensions/discord-akairo/BushCommandHandler.ts
@@ -1,10 +1,10 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Category, CommandHandler, CommandHandlerOptions } from 'discord-akairo';
import { Collection } from 'discord.js';
-import { BushConstants } from '../utils/BushConstants';
+import { BushConstants } from '../../utils/BushConstants';
+import { BushMessage } from '../discord.js/BushMessage';
import { BushClient } from './BushClient';
import { BushCommand } from './BushCommand';
-import { BushMessage } from './BushMessage';
export type BushCommandHandlerOptions = CommandHandlerOptions;
@@ -17,7 +17,6 @@ export class BushCommandHandler extends CommandHandler {
public declare categories: Collection<string, Category<string, BushCommand>>;
public constructor(client: BushClient, options: CommandHandlerOptions) {
super(client, options);
- this.client = client;
}
public async runPostTypeInhibitors(message: BushMessage, command: BushCommand, slash = false): Promise<boolean> {
diff --git a/src/lib/extensions/BushCommandUtil.ts b/src/lib/extensions/discord-akairo/BushCommandUtil.ts
index b4084bd..b4084bd 100644
--- a/src/lib/extensions/BushCommandUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushCommandUtil.ts
diff --git a/src/lib/extensions/BushInhibitor.ts b/src/lib/extensions/discord-akairo/BushInhibitor.ts
index 602ff65..ae91494 100644
--- a/src/lib/extensions/BushInhibitor.ts
+++ b/src/lib/extensions/discord-akairo/BushInhibitor.ts
@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Inhibitor } from 'discord-akairo';
+import { BushMessage } from '../discord.js/BushMessage';
import { BushClient } from './BushClient';
import { BushCommand } from './BushCommand';
-import { BushMessage } from './BushMessage';
import { BushSlashMessage } from './BushSlashMessage';
export class BushInhibitor extends Inhibitor {
diff --git a/src/lib/extensions/BushInhinitorHandler.ts b/src/lib/extensions/discord-akairo/BushInhinitorHandler.ts
index 2a947da..2a947da 100644
--- a/src/lib/extensions/BushInhinitorHandler.ts
+++ b/src/lib/extensions/discord-akairo/BushInhinitorHandler.ts
diff --git a/src/lib/extensions/BushListener.ts b/src/lib/extensions/discord-akairo/BushListener.ts
index e555e89..e555e89 100644
--- a/src/lib/extensions/BushListener.ts
+++ b/src/lib/extensions/discord-akairo/BushListener.ts
diff --git a/src/lib/extensions/BushListenerHandler.ts b/src/lib/extensions/discord-akairo/BushListenerHandler.ts
index 28615fc..28615fc 100644
--- a/src/lib/extensions/BushListenerHandler.ts
+++ b/src/lib/extensions/discord-akairo/BushListenerHandler.ts
diff --git a/src/lib/extensions/BushSlashMessage.ts b/src/lib/extensions/discord-akairo/BushSlashMessage.ts
index 33ca11f..9e9f994 100644
--- a/src/lib/extensions/BushSlashMessage.ts
+++ b/src/lib/extensions/discord-akairo/BushSlashMessage.ts
@@ -1,9 +1,9 @@
import { AkairoMessage } from 'discord-akairo';
import { CommandInteraction } from 'discord.js';
+import { BushGuild } from '../discord.js/BushGuild';
+import { BushUser } from '../discord.js/BushUser';
import { BushClient } from './BushClient';
import { BushCommandUtil } from './BushCommandUtil';
-import { BushGuild } from './BushGuild';
-import { BushUser } from './BushUser';
export class BushSlashMessage extends AkairoMessage {
public declare client: BushClient;
diff --git a/src/lib/extensions/BushTask.ts b/src/lib/extensions/discord-akairo/BushTask.ts
index 06d0602..06d0602 100644
--- a/src/lib/extensions/BushTask.ts
+++ b/src/lib/extensions/discord-akairo/BushTask.ts
diff --git a/src/lib/extensions/BushTaskHandler.ts b/src/lib/extensions/discord-akairo/BushTaskHandler.ts
index 588988d..588988d 100644
--- a/src/lib/extensions/BushTaskHandler.ts
+++ b/src/lib/extensions/discord-akairo/BushTaskHandler.ts
diff --git a/src/lib/extensions/discord.js/BushCategoryChannel.ts b/src/lib/extensions/discord.js/BushCategoryChannel.ts
new file mode 100644
index 0000000..c4bc3ca
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushCategoryChannel.ts
@@ -0,0 +1,16 @@
+import { CategoryChannel, Collection, Snowflake } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushGuild } from './BushGuild';
+import { BushGuildChannel } from './BushGuildChannel';
+import { BushGuildMember } from './BushGuildMember';
+
+export class BushCategoryChannel extends CategoryChannel {
+ public declare readonly client: BushClient;
+ public declare readonly children: Collection<Snowflake, BushGuildChannel>;
+ public declare guild: BushGuild;
+ public declare readonly members: Collection<Snowflake, BushGuildMember>;
+ public declare readonly parent: CategoryChannel | null;
+ constructor(guild: BushGuild, data?: unknown) {
+ super(guild, data);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushDMChannel.ts b/src/lib/extensions/discord.js/BushDMChannel.ts
new file mode 100644
index 0000000..475f224
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushDMChannel.ts
@@ -0,0 +1,14 @@
+import { DMChannel } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushMessageManager } from './BushMessageManager';
+import { BushUser } from './BushUser';
+
+export class BushDMChannel extends DMChannel {
+ public declare readonly client: BushClient;
+ public declare messages: BushMessageManager;
+ public declare recipient: BushUser;
+
+ constructor(client: BushClient, data?: unknown) {
+ super(client, data);
+ }
+}
diff --git a/src/lib/extensions/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts
index 1d7b3c8..95e07f9 100644
--- a/src/lib/extensions/BushGuild.ts
+++ b/src/lib/extensions/discord.js/BushGuild.ts
@@ -1,9 +1,9 @@
-import { Guild, Structures } from 'discord.js';
-import { Guild as GuildDB, GuildModel } from '../models/Guild';
-import { BushClient } from './BushClient';
+import { Guild } from 'discord.js';
+import { Guild as GuildDB, GuildModel } from '../../models/Guild';
+import { BushClient } from '../discord-akairo/BushClient';
export class BushGuild extends Guild {
- public declare client: BushClient;
+ public declare readonly client: BushClient;
public constructor(client: BushClient, data: unknown) {
super(client, data);
}
@@ -18,5 +18,3 @@ export class BushGuild extends Guild {
return await row.save();
}
}
-
-Structures.extend('Guild', () => BushGuild);
diff --git a/src/lib/extensions/discord.js/BushGuildChannel.ts b/src/lib/extensions/discord.js/BushGuildChannel.ts
new file mode 100644
index 0000000..75b8a5f
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushGuildChannel.ts
@@ -0,0 +1,11 @@
+import { GuildChannel } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushGuild } from './BushGuild';
+
+export class BushGuildChannel extends GuildChannel {
+ public declare readonly client: BushClient;
+ public declare guild: BushGuild;
+ constructor(guild: BushGuild, data?: unknown) {
+ super(guild, data);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushGuildEmoji.ts b/src/lib/extensions/discord.js/BushGuildEmoji.ts
new file mode 100644
index 0000000..8c97ada
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushGuildEmoji.ts
@@ -0,0 +1,15 @@
+import { GuildEmoji } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushGuild } from './BushGuild';
+import { BushGuildEmojiRoleManager } from './BushGuildEmojiRoleManager';
+import { BushUser } from './BushUser';
+
+export class BushGuildEmoji extends GuildEmoji {
+ public declare readonly client: BushClient;
+ public declare guild: BushGuild;
+ public declare author: BushUser | null;
+ public declare readonly roles: BushGuildEmojiRoleManager;
+ constructor(client: BushClient, data: unknown, guild: BushGuild) {
+ super(client, data, guild);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts b/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts
new file mode 100644
index 0000000..86c2492
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts
@@ -0,0 +1,13 @@
+import { Collection, GuildEmojiRoleManager, Snowflake } from 'discord.js';
+import { BushGuild } from './BushGuild';
+import { BushGuildEmoji } from './BushGuildEmoji';
+import { BushRole } from './BushRole';
+
+export class BushGuildEmojiRoleManager extends GuildEmojiRoleManager {
+ public declare emoji: BushGuildEmoji;
+ public declare guild: BushGuild;
+ public declare cache: Collection<Snowflake, BushRole>;
+ constructor(emoji: BushGuildEmoji) {
+ super(emoji);
+ }
+}
diff --git a/src/lib/extensions/BushGuildMember.ts b/src/lib/extensions/discord.js/BushGuildMember.ts
index 2bb0601..6bcb9b8 100644
--- a/src/lib/extensions/BushGuildMember.ts
+++ b/src/lib/extensions/discord.js/BushGuildMember.ts
@@ -1,15 +1,13 @@
-import { GuildMember, Structures } from 'discord.js';
-import { BushClient } from './BushClient';
+import { GuildMember } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
import { BushGuild } from './BushGuild';
import { BushUser } from './BushUser';
export class BushGuildMember extends GuildMember {
- public declare client: BushClient;
+ public declare readonly client: BushClient;
public declare guild: BushGuild;
public declare BushUser: BushUser;
public constructor(client: BushClient, data: unknown, guild: BushGuild) {
super(client, data, guild);
}
}
-
-Structures.extend('GuildMember', () => BushGuildMember);
diff --git a/src/lib/extensions/discord.js/BushMessage.ts b/src/lib/extensions/discord.js/BushMessage.ts
new file mode 100644
index 0000000..e4380f7
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushMessage.ts
@@ -0,0 +1,26 @@
+import { Message } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushCommandUtil } from '../discord-akairo/BushCommandUtil';
+import { BushDMChannel } from './BushDMChannel';
+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 class BushMessage extends Message {
+ public declare readonly client: BushClient;
+ public declare util: BushCommandUtil;
+ public declare readonly guild: BushGuild;
+ public declare readonly member: BushGuildMember;
+ 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);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushMessageManager.ts b/src/lib/extensions/discord.js/BushMessageManager.ts
new file mode 100644
index 0000000..c9256a9
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushMessageManager.ts
@@ -0,0 +1,14 @@
+/* eslint-disable @typescript-eslint/no-explicit-any */
+import { Collection, MessageManager, Snowflake } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushDMChannel } from './BushDMChannel';
+import { BushMessage } from './BushMessage';
+import { BushTextChannel } from './BushTextChannel';
+
+export class BushMessageManager extends MessageManager {
+ public declare readonly client: BushClient;
+ public declare cache: Collection<Snowflake, BushMessage>;
+ constructor(channel: BushTextChannel | BushDMChannel, iterable?: Iterable<any>) {
+ super(channel, iterable);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushNewsChannel.ts b/src/lib/extensions/discord.js/BushNewsChannel.ts
new file mode 100644
index 0000000..77b7a9d
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushNewsChannel.ts
@@ -0,0 +1,16 @@
+import { NewsChannel } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushGuild } from './BushGuild';
+import { BushMessageManager } from './BushMessageManager';
+import { BushThreadManager } from './BushThreadManager';
+
+export class BushNewsChannel extends NewsChannel {
+ public declare readonly client: BushClient;
+ public declare guild: BushGuild;
+ public declare messages: BushMessageManager;
+ public declare threads: BushThreadManager;
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ constructor(guild: BushGuild, data?: object) {
+ super(guild, data);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushRole.ts b/src/lib/extensions/discord.js/BushRole.ts
new file mode 100644
index 0000000..ce8e9dc
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushRole.ts
@@ -0,0 +1,13 @@
+import { Collection, Role, Snowflake } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushGuild } from './BushGuild';
+import { BushGuildMember } from './BushGuildMember';
+
+export class BushRole extends Role {
+ public declare readonly client: BushClient;
+ public guild: BushGuild;
+ public readonly members: Collection<Snowflake, BushGuildMember>;
+ constructor(client: BushClient, data: unknown, guild: BushGuild) {
+ super(client, data, guild);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushStoreChannel.ts b/src/lib/extensions/discord.js/BushStoreChannel.ts
new file mode 100644
index 0000000..1a9b855
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushStoreChannel.ts
@@ -0,0 +1,16 @@
+import { Collection, Snowflake, StoreChannel } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushCategoryChannel } from './BushCategoryChannel';
+import { BushGuild } from './BushGuild';
+import { BushGuildMember } from './BushGuildMember';
+
+export class BushStoreChannel extends StoreChannel {
+ public declare readonly client: BushClient;
+ public declare guild: BushGuild;
+ public declare readonly members: Collection<Snowflake, BushGuildMember>;
+ public declare readonly parent: BushCategoryChannel | null;
+
+ constructor(guild: BushGuild, data?: unknown) {
+ super(guild, data);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushTextChannel.ts b/src/lib/extensions/discord.js/BushTextChannel.ts
new file mode 100644
index 0000000..b58aa7b
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushTextChannel.ts
@@ -0,0 +1,13 @@
+import { TextChannel } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushGuild } from './BushGuild';
+import { BushMessageManager } from './BushMessageManager';
+
+export class BushTextChannel extends TextChannel {
+ public declare readonly client: BushClient;
+ public declare guild: BushGuild;
+ public declare messages: BushMessageManager;
+ constructor(guild: BushGuild, data?: unknown) {
+ super(guild, data);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushThreadChannel.ts b/src/lib/extensions/discord.js/BushThreadChannel.ts
new file mode 100644
index 0000000..10fc65e
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushThreadChannel.ts
@@ -0,0 +1,23 @@
+/* eslint-disable @typescript-eslint/ban-types */
+import { Collection, Snowflake, ThreadChannel } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushGuild } from './BushGuild';
+import { BushGuildMember } from './BushGuildMember';
+import { BushMessageManager } from './BushMessageManager';
+import { BushNewsChannel } from './BushNewsChannel';
+import { BushTextChannel } from './BushTextChannel';
+import { BushThreadMemberManager } from './BushThreadMemberManager';
+
+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;
+ constructor(guild: BushGuild, data?: object) {
+ super(guild, data);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushThreadManager.ts b/src/lib/extensions/discord.js/BushThreadManager.ts
new file mode 100644
index 0000000..408ac7f
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushThreadManager.ts
@@ -0,0 +1,11 @@
+/* eslint-disable @typescript-eslint/no-explicit-any */
+import { ThreadManager } from 'discord.js';
+import { BushNewsChannel } from './BushNewsChannel';
+import { BushTextChannel } from './BushTextChannel';
+
+export class BushThreadManager extends ThreadManager {
+ public declare channel: BushTextChannel | BushNewsChannel;
+ constructor(channel: BushTextChannel | BushNewsChannel, iterable?: Iterable<any>) {
+ super(channel, iterable);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushThreadMember.ts b/src/lib/extensions/discord.js/BushThreadMember.ts
new file mode 100644
index 0000000..16da663
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushThreadMember.ts
@@ -0,0 +1,14 @@
+/* eslint-disable @typescript-eslint/ban-types */
+import { ThreadMember } from 'discord.js';
+import { BushGuildMember } from './BushGuildMember';
+import { BushThreadChannel } from './BushThreadChannel';
+import { BushUser } from './BushUser';
+
+export class BushThreadMember extends ThreadMember {
+ public declare readonly guildMember: BushGuildMember | null;
+ public declare readonly user: BushUser | null;
+ public declare thread: BushThreadChannel;
+ constructor(thread: BushThreadChannel, data?: object) {
+ super(thread, data);
+ }
+}
diff --git a/src/lib/extensions/discord.js/BushThreadMemberManager.ts b/src/lib/extensions/discord.js/BushThreadMemberManager.ts
new file mode 100644
index 0000000..7c7bb6d
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushThreadMemberManager.ts
@@ -0,0 +1,23 @@
+/* eslint-disable @typescript-eslint/no-explicit-any */
+/* eslint-disable @typescript-eslint/no-empty-interface */
+import { Snowflake, ThreadMemberManager, UserResolvable } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushGuildMember } from './BushGuildMember';
+import { BushMessage } from './BushMessage';
+import { BushThreadChannel } from './BushThreadChannel';
+import { BushThreadMember } from './BushThreadMember';
+import { BushUser } from './BushUser';
+
+export type BushThreadMemberResolvable = BushThreadMember | UserResolvable;
+export type BushUserResolvable = BushUser | Snowflake | BushMessage | BushGuildMember | BushThreadMember;
+
+export interface BushThreadMemberManager extends ThreadMemberManager {}
+
+export class BushThreadMemberManager extends ThreadMemberManager {
+ public declare thread: BushThreadChannel;
+ public declare readonly client: BushClient;
+
+ constructor(thread: BushThreadChannel, iterable?: Iterable<any>) {
+ super(thread, iterable);
+ }
+}
diff --git a/src/lib/extensions/BushUser.ts b/src/lib/extensions/discord.js/BushUser.ts
index 53fd449..53a6be3 100644
--- a/src/lib/extensions/BushUser.ts
+++ b/src/lib/extensions/discord.js/BushUser.ts
@@ -1,8 +1,10 @@
-import { Structures, User } from 'discord.js';
-import { BushClient } from './BushClient';
+import { User } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushDMChannel } from './BushDMChannel';
export class BushUser extends User {
- public declare client: BushClient;
+ public declare readonly client: BushClient;
+ public declare readonly dmChannel: BushDMChannel | null;
public constructor(client: BushClient, data: unknown) {
super(client, data);
}
@@ -15,5 +17,3 @@ export class BushUser extends User {
return this.client.isSuperUser(this);
}
}
-
-Structures.extend('User', () => BushUser);
diff --git a/src/lib/extensions/discord.js/BushVoiceChannel.ts b/src/lib/extensions/discord.js/BushVoiceChannel.ts
new file mode 100644
index 0000000..7510b69
--- /dev/null
+++ b/src/lib/extensions/discord.js/BushVoiceChannel.ts
@@ -0,0 +1,12 @@
+import { Collection, Snowflake, VoiceChannel } from 'discord.js';
+import { BushClient } from '../discord-akairo/BushClient';
+import { BushGuild } from './BushGuild';
+import { BushGuildMember } from './BushGuildMember';
+
+export class BushVoiceChannel extends VoiceChannel {
+ public declare readonly client: BushClient;
+ public declare readonly members: Collection<Snowflake, BushGuildMember>;
+ constructor(guild: BushGuild, data?: unknown) {
+ super(guild, data);
+ }
+}