alemonjs 2.1.54 → 2.1.55

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.
Files changed (83) hide show
  1. package/lib/app/event-format.js +1 -1
  2. package/package.json +1 -1
  3. package/lib/app/define/define-children.d.ts +0 -8
  4. package/lib/app/define/define-children.js +0 -25
  5. package/lib/app/define/define-middleware.d.ts +0 -2
  6. package/lib/app/define/define-middleware.js +0 -8
  7. package/lib/app/define/define-platform.d.ts +0 -13
  8. package/lib/app/define/define-platform.js +0 -40
  9. package/lib/app/define/define-response.d.ts +0 -2
  10. package/lib/app/define/define-response.js +0 -8
  11. package/lib/app/define/define-router.d.ts +0 -17
  12. package/lib/app/define/define-router.js +0 -34
  13. package/lib/app/event/event-group.d.ts +0 -9
  14. package/lib/app/event/event-group.js +0 -29
  15. package/lib/app/event/event-middleware.d.ts +0 -23
  16. package/lib/app/event/event-middleware.js +0 -44
  17. package/lib/app/event/event-response.d.ts +0 -16
  18. package/lib/app/event/event-response.js +0 -23
  19. package/lib/app/event/event-selects.d.ts +0 -13
  20. package/lib/app/event/event-selects.js +0 -15
  21. package/lib/app/event-processor/event-processor-callHandler.d.ts +0 -1
  22. package/lib/app/event-processor/event-processor-callHandler.js +0 -43
  23. package/lib/app/event-processor/event-processor-cycle.d.ts +0 -14
  24. package/lib/app/event-processor/event-processor-cycle.js +0 -97
  25. package/lib/app/event-processor/event-processor-cycleFiles.d.ts +0 -11
  26. package/lib/app/event-processor/event-processor-cycleFiles.js +0 -147
  27. package/lib/app/event-processor/event-processor-cycleRoute.d.ts +0 -10
  28. package/lib/app/event-processor/event-processor-cycleRoute.js +0 -133
  29. package/lib/app/event-processor/event-processor-event.d.ts +0 -24
  30. package/lib/app/event-processor/event-processor-event.js +0 -41
  31. package/lib/app/event-processor/event-processor-middleware.d.ts +0 -14
  32. package/lib/app/event-processor/event-processor-middleware.js +0 -31
  33. package/lib/app/event-processor/event-processor-subscribe.d.ts +0 -35
  34. package/lib/app/event-processor/event-processor-subscribe.js +0 -115
  35. package/lib/app/event-processor/event-processor.d.ts +0 -17
  36. package/lib/app/event-processor/event-processor.js +0 -207
  37. package/lib/app/hook-use/hook-use-api.d.ts +0 -6
  38. package/lib/app/hook-use/hook-use-api.js +0 -22
  39. package/lib/app/hook-use/hook-use-channel.d.ts +0 -8
  40. package/lib/app/hook-use/hook-use-channel.js +0 -33
  41. package/lib/app/hook-use/hook-use-client.d.ts +0 -7
  42. package/lib/app/hook-use/hook-use-client.js +0 -27
  43. package/lib/app/hook-use/hook-use-me.d.ts +0 -8
  44. package/lib/app/hook-use/hook-use-me.js +0 -45
  45. package/lib/app/hook-use/hook-use-menber.d.ts +0 -8
  46. package/lib/app/hook-use/hook-use-menber.js +0 -59
  47. package/lib/app/hook-use/hook-use-mention.d.ts +0 -23
  48. package/lib/app/hook-use/hook-use-mention.js +0 -105
  49. package/lib/app/hook-use/hook-use-message.d.ts +0 -29
  50. package/lib/app/hook-use/hook-use-message.js +0 -88
  51. package/lib/app/hook-use/hook-use-state.d.ts +0 -30
  52. package/lib/app/hook-use/hook-use-state.js +0 -101
  53. package/lib/app/hook-use/hook-use-subscribe.d.ts +0 -46
  54. package/lib/app/hook-use/hook-use-subscribe.js +0 -143
  55. package/lib/app/hook-use-api.d.ts +0 -268
  56. package/lib/app/hook-use-api.js +0 -1213
  57. package/lib/app/hook-use-state.d.ts +0 -3
  58. package/lib/app/hook-use-state.js +0 -68
  59. package/lib/app/hook-use-subscribe.d.ts +0 -73
  60. package/lib/app/hook-use-subscribe.js +0 -112
  61. package/lib/app/message/message-api.d.ts +0 -69
  62. package/lib/app/message/message-api.js +0 -105
  63. package/lib/app/message/message-format-old.d.ts +0 -143
  64. package/lib/app/message/message-format-old.js +0 -359
  65. package/lib/app/message/message-format.d.ts +0 -215
  66. package/lib/app/message/message-format.js +0 -382
  67. package/lib/app/message-controller.d.ts +0 -25
  68. package/lib/app/message-controller.js +0 -66
  69. package/lib/app/message-format.old.d.ts +0 -50
  70. package/lib/app/message-format.old.js +0 -217
  71. package/lib/cbp/processor/handle.d.ts +0 -3
  72. package/lib/cbp/processor/handle.js +0 -32
  73. package/lib/jsx/index.d.ts +0 -105
  74. package/lib/jsx/index.js +0 -211
  75. package/lib/jsx/jsx-dev-runtime.d.ts +0 -2
  76. package/lib/jsx/jsx-dev-runtime.js +0 -1
  77. package/lib/jsx/jsx-runtime.d.ts +0 -18
  78. package/lib/jsx/jsx-runtime.js +0 -24
  79. package/lib/process/client.js +0 -109
  80. package/lib/store/SinglyLinkedList.d.ts +0 -22
  81. package/lib/store/SinglyLinkedList.js +0 -97
  82. package/lib/store/store.d.ts +0 -127
  83. package/lib/store/store.js +0 -443
@@ -1,30 +0,0 @@
1
- /**
2
- * 获取指定功能是启动还是关闭
3
- * ***
4
- * 当有其他地方调用时,
5
- * 默认值以第一次调用为准
6
- * ***
7
- * 功能名相同时,
8
- * 将会同时改变,因为状态是全局的
9
- * @param name 功能名
10
- * @param defaultValue 默认值,默认为 true
11
- * @deprecated 废弃。指令管理可直接配置禁用正则
12
- * @throws {Error} - 如果 name 不是字符串,或者 defaultValue 不是布尔值,抛出错误。
13
- */
14
- export declare const useState: <T extends string>(name: T, defaultValue?: boolean) => [boolean, (value: boolean) => void];
15
- /**
16
- * 订阅状态变化
17
- * @param name 功能名
18
- * @param callback 回调函数
19
- * @deprecated 废弃。指令管理可直接配置禁用正则
20
- * @throws {Error} - 如果 callback 无效,抛出错误。
21
- */
22
- export declare const onState: <T extends string>(name: T, callback: (value: boolean) => void) => void;
23
- /**
24
- * 取消订阅状态变化
25
- * @param name 功能名
26
- * @param callback 回调函数
27
- * @deprecated 废弃。指令管理可直接配置禁用正则
28
- * @throws {Error} - 如果 callback 无效,抛出错误。
29
- */
30
- export declare const unState: <T extends string>(name: T, callback: (value: boolean) => void) => void;
@@ -1,101 +0,0 @@
1
- import { getConfig } from '../../core/config.js';
2
- import { ResultCode } from '../../core/variable.js';
3
- import { State, StateSubscribe } from '../../store/store.js';
4
-
5
- /**
6
- * 获取指定功能是启动还是关闭
7
- * ***
8
- * 当有其他地方调用时,
9
- * 默认值以第一次调用为准
10
- * ***
11
- * 功能名相同时,
12
- * 将会同时改变,因为状态是全局的
13
- * @param name 功能名
14
- * @param defaultValue 默认值,默认为 true
15
- * @deprecated 废弃。指令管理可直接配置禁用正则
16
- * @throws {Error} - 如果 name 不是字符串,或者 defaultValue 不是布尔值,抛出错误。
17
- */
18
- const useState = (name, defaultValue = true) => {
19
- // 检查参数
20
- if (typeof name !== 'string') {
21
- logger.error({
22
- code: ResultCode.FailParams,
23
- message: 'Invalid name: name must be a string',
24
- data: null
25
- });
26
- throw new Error('Invalid name: name must be a string');
27
- }
28
- if (typeof defaultValue !== 'boolean') {
29
- logger.error({
30
- code: ResultCode.FailParams,
31
- message: 'Invalid defaultValue: defaultValue must be a boolean',
32
- data: null
33
- });
34
- throw new Error('Invalid defaultValue: defaultValue must be a boolean');
35
- }
36
- const state = new State(name, defaultValue);
37
- // 设置值的函数
38
- const setValue = (value) => {
39
- if (state.value === value) {
40
- return;
41
- }
42
- state.value = value;
43
- // 更新config
44
- const cfg = getConfig();
45
- cfg.value.core ??= {};
46
- cfg.value.core.state ??= [];
47
- const cfgState = cfg.value.core.state;
48
- const exists = cfgState.includes(name);
49
- if (value && exists) {
50
- // 启用:从禁用列表中移除
51
- cfg.value.core.state = cfg.value.core.state.filter((i) => i !== name);
52
- }
53
- else if (!value && !exists) {
54
- // 禁用:添加到禁用列表
55
- cfg.value.core.state.push(name);
56
- }
57
- cfg.saveValue(cfg.value);
58
- };
59
- return [state.value, setValue];
60
- };
61
- /**
62
- * 订阅状态变化
63
- * @param name 功能名
64
- * @param callback 回调函数
65
- * @deprecated 废弃。指令管理可直接配置禁用正则
66
- * @throws {Error} - 如果 callback 无效,抛出错误。
67
- */
68
- const onState = (name, callback) => {
69
- if (typeof callback !== 'function') {
70
- logger.error({
71
- code: ResultCode.FailParams,
72
- message: 'Callback must be a function',
73
- data: null
74
- });
75
- throw new Error('Callback must be a function');
76
- }
77
- const sub = new StateSubscribe(name);
78
- sub.on(callback);
79
- };
80
- /**
81
- * 取消订阅状态变化
82
- * @param name 功能名
83
- * @param callback 回调函数
84
- * @deprecated 废弃。指令管理可直接配置禁用正则
85
- * @throws {Error} - 如果 callback 无效,抛出错误。
86
- */
87
- const unState = (name, callback) => {
88
- if (typeof callback !== 'function') {
89
- logger.error({
90
- code: ResultCode.FailParams,
91
- message: 'Callback must be a function',
92
- data: null
93
- });
94
- throw new Error('Callback must be a function');
95
- }
96
- // 取消订阅
97
- const sub = new StateSubscribe(name);
98
- sub.un(callback);
99
- };
100
-
101
- export { onState, unState, useState };
@@ -1,46 +0,0 @@
1
- import { EventCycleEnum, Current, Events, EventKeys } from '../../types';
2
- /**
3
- * 订阅事件
4
- * @param event
5
- * @param select
6
- * @returns
7
- */
8
- export declare const useSubscribe: <T extends EventKeys>(event: Events[T], selects: T | T[]) => readonly [{
9
- create: (callback: Current<T>, keys: (keyof Events[T])[]) => {
10
- selects: T[];
11
- choose: EventCycleEnum;
12
- id: string;
13
- };
14
- mount: (callback: Current<T>, keys: (keyof Events[T])[]) => {
15
- selects: T[];
16
- choose: EventCycleEnum;
17
- id: string;
18
- };
19
- unmount: (callback: Current<T>, keys: (keyof Events[T])[]) => {
20
- selects: T[];
21
- choose: EventCycleEnum;
22
- id: string;
23
- };
24
- cancel: (value: {
25
- id: string;
26
- selects: T[];
27
- choose: EventCycleEnum;
28
- }) => void;
29
- }];
30
- /**
31
- * 使用观察者模式订阅事件
32
- * @param event
33
- * @param selects
34
- * @returns
35
- * 废弃,请使用 useSubscribe
36
- * @deprecated
37
- */
38
- export declare const useObserver: <T extends EventKeys>(event: Events[T], selects: T | T[]) => readonly [(callback: Current<T>, keys: (keyof Events[T])[]) => {
39
- selects: T[];
40
- choose: EventCycleEnum;
41
- id: string;
42
- }, (value: {
43
- id: string;
44
- selects: T[];
45
- choose: EventCycleEnum;
46
- }) => void];
@@ -1,143 +0,0 @@
1
- import { ResultCode } from '../../core/variable.js';
2
- import { SubscribeList } from '../../store/store.js';
3
- import { SubscribeStatus } from '../config.js';
4
-
5
- /**
6
- * 订阅事件
7
- * @param event
8
- * @param select
9
- * @returns
10
- */
11
- const useSubscribe = (event, selects) => {
12
- // 检查参数
13
- if (typeof event !== 'object') {
14
- logger.error({
15
- code: ResultCode.FailParams,
16
- message: 'event is not object',
17
- data: null
18
- });
19
- throw new Error('event is not object');
20
- }
21
- if (typeof selects !== 'string' && !Array.isArray(selects)) {
22
- logger.error({
23
- code: ResultCode.FailParams,
24
- message: 'select is not string or array',
25
- data: null
26
- });
27
- throw new Error('select is not string or array');
28
- }
29
- /**
30
- * 运行订阅
31
- * @param callback
32
- * @param keys
33
- * @param choose
34
- * @returns
35
- */
36
- const register = (callback, keys, choose) => {
37
- const curSelects = Array.isArray(selects) ? selects : [selects];
38
- // 分配id
39
- const ID = Date.now().toString(36) + Math.random().toString(36).substring(2, 15);
40
- // 没有选择任何 key,无法绑定订阅
41
- if (keys.length === 0) {
42
- logger.warn({
43
- code: ResultCode.FailParams,
44
- message: 'subscribe keys is empty',
45
- data: null
46
- });
47
- return { selects: curSelects, choose, id: ID };
48
- }
49
- // 创建 订阅 列表
50
- for (const select of curSelects) {
51
- const subList = new SubscribeList(choose, select);
52
- // 只能选择基础数据类型的key
53
- const values = {};
54
- for (const key of keys) {
55
- if (typeof key === 'string' && (typeof event[key] === 'string' || typeof event[key] === 'number' || typeof event[key] === 'boolean')) {
56
- values[key] = event[key];
57
- }
58
- else {
59
- logger.warn({
60
- code: ResultCode.FailParams,
61
- message: `Invalid key: ${key?.toString()} must be a string, number or boolean`,
62
- data: null
63
- });
64
- }
65
- }
66
- subList.value.append({
67
- choose,
68
- selects: curSelects,
69
- keys: values,
70
- current: callback,
71
- status: SubscribeStatus.active,
72
- id: ID
73
- });
74
- }
75
- return {
76
- selects: curSelects,
77
- choose,
78
- id: ID
79
- };
80
- };
81
- /**
82
- * res 创建时 运行订阅
83
- * @param callback
84
- * @param keys
85
- */
86
- const create = (callback, keys) => {
87
- return register(callback, keys, 'create');
88
- };
89
- /**
90
- * res 挂载时 运行订阅
91
- * @param callback
92
- * @param keys
93
- */
94
- const mountBefore = (callback, keys) => {
95
- return register(callback, keys, 'mount');
96
- };
97
- /**
98
- * res 卸载时 运行订阅
99
- * @param callback
100
- * @param keys
101
- */
102
- const unmount = (callback, keys) => {
103
- return register(callback, keys, 'unmount');
104
- };
105
- /**
106
- * 清除订阅
107
- * @param id
108
- */
109
- const cancel = (value) => {
110
- const selects = value.selects;
111
- const ID = value.id; // 订阅的 ID
112
- for (const select of selects) {
113
- const subList = new SubscribeList(value.choose, select);
114
- subList.value.forEach(node => {
115
- if (node.data.id === ID) {
116
- node.data.status = SubscribeStatus.paused; // 标记为已暂停
117
- return true; // break
118
- }
119
- });
120
- }
121
- };
122
- const subscribe = {
123
- create,
124
- mount: mountBefore,
125
- unmount,
126
- cancel
127
- };
128
- return [subscribe];
129
- };
130
- /**
131
- * 使用观察者模式订阅事件
132
- * @param event
133
- * @param selects
134
- * @returns
135
- * 废弃,请使用 useSubscribe
136
- * @deprecated
137
- */
138
- const useObserver = (event, selects) => {
139
- const [subscribe] = useSubscribe(event, selects);
140
- return [subscribe.mount, subscribe.cancel];
141
- };
142
-
143
- export { useObserver, useSubscribe };
@@ -1,268 +0,0 @@
1
- import { DataEnums, EventKeys, Events, User, GuildInfo, ChannelInfo, MemberInfo, RoleInfo, PaginationParams, PaginatedResult } from '../types';
2
- import { Result } from '../core/utils';
3
- import { Format } from './message-format';
4
- type Options = {
5
- UserId?: string;
6
- UserKey?: string;
7
- UserName?: string;
8
- IsMaster?: boolean;
9
- IsBot?: boolean;
10
- };
11
- export declare const useMention: <T extends EventKeys>(event: Events[T]) => [{
12
- find: (options?: Options) => Promise<Result<User[]> & {
13
- count: number;
14
- }>;
15
- findOne: (options?: Options) => Promise<Result<User | null> & {
16
- count: number;
17
- }>;
18
- }];
19
- export declare const useMessage: <T extends EventKeys>(event?: Events[T]) => readonly [{
20
- send(params?: {
21
- format: Format | DataEnums[];
22
- replyId?: string;
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>;
40
- }];
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>>;
46
- information: (params: {
47
- userId: string;
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>;
116
- }];
117
- export declare const useSend: <T extends EventKeys>(event?: Events[T]) => (...val: DataEnums[]) => Promise<Result[]>;
118
- export declare const useSends: <T extends EventKeys>(event?: Events[T]) => readonly [(params?: DataEnums[] | {
119
- format: Format | DataEnums[];
120
- replyId?: string;
121
- }) => Promise<Result[]>];
122
- export declare const unChildren: (name?: string) => void;
123
- export declare const onSelects: <T extends EventKeys[] | EventKeys>(values: T) => T;
124
- export declare const createSelects: <T extends EventKeys[] | EventKeys>(values: T) => T;
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
- }];
191
- export declare const useMe: () => readonly [{
192
- info: () => Promise<Result<User | null>>;
193
- guilds: () => Promise<Result<GuildInfo[]>>;
194
- threads: () => Promise<Result<User | null>>;
195
- friends: () => Promise<Result<User | null>>;
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
- }];
268
- export {};