/
ArgumentContexts.ts
53 lines (49 loc) · 1.38 KB
/
ArgumentContexts.ts
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
50
51
52
53
import type { MessageResolverOptions } from '../resolvers/message';
import type { Argument } from '../structures/Argument';
/**
* The context for the `'enum'` argument.
* @since 4.2.0 (🌿)
*/
export interface EnumArgumentContext extends Argument.Context {
readonly enum?: string[];
readonly caseInsensitive?: boolean;
}
/**
* The context for the `'boolean'` argument.
* @since 4.2.0 (🌿)
*/
export interface BooleanArgumentContext extends Argument.Context {
/**
* The words that resolve to `true`.
* Any words added to this array will be merged with the words:
* ```ts
* ['1', 'true', '+', 't', 'yes', 'y']
* ```
*/
readonly truths?: string[];
/**
* The words that resolve to `false`.
* Any words added to this array will be merged with the words:
* ```ts
* ['0', 'false', '-', 'f', 'no', 'n']
* ```
*/
readonly falses?: string[];
}
/**
* The context for the `'member'` argument.
* @since 4.2.0 (🌿)
*/
export interface MemberArgumentContext extends Argument.Context {
/**
* Whether to perform a fuzzy search with the given argument.
* This will leverage `FetchMembersOptions.query` to do the fuzzy searching.
* @default true
*/
readonly performFuzzySearch?: boolean;
}
/**
* The context for the `'message'` argument.
* @since 4.2.0 (🌿)
*/
export type MessageArgumentContext = Omit<MessageResolverOptions, 'messageOrInteraction'> & Argument.Context;