aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord-akairo/BushSlashMessage.ts
blob: d342ea6232fb4eaefdaf7a03942396bf89d0c0b6 (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
30
31
32
import {
	BushGuildTextBasedChannel,
	type BushClient,
	type BushCommandUtil,
	type BushGuild,
	type BushGuildMember,
	type BushTextBasedChannel,
	type BushUser
} from '#lib';
import { AkairoMessage } from 'discord-akairo';
import { type ChatInputCommandInteraction, type ContextMenuCommandInteraction } from 'discord.js';

export class BushSlashMessage extends AkairoMessage {
	public declare client: BushClient;
	public declare util: BushCommandUtil<BushSlashMessage>;
	public declare author: BushUser;
	public declare member: BushGuildMember | null;
	public constructor(client: BushClient, interaction: ChatInputCommandInteraction | ContextMenuCommandInteraction) {
		super(client, interaction);
	}
}

export interface BushSlashMessage extends AkairoMessage {
	get channel(): BushTextBasedChannel | null;
	get guild(): BushGuild | null;
	inGuild(): this is BushSlashMessageInGuild & this;
}

interface BushSlashMessageInGuild {
	guild: BushGuild;
	channel: BushGuildTextBasedChannel;
}