/ SDKs / JavaScript
SDKs
Chat SDKs JavaScript v4
Chat SDKs JavaScript
Chat SDKs
JavaScript
Version 4

Register and remove operators

Copy link

Operators are users who can delete any messages and view all messages in the channel without any filtering or throttling. Operators can moderate channels by muting or banning users as well as freezing channels.

You can register users as operators by providing their user IDs in OPERATOR_USER_IDS.

JavaScriptTypeScript
await channel.addOperators(OPERATOR_USER_IDS);

You can remove the users from being operators but leave them in the channel using the following code.

JavaScriptTypeScript
await channel.removeOperators(OPERATOR_USER_IDS);