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

export class BushSlashMessage extends AkairoMessage {
	public declare client: BushClient;
	public declare util: BushCommandUtil<BushSlashMessage> & { handler: BushCommandHandler };
	public declare author: BushUser;
	public declare member: BushGuildMember | null;
	public declare interaction: ChatInputCommandInteraction;
	public constructor(client: BushClient, interaction: ChatInputCommandInteraction) {
		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;
}