alemonjs 2.1.44 → 2.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/README.md +124 -16
- package/bin/alemonc.js +52 -4
- package/bin/info.js +93 -0
- package/bin/login.js +98 -0
- package/bin/platform.js +156 -0
- package/bin/updateConfig.js +3 -1
- package/bin/versionUpdate.js +70 -0
- package/lib/app/hook-use-api.d.ts +226 -4
- package/lib/app/hook-use-api.js +912 -11
- package/lib/app/index.js +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/utils.d.ts +5 -0
- package/lib/core/utils.js +19 -2
- package/lib/index.js +2 -2
- package/lib/types/actions.d.ts +398 -1
- package/lib/types/client/index.d.ts +73 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/standard.d.ts +51 -0
- package/lib/types/standard.js +1 -0
- package/package.json +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataEnums, EventKeys, Events, User } from '../types';
|
|
1
|
+
import { DataEnums, EventKeys, Events, User, GuildInfo, ChannelInfo, MemberInfo, RoleInfo, PaginationParams, PaginatedResult } from '../types';
|
|
2
2
|
import { Result } from '../core/utils';
|
|
3
3
|
import { Format } from './message-format';
|
|
4
4
|
type Options = {
|
|
@@ -21,13 +21,99 @@ export declare const useMessage: <T extends EventKeys>(event: Events[T]) => read
|
|
|
21
21
|
format: Format | DataEnums[];
|
|
22
22
|
replyId?: string;
|
|
23
23
|
} | DataEnums[]): Promise<Result[]>;
|
|
24
|
+
delete(params?: {
|
|
25
|
+
messageId?: string;
|
|
26
|
+
}): Promise<Result>;
|
|
27
|
+
edit(params: {
|
|
28
|
+
format: Format | DataEnums[];
|
|
29
|
+
messageId?: string;
|
|
30
|
+
}): Promise<Result>;
|
|
31
|
+
pin(params?: {
|
|
32
|
+
messageId?: string;
|
|
33
|
+
}): Promise<Result>;
|
|
34
|
+
unpin(params?: {
|
|
35
|
+
messageId?: string;
|
|
36
|
+
}): Promise<Result>;
|
|
37
|
+
get(params?: {
|
|
38
|
+
messageId?: string;
|
|
39
|
+
}): Promise<Result>;
|
|
24
40
|
}];
|
|
25
41
|
export declare const useMember: <T extends EventKeys>(event: Events[T]) => readonly [{
|
|
42
|
+
info: (params: {
|
|
43
|
+
userId: string;
|
|
44
|
+
guildId?: string;
|
|
45
|
+
}) => Promise<Result<MemberInfo | null>>;
|
|
26
46
|
information: (params: {
|
|
27
47
|
userId: string;
|
|
28
|
-
}) => Promise<Result<
|
|
48
|
+
}) => Promise<Result<MemberInfo>>;
|
|
49
|
+
list: (params?: {
|
|
50
|
+
guildId?: string;
|
|
51
|
+
pagination?: PaginationParams;
|
|
52
|
+
}) => Promise<Result<PaginatedResult<MemberInfo>>>;
|
|
53
|
+
kick: (params: {
|
|
54
|
+
userId: string;
|
|
55
|
+
guildId?: string;
|
|
56
|
+
}) => Promise<Result>;
|
|
57
|
+
ban: (params: {
|
|
58
|
+
userId: string;
|
|
59
|
+
guildId?: string;
|
|
60
|
+
reason?: string;
|
|
61
|
+
duration?: number;
|
|
62
|
+
}) => Promise<Result>;
|
|
63
|
+
unban: (params: {
|
|
64
|
+
userId: string;
|
|
65
|
+
guildId?: string;
|
|
66
|
+
}) => Promise<Result>;
|
|
67
|
+
search: (params: {
|
|
68
|
+
keyword: string;
|
|
69
|
+
guildId?: string;
|
|
70
|
+
limit?: number;
|
|
71
|
+
}) => Promise<Result>;
|
|
72
|
+
mute(params: {
|
|
73
|
+
userId: string;
|
|
74
|
+
duration: number;
|
|
75
|
+
guildId?: string;
|
|
76
|
+
}): Promise<Result>;
|
|
77
|
+
admin(params: {
|
|
78
|
+
userId: string;
|
|
79
|
+
enable: boolean;
|
|
80
|
+
guildId?: string;
|
|
81
|
+
}): Promise<Result>;
|
|
82
|
+
card(params: {
|
|
83
|
+
userId: string;
|
|
84
|
+
card: string;
|
|
85
|
+
guildId?: string;
|
|
86
|
+
}): Promise<Result>;
|
|
87
|
+
title(params: {
|
|
88
|
+
userId: string;
|
|
89
|
+
title: string;
|
|
90
|
+
guildId?: string;
|
|
91
|
+
duration?: number;
|
|
92
|
+
}): Promise<Result>;
|
|
93
|
+
}];
|
|
94
|
+
export declare const useChannel: <T extends EventKeys>(event: Events[T]) => readonly [{
|
|
95
|
+
info: (params?: {
|
|
96
|
+
channelId?: string;
|
|
97
|
+
}) => Promise<Result<ChannelInfo | null>>;
|
|
98
|
+
list: (params?: {
|
|
99
|
+
guildId?: string;
|
|
100
|
+
}) => Promise<Result<ChannelInfo[]>>;
|
|
101
|
+
create: (params: {
|
|
102
|
+
name: string;
|
|
103
|
+
type?: string;
|
|
104
|
+
parentId?: string;
|
|
105
|
+
guildId?: string;
|
|
106
|
+
}) => Promise<Result<ChannelInfo | null>>;
|
|
107
|
+
update: (params: {
|
|
108
|
+
channelId: string;
|
|
109
|
+
name?: string;
|
|
110
|
+
topic?: string;
|
|
111
|
+
position?: number;
|
|
112
|
+
}) => Promise<Result>;
|
|
113
|
+
delete: (params: {
|
|
114
|
+
channelId: string;
|
|
115
|
+
}) => Promise<Result>;
|
|
29
116
|
}];
|
|
30
|
-
export declare const useChannel: <T extends EventKeys>(event: Events[T]) => readonly [{}];
|
|
31
117
|
export declare const useSend: <T extends EventKeys>(event: Events[T]) => (...val: DataEnums[]) => Promise<Result[]>;
|
|
32
118
|
export declare const useSends: <T extends EventKeys>(event: Events[T]) => readonly [(params?: DataEnums[] | {
|
|
33
119
|
format: Format | DataEnums[];
|
|
@@ -37,10 +123,146 @@ export declare const unChildren: (name?: string) => void;
|
|
|
37
123
|
export declare const onSelects: <T extends EventKeys[] | EventKeys>(values: T) => T;
|
|
38
124
|
export declare const createSelects: <T extends EventKeys[] | EventKeys>(values: T) => T;
|
|
39
125
|
export declare const useClient: <T extends object>(event: any, _ApiClass: new (...args: any[]) => T) => readonly [T];
|
|
126
|
+
export declare const useGuild: <T extends EventKeys>(event: Events[T]) => readonly [{
|
|
127
|
+
info: (params?: {
|
|
128
|
+
guildId?: string;
|
|
129
|
+
}) => Promise<Result<GuildInfo | null>>;
|
|
130
|
+
list: () => Promise<Result<GuildInfo[]>>;
|
|
131
|
+
update(params: {
|
|
132
|
+
name?: string;
|
|
133
|
+
guildId?: string;
|
|
134
|
+
}): Promise<Result>;
|
|
135
|
+
leave(params?: {
|
|
136
|
+
guildId?: string;
|
|
137
|
+
isDismiss?: boolean;
|
|
138
|
+
}): Promise<Result>;
|
|
139
|
+
mute(params: {
|
|
140
|
+
enable: boolean;
|
|
141
|
+
guildId?: string;
|
|
142
|
+
}): Promise<Result>;
|
|
143
|
+
}];
|
|
144
|
+
export declare const useRole: <T extends EventKeys>(event: Events[T]) => readonly [{
|
|
145
|
+
list: (params?: {
|
|
146
|
+
guildId?: string;
|
|
147
|
+
}) => Promise<Result<RoleInfo[]>>;
|
|
148
|
+
create: (params: {
|
|
149
|
+
name: string;
|
|
150
|
+
color?: number;
|
|
151
|
+
permissions?: string;
|
|
152
|
+
guildId?: string;
|
|
153
|
+
}) => Promise<Result<RoleInfo | null>>;
|
|
154
|
+
update: (params: {
|
|
155
|
+
roleId: string;
|
|
156
|
+
name?: string;
|
|
157
|
+
color?: number;
|
|
158
|
+
permissions?: string;
|
|
159
|
+
guildId?: string;
|
|
160
|
+
}) => Promise<Result>;
|
|
161
|
+
delete: (params: {
|
|
162
|
+
roleId: string;
|
|
163
|
+
guildId?: string;
|
|
164
|
+
}) => Promise<Result>;
|
|
165
|
+
assign: (params: {
|
|
166
|
+
userId: string;
|
|
167
|
+
roleId: string;
|
|
168
|
+
guildId?: string;
|
|
169
|
+
}) => Promise<Result>;
|
|
170
|
+
remove: (params: {
|
|
171
|
+
userId: string;
|
|
172
|
+
roleId: string;
|
|
173
|
+
guildId?: string;
|
|
174
|
+
}) => Promise<Result>;
|
|
175
|
+
}];
|
|
176
|
+
export declare const useReaction: <T extends EventKeys>(event: Events[T]) => readonly [{
|
|
177
|
+
add: (params: {
|
|
178
|
+
emojiId: string;
|
|
179
|
+
messageId?: string;
|
|
180
|
+
}) => Promise<Result>;
|
|
181
|
+
remove: (params: {
|
|
182
|
+
emojiId: string;
|
|
183
|
+
messageId?: string;
|
|
184
|
+
}) => Promise<Result>;
|
|
185
|
+
list: (params: {
|
|
186
|
+
emojiId: string;
|
|
187
|
+
messageId?: string;
|
|
188
|
+
limit?: number;
|
|
189
|
+
}) => Promise<Result>;
|
|
190
|
+
}];
|
|
40
191
|
export declare const useMe: () => readonly [{
|
|
41
192
|
info: () => Promise<Result<User | null>>;
|
|
42
|
-
guilds: () => Promise<Result<
|
|
193
|
+
guilds: () => Promise<Result<GuildInfo[]>>;
|
|
43
194
|
threads: () => Promise<Result<User | null>>;
|
|
44
195
|
friends: () => Promise<Result<User | null>>;
|
|
45
196
|
}];
|
|
197
|
+
export declare const useRequest: () => readonly [{
|
|
198
|
+
friend: (params: {
|
|
199
|
+
flag: string;
|
|
200
|
+
approve: boolean;
|
|
201
|
+
remark?: string;
|
|
202
|
+
}) => Promise<Result>;
|
|
203
|
+
guild: (params: {
|
|
204
|
+
flag: string;
|
|
205
|
+
subType: string;
|
|
206
|
+
approve: boolean;
|
|
207
|
+
reason?: string;
|
|
208
|
+
}) => Promise<Result>;
|
|
209
|
+
}];
|
|
210
|
+
export declare const useUser: () => readonly [{
|
|
211
|
+
info: (params: {
|
|
212
|
+
userId: string;
|
|
213
|
+
}) => Promise<Result<User | null>>;
|
|
214
|
+
}];
|
|
215
|
+
export declare const useMedia: <T extends EventKeys>(event: Events[T]) => readonly [{
|
|
216
|
+
upload: (params: {
|
|
217
|
+
type: "image" | "audio" | "video" | "file";
|
|
218
|
+
url?: string;
|
|
219
|
+
data?: string;
|
|
220
|
+
name?: string;
|
|
221
|
+
}) => Promise<Result>;
|
|
222
|
+
sendChannel: (params: {
|
|
223
|
+
type: "image" | "audio" | "video" | "file";
|
|
224
|
+
url?: string;
|
|
225
|
+
data?: string;
|
|
226
|
+
name?: string;
|
|
227
|
+
channelId?: string;
|
|
228
|
+
}) => Promise<Result>;
|
|
229
|
+
sendUser: (params: {
|
|
230
|
+
userId: string;
|
|
231
|
+
type: "image" | "audio" | "video" | "file";
|
|
232
|
+
url?: string;
|
|
233
|
+
data?: string;
|
|
234
|
+
name?: string;
|
|
235
|
+
}) => Promise<Result>;
|
|
236
|
+
}];
|
|
237
|
+
export declare const useHistory: <T extends EventKeys>(event: Events[T]) => readonly [{
|
|
238
|
+
list: (params?: {
|
|
239
|
+
channelId?: string;
|
|
240
|
+
limit?: number;
|
|
241
|
+
before?: string;
|
|
242
|
+
after?: string;
|
|
243
|
+
}) => Promise<Result>;
|
|
244
|
+
}];
|
|
245
|
+
export declare const usePermission: <T extends EventKeys>(event: Events[T]) => readonly [{
|
|
246
|
+
get: (params: {
|
|
247
|
+
userId: string;
|
|
248
|
+
channelId?: string;
|
|
249
|
+
}) => Promise<Result>;
|
|
250
|
+
set: (params: {
|
|
251
|
+
userId: string;
|
|
252
|
+
allow?: string;
|
|
253
|
+
deny?: string;
|
|
254
|
+
channelId?: string;
|
|
255
|
+
}) => Promise<Result>;
|
|
256
|
+
}];
|
|
257
|
+
export declare const useAnnounce: <T extends EventKeys>(event: Events[T]) => readonly [{
|
|
258
|
+
set: (params: {
|
|
259
|
+
messageId: string;
|
|
260
|
+
channelId?: string;
|
|
261
|
+
guildId?: string;
|
|
262
|
+
}) => Promise<Result>;
|
|
263
|
+
remove: (params?: {
|
|
264
|
+
messageId?: string;
|
|
265
|
+
guildId?: string;
|
|
266
|
+
}) => Promise<Result>;
|
|
267
|
+
}];
|
|
46
268
|
export {};
|