aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-30 13:04:24 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-30 13:04:24 -0400
commitf5c2b7b946487c2828365cc63bc6f471dd6cfc2f (patch)
treeb225533c2858105b85ba118588954d9cb1ee9781 /src/lib/extensions/discord.js
parent1c6d451ffd63f9805b978e8565807e8a6b528681 (diff)
downloadtanzanite-f5c2b7b946487c2828365cc63bc6f471dd6cfc2f.tar.gz
tanzanite-f5c2b7b946487c2828365cc63bc6f471dd6cfc2f.tar.bz2
tanzanite-f5c2b7b946487c2828365cc63bc6f471dd6cfc2f.zip
clean up and fix stuff
Diffstat (limited to 'src/lib/extensions/discord.js')
-rw-r--r--src/lib/extensions/discord.js/BushClientEvents.d.ts3
-rw-r--r--src/lib/extensions/discord.js/BushMessage.ts8
2 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/extensions/discord.js/BushClientEvents.d.ts b/src/lib/extensions/discord.js/BushClientEvents.d.ts
index 6c1fec5..da5d647 100644
--- a/src/lib/extensions/discord.js/BushClientEvents.d.ts
+++ b/src/lib/extensions/discord.js/BushClientEvents.d.ts
@@ -1,6 +1,7 @@
import { ClientEvents } from 'discord.js';
-import { BushMessage } from './BushMessage';
+import { BushMessage, BushPartialMessage } from './BushMessage';
export interface BushClientEvents extends ClientEvents {
messageCreate: [message: BushMessage];
+ messageUpdate: [oldMessage: BushMessage | BushPartialMessage, newMessage: BushMessage | BushPartialMessage];
}
diff --git a/src/lib/extensions/discord.js/BushMessage.ts b/src/lib/extensions/discord.js/BushMessage.ts
index 68f3de0..7971a6d 100644
--- a/src/lib/extensions/discord.js/BushMessage.ts
+++ b/src/lib/extensions/discord.js/BushMessage.ts
@@ -1,4 +1,5 @@
-import { Message } from 'discord.js';
+/* eslint-disable @typescript-eslint/no-empty-interface */
+import { Message, Partialize } from 'discord.js';
import { BushClient } from '../discord-akairo/BushClient';
import { BushDMChannel } from './BushDMChannel';
import { BushGuild } from './BushGuild';
@@ -8,6 +9,8 @@ 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;
@@ -23,4 +26,7 @@ export class BushMessage extends Message {
super(client, data, channel);
// this.util = new BushCommandUtil(client.commandHandler, this);
}
+ public fetch(force?: boolean): Promise<BushMessage> {
+ return super.fetch(force) as Promise<BushMessage>;
+ }
}