1
1
import { ButtonHandler } from "./ButtonHandler" ;
2
2
import { Collection } from "discord.js" ;
3
3
import { Command } from "./Command" ;
4
+ import { Autocompleter } from "Autocompleter" ;
4
5
5
6
class Ctx {
6
7
public readonly defaultGuild ;
7
8
public readonly commands : Collection < string , Command > = new Collection < string , Command > ( ) ;
8
9
public readonly buttons : Collection < string , ButtonHandler > = new Collection < string , ButtonHandler > ( ) ;
10
+ public readonly autocompleters : Collection < string , Autocompleter > = new Collection < string , Autocompleter > ( ) ;
9
11
public readonly logLevel : string ;
10
12
11
13
// Databases are gonna go here
@@ -18,9 +20,14 @@ class Ctx {
18
20
this . logLevel = LOG_LEVEL || "error" ;
19
21
}
20
22
21
- update ( commands : Collection < string , Command > , buttons : Collection < string , ButtonHandler > ) {
23
+ update (
24
+ commands : Collection < string , Command > ,
25
+ buttons : Collection < string , ButtonHandler > ,
26
+ autocompleters : Collection < string , Autocompleter >
27
+ ) {
22
28
commands . forEach ( ( v , k ) => this . commands . set ( k , v ) ) ;
23
29
buttons . forEach ( ( v , k ) => this . buttons . set ( k , v ) ) ;
30
+ autocompleters . forEach ( ( v , k ) => this . autocompleters . set ( k , v ) ) ;
24
31
}
25
32
}
26
33
0 commit comments