aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/extensions')
-rw-r--r--src/lib/extensions/discord-akairo/BushCommandUtil.ts7
-rw-r--r--src/lib/extensions/discord-akairo/BushSlashMessage.ts2
-rw-r--r--src/lib/extensions/discord.js/BushClientEvents.d.ts4
-rw-r--r--src/lib/extensions/discord.js/BushMessage.ts2
4 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/extensions/discord-akairo/BushCommandUtil.ts b/src/lib/extensions/discord-akairo/BushCommandUtil.ts
index bda0e74..7720d57 100644
--- a/src/lib/extensions/discord-akairo/BushCommandUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushCommandUtil.ts
@@ -4,18 +4,19 @@ import { Collection } from 'discord.js';
import { BushMessage } from '../discord.js/BushMessage';
import { BushCommand } from './BushCommand';
import { BushCommandHandler } from './BushCommandHandler';
+import { BushSlashMessage } from './BushSlashMessage';
export interface BushParsedComponentData extends ParsedComponentData {
command?: BushCommand;
}
-export class BushCommandUtil extends CommandUtil {
+export class BushCommandUtil<BushMessageType extends BushMessage | BushSlashMessage> extends CommandUtil<BushMessageType> {
public declare parsed: BushParsedComponentData | null;
public declare handler: BushCommandHandler;
- public declare message: BushMessage;
+ public declare message: BushMessageType;
public declare messages: Collection<Snowflake, BushMessage> | null;
- public constructor(handler: BushCommandHandler, message: BushMessage) {
+ public constructor(handler: BushCommandHandler, message: BushMessageType) {
super(handler, message);
}
}
diff --git a/src/lib/extensions/discord-akairo/BushSlashMessage.ts b/src/lib/extensions/discord-akairo/BushSlashMessage.ts
index d75d0a7..b5e48ea 100644
--- a/src/lib/extensions/discord-akairo/BushSlashMessage.ts
+++ b/src/lib/extensions/discord-akairo/BushSlashMessage.ts
@@ -8,7 +8,7 @@ import { BushCommandUtil } from './BushCommandUtil';
export class BushSlashMessage extends AkairoMessage {
public declare client: BushClient;
- public declare util: BushCommandUtil;
+ public declare util: BushCommandUtil<BushSlashMessage>;
public declare author: BushUser;
public declare member: BushGuildMember | null;
public constructor(client: BushClient, interaction: CommandInteraction) {
diff --git a/src/lib/extensions/discord.js/BushClientEvents.d.ts b/src/lib/extensions/discord.js/BushClientEvents.d.ts
index 4538fbb..b16f632 100644
--- a/src/lib/extensions/discord.js/BushClientEvents.d.ts
+++ b/src/lib/extensions/discord.js/BushClientEvents.d.ts
@@ -25,8 +25,8 @@ import {
PartialBushMessageReaction,
PartialBushUser
} from '@lib';
+import { AkairoClientEvents } from 'discord-akairo';
import {
- ClientEvents,
Collection,
Interaction,
InvalidRequestWarningData,
@@ -38,7 +38,7 @@ import {
} from 'discord.js';
import { BushGuildBan } from './BushGuildBan';
-export interface BushClientEvents extends ClientEvents {
+export interface BushClientEvents extends AkairoClientEvents {
applicationCommandCreate: [command: BushApplicationCommand];
applicationCommandDelete: [command: BushApplicationCommand];
applicationCommandUpdate: [
diff --git a/src/lib/extensions/discord.js/BushMessage.ts b/src/lib/extensions/discord.js/BushMessage.ts
index f2dd02c..4481910 100644
--- a/src/lib/extensions/discord.js/BushMessage.ts
+++ b/src/lib/extensions/discord.js/BushMessage.ts
@@ -13,7 +13,7 @@ export type PartialBushMessage = Partialize<
>;
export class BushMessage extends Message {
public declare readonly client: BushClient;
- public override util!: BushCommandUtil;
+ public override util!: BushCommandUtil<BushMessage>;
public declare readonly guild: BushGuild | null;
public declare readonly member: BushGuildMember | null;
public declare author: BushUser;