mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-24 06:13:39 +00:00
* nodejs: add tests to library * new tests * remove message splitting * fix race * docs * replace extract-zip with yauzl that it wraps (high severity issue) * fix ci tests * skip server tests on macos and win unless SMP_SERVER is set * fix win test * fix win test --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
30 lines
556 B
Markdown
30 lines
556 B
Markdown
[**simplex-chat**](README.md)
|
|
|
|
***
|
|
|
|
[simplex-chat](README.md) / [bot](Namespace.bot.md) / subscribeChatItems
|
|
|
|
# Function: subscribeChatItems()
|
|
|
|
> **subscribeChatItems**(`bot`, `onMessage`, `commands`): `void`
|
|
|
|
Defined in: [src/bot.ts:110](../bot.ts#L110)
|
|
|
|
## Parameters
|
|
|
|
### bot
|
|
|
|
[`ChatApi`](api.Class.ChatApi.md)
|
|
|
|
### onMessage
|
|
|
|
((`chatItem`, `content`, `chat`) => `void` \| `Promise`\<`void`\>) \| `undefined`
|
|
|
|
### commands
|
|
|
|
\{\[`key`: `string`\]: ((`chatItem`, `command`, `chat`) => `void` \| `Promise`\<`void`\>) \| `undefined`; \}
|
|
|
|
## Returns
|
|
|
|
`void`
|