From 0f4d40cb9c10cb9cdba878aa9ee56dd435e3671c Mon Sep 17 00:00:00 2001 From: Piotr Suwala Date: Fri, 15 Dec 2023 08:45:57 +0100 Subject: [PATCH] feat(lib): add missing 'rason' parameter to User.setRestrictions --- lib/src/entities/user.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/entities/user.ts b/lib/src/entities/user.ts index 9b34a5d..b456163 100644 --- a/lib/src/entities/user.ts +++ b/lib/src/entities/user.ts @@ -149,7 +149,10 @@ export class User { * Moderation restrictions */ - async setRestrictions(channel: Channel, params: { ban?: boolean; mute?: boolean }) { + async setRestrictions( + channel: Channel, + params: { ban?: boolean; mute?: boolean; reason?: string } + ) { if (!(this.chat.sdk as any)._config.secretKey) throw "Moderation restrictions can only be set by clients initialized with a Secret Key." return this.chat.setRestrictions(this.id, channel.id, params)