# Mute and unmute members

**URL:** <https://forum.social.plus/t/mute-and-unmute-members/1244>\
**Category:** TS SDK\
**Created:** [April 8, 2024, 7:48pm UTC](https://forum.social.plus/t/mute-and-unmute-members/1244 "2024-04-08T19:48:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mlemos](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mlemos](https://forum.social.plus/u/mlemos)\
**Post date:** [April 8, 2024, 7:48pm UTC](https://forum.social.plus/t/mute-and-unmute-members/1244/1 "2024-04-08T19:48:01Z")

</div>

There is no example available for mute and unmute members in typescript. It’s possible? How I do?

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [April 9, 2024, 5:01am UTC](https://forum.social.plus/t/mute-and-unmute-members/1244/2 "2024-04-09T05:01:32Z")

</div>

@mlemos For the question you asked, we recommend checking the following link: [https://docs.amity.co/amity-sdk/chat/channels/query-members](https://docs.amity.co/amity-sdk/chat/channels/query-members)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/amity/original/1X/bc80197b019e0b40de672cbe8b418883db5cf4ed.jpeg)

---

<div class="post-metadata">

**Author:** ![mlemos](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mlemos](https://forum.social.plus/u/mlemos)\
**Post date:** [April 9, 2024, 6:13pm UTC](https://forum.social.plus/t/mute-and-unmute-members/1244/3 "2024-04-09T18:13:25Z")

</div>

OK. Regarding the search for silenced users, I already managed to solve it. But now I’m looking for how to mute and unmute member in typescript. There is no example in the documentation, just this: “Supported ✅ (please wait while we prepare a real example!)”

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [April 10, 2024, 9:58am UTC](https://forum.social.plus/t/mute-and-unmute-members/1244/4 "2024-04-10T09:58:39Z")

</div>

@mlemos Thank you for letting us know about this. I have submitted your request to the relevant team, and we will inform you once there is an update on this matter.

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [April 11, 2024, 10:42am UTC](https://forum.social.plus/t/mute-and-unmute-members/1244/5 "2024-04-11T10:42:31Z")

</div>

Please refer to the sample code below:

**Mute:**

```auto
import { ChannelRepository } from '@amityco/ts-sdk';

async function muteChannelMembers() {
  /*
   * The default mute period is set to forever or until unmuted
   */
  const didMute = await ChannelRepository.Moderation.muteMembers('channelId', [
    'userId1',
    'userId2',
  ]);

  const FIVE_MINUTES = 5 * 60 * 1000;
  /*
   * This value can be overridden by passing a specific amount of time (in
   * milliseconds) as the
   * second variable
   */
  const didMuteForFiveMinutes = await ChannelRepository.Moderation.muteMembers(
    'channelId',
    ['userId1', 'userId2'],
    FIVE_MINUTES,
  );

  return [didMute, didMuteForFiveMinutes];
}

```

**Unmute:**

```auto
import { ChannelRepository } from '@amityco/ts-sdk';

async function unmuteChannelMembers() {
  const didUnmute = await ChannelRepository.Moderation.unmuteMembers('channelId', [
    'userId1',
    'userId2',
  ]);

  return didUnmute;
}

```
