-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathclient.ts
115 lines (108 loc) · 3.18 KB
/
client.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import { CoreClient, type CoreFeatures } from "./core/client.ts";
import { type CombinePluginFeatures } from "./core/plugins.ts";
import action from "./plugins/action.ts";
import antiflood from "./plugins/antiflood.ts";
import away from "./plugins/away.ts";
import cap from "./plugins/cap.ts";
import chanmodes from "./plugins/chanmodes.ts";
import chantypes from "./plugins/chantypes.ts";
import clientinfo from "./plugins/clientinfo.ts";
import ctcp from "./plugins/ctcp.ts";
import errorReply from "./plugins/error_reply.ts";
import invalidNames from "./plugins/invalid_names.ts";
import invite from "./plugins/invite.ts";
import isupport from "./plugins/isupport.ts";
import join from "./plugins/join.ts";
import joinOnInvite from "./plugins/join_on_invite.ts";
import joinOnRegister from "./plugins/join_on_register.ts";
import kick from "./plugins/kick.ts";
import kill from "./plugins/kill.ts";
import list from "./plugins/list.ts";
import mode from "./plugins/mode.ts";
import modeAliases from "./plugins/mode_aliases.ts";
import motd from "./plugins/motd.ts";
import myinfo from "./plugins/myinfo.ts";
import names from "./plugins/names.ts";
import nick from "./plugins/nick.ts";
import nicklist from "./plugins/nicklist.ts";
import notice from "./plugins/notice.ts";
import oper from "./plugins/oper.ts";
import operOnRegister from "./plugins/oper_on_register.ts";
import part from "./plugins/part.ts";
import ping from "./plugins/ping.ts";
import pingTimeout from "./plugins/ping_timeout.ts";
import privmsg from "./plugins/privmsg.ts";
import quit from "./plugins/quit.ts";
import reconnect from "./plugins/reconnect.ts";
import register from "./plugins/register.ts";
import registration from "./plugins/registration.ts";
import throwOnError from "./plugins/throw_on_error.ts";
import time from "./plugins/time.ts";
import topic from "./plugins/topic.ts";
import usermodes from "./plugins/usermodes.ts";
import verbose from "./plugins/verbose.ts";
import version from "./plugins/version.ts";
import whois from "./plugins/whois.ts";
const plugins = [
action,
antiflood,
away,
cap,
chanmodes,
chantypes,
clientinfo,
ctcp,
errorReply,
invalidNames,
invite,
isupport,
join,
joinOnInvite,
joinOnRegister,
kick,
kill,
list,
motd,
mode,
modeAliases,
myinfo,
names,
nick,
nicklist,
notice,
oper,
operOnRegister,
part,
ping,
pingTimeout,
privmsg,
quit,
reconnect,
register,
registration,
throwOnError,
time,
topic,
usermodes,
verbose,
version,
whois,
];
type ClientFeatures = CoreFeatures & CombinePluginFeatures<typeof plugins>;
export type Options = ClientFeatures["options"];
export type States = ClientFeatures["state"];
export type Commands = ClientFeatures["commands"];
export type Events = ClientFeatures["events"];
export type Utils = ClientFeatures["utils"];
export interface ClientOptions extends Options {}
export interface ClientState extends States {}
export interface ClientUtils extends Utils {}
export interface Client extends Commands {
readonly state: Readonly<ClientState>;
readonly utils: Readonly<ClientUtils>;
}
export class Client extends CoreClient<Events> {
constructor(options: ClientOptions) {
super(plugins, options);
}
}