mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-01 02:09:32 +00:00
simplify
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
# Type Alias: EventSubscriberFunc\<K\>
|
||||
|
||||
> **EventSubscriberFunc**\<`K`\> = (`event`) => `void` \| `Promise`\<`void`\>
|
||||
> **EventSubscriberFunc**\<`K`\> = (`event`, `chat`) => `void` \| `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:50](../src/api.ts#L50)
|
||||
|
||||
@@ -22,6 +22,10 @@ Defined in: [src/api.ts:50](../src/api.ts#L50)
|
||||
|
||||
`ChatEvent` & `object`
|
||||
|
||||
### chat
|
||||
|
||||
[`ChatApi`](api.Class.ChatApi.md)
|
||||
|
||||
## Returns
|
||||
|
||||
`void` \| `Promise`\<`void`\>
|
||||
|
||||
@@ -18,7 +18,7 @@ Defined in: [src/bot.ts:108](../src/bot.ts#L108)
|
||||
|
||||
### onMessage
|
||||
|
||||
((`chatItem`, `content`) => `void` \| `Promise`\<`void`\>) \| `undefined`
|
||||
((`chatItem`, `content`, `chat`) => `void` \| `Promise`\<`void`\>) \| `undefined`
|
||||
|
||||
### commands
|
||||
|
||||
|
||||
@@ -34,13 +34,13 @@ Defined in: [src/bot.ts:42](../src/bot.ts#L42)
|
||||
|
||||
#### Index Signature
|
||||
|
||||
\[`key`: `string`\]: ((`chatItem`, `command`) => `void` \| `Promise`\<`void`\>) \| `undefined`
|
||||
\[`key`: `string`\]: ((`chatItem`, `command`, `chat`) => `void` \| `Promise`\<`void`\>) \| `undefined`
|
||||
|
||||
***
|
||||
|
||||
### onMessage?
|
||||
|
||||
> `optional` **onMessage?**: (`chatItem`, `content`) => `void` \| `Promise`\<`void`\>
|
||||
> `optional` **onMessage?**: (`chatItem`, `content`, `chat`) => `void` \| `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/bot.ts:40](../src/bot.ts#L40)
|
||||
|
||||
@@ -54,6 +54,10 @@ Defined in: [src/bot.ts:40](../src/bot.ts#L40)
|
||||
|
||||
`MsgContent`
|
||||
|
||||
##### chat
|
||||
|
||||
[`ChatApi`](api.Class.ChatApi.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`void` \| `Promise`\<`void`\>
|
||||
|
||||
Reference in New Issue
Block a user