*** id: 5da3414b-ff3c-4e34-aa22-4d5754004b3a title: setMemberState slug: /js/reference/chat/client/set-member-state max-toc-depth: 3 ---------------- * **setMemberState**(`params`): `Promise` Sets a state object for a member, for the specified channels. The previous state object will be completely replaced. ## Parameters Configuration object for setting member state Channels for which to set the state. Id of the member to affect. If not provided, defaults to the current member. The state to set. There are no requirements on the content of the state. ## Returns `Promise` ## Example ```js await chatClient.setMemberState({ channels: ["chan1", "chan2"], state: { online: true, typing: false, }, }); ```