Documentation - v0.27.0
    Preparing search index...
    • Restrict a user in a supergroup.

      Parameters

      • client: ITelegramClient
      • params: {
            chatId: InputPeerLike;
            restrictions: Omit<tl.RawChatBannedRights, "_" | "untilDate">;
            until?: number | Date;
            userId: InputPeerLike;
        }
        • chatId: InputPeerLike

          Chat ID

        • restrictions: Omit<tl.RawChatBannedRights, "_" | "untilDate">

          Restrictions for the user. Note that unlike Bot API, this object contains the restrictions, and not the permissions, i.e. passing sendMessages=true will disallow the user to send messages, and passing {} (empty object) will lift any restrictions

        • Optionaluntil?: number | Date

          Date when the user will be unrestricted. When number is passed, UNIX time in ms is expected. If this value is less than 30 seconds or more than 366 days in the future, user will be restricted forever.

          0, i.e. forever

        • userId: InputPeerLike

          User ID

      Returns Promise<void>