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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
import type {
BushApplicationCommand,
BushClient,
BushGuild,
BushGuildEmoji,
BushGuildMember,
BushGuildTextBasedChannel,
BushNonThreadGuildBasedChannel,
BushRole,
BushTextBasedChannel,
BushUser
} from '#lib';
import type { APIInteractionGuildMember } from 'discord-api-types/v10';
import { ChatInputCommandInteraction, type CacheType, type CacheTypeReducer, type Invite, type Snowflake } from 'discord.js';
import type { RawCommandInteractionData } from 'discord.js/typings/rawDataTypes';
export type BushGuildResolvable =
| BushGuild
| BushNonThreadGuildBasedChannel
| BushGuildMember
| BushGuildEmoji
| Invite
| BushRole
| Snowflake;
/**
* Represents a command interaction.
*/
export class BushChatInputCommandInteraction<Cached extends CacheType = CacheType> extends ChatInputCommandInteraction<Cached> {
public declare readonly client: BushClient;
public declare member: CacheTypeReducer<Cached, BushGuildMember, APIInteractionGuildMember>;
public declare user: BushUser;
public constructor(client: BushClient, data: RawCommandInteractionData) {
super(client, data);
}
}
export interface BushChatInputCommandInteraction<Cached extends CacheType = CacheType> {
get command(): BushApplicationCommand | BushApplicationCommand<{ guild: BushGuildResolvable }> | null;
get channel(): CacheTypeReducer<
Cached,
BushGuildTextBasedChannel | null,
BushGuildTextBasedChannel | null,
BushGuildTextBasedChannel | null,
BushTextBasedChannel | null
>;
get guild(): CacheTypeReducer<Cached, BushGuild, null>;
}
|