aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js/BushMessage.ts
blob: f2dd02c669549c946d3016e56f423f43b74b933c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { Message, Partialize } from 'discord.js';
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 { BushUser } from './BushUser';

export type PartialBushMessage = Partialize<
	BushMessage,
	'type' | 'system' | 'pinned' | 'tts',
	'content' | 'cleanContent' | 'author'
>;
export class BushMessage extends Message {
	public declare readonly client: BushClient;
	public override util!: BushCommandUtil;
	public declare readonly guild: BushGuild | null;
	public declare readonly member: BushGuildMember | null;
	public declare author: BushUser;
	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> {
		return super.fetch(force) as Promise<BushMessage>;
	}
}