aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js/BushDMChannel.ts
blob: 1af3ca177479a8de377db77f38dbd1e0f89f074d (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
29
import type {
	BushBaseGuildVoiceChannel,
	BushClient,
	BushMessageManager,
	BushTextBasedChannel,
	BushThreadChannel,
	BushUser
} from '#lib';
import { DMChannel } from 'discord.js';
import type { RawDMChannelData } from 'discord.js/typings/rawDataTypes';

/**
 * Represents a direct message channel between two users.
 */
export class BushDMChannel extends DMChannel {
	public declare readonly client: BushClient;
	public declare messages: BushMessageManager;
	public declare recipient: BushUser;

	public constructor(client: BushClient, data?: RawDMChannelData) {
		super(client, data);
	}
}

export interface BushDMChannel extends DMChannel {
	isText(): this is BushTextBasedChannel;
	isVoice(): this is BushBaseGuildVoiceChannel;
	isThread(): this is BushThreadChannel;
}