Skip to content

export Class

MembersManager ​

extends ​

CachedManager<number, Member>

Constructor ​

ts
 new MembersManager( chat )
ParameterTypeDescription
chatBaseGroupChat

Properties ​

get cache : Collection<CachedManager.K, CachedManager.V> ​

get defaults : Function ​

get isJson : Function ​

get nest : Function ​

chat : BaseGroupChat ​

readonly client : Client ​

readonly default? : any ​

readonly options : any ​

Methods ​

_add( data, cache, param2 ) ​

ParameterTypeDescription
dataanyThe data to add to the cache manager.
cache = truebooleanPass True to cache the data.
param2 = {}anyAdditional data to pass.

Add data with cache check to the current manager.

Returns: any

asyncban( user_id, revoke_messages, until_date ) ​

ParameterTypeDescription
user_idnumber
revoke_messages?boolean
until_date?number

Returns: Promise<boolean>

asynccount( ) ​

Returns: Promise<number>

asyncfetch( user_id ) ​

ParameterTypeDescription
user_idnumber

Returns: Promise<false | Member>

asyncpromote( user_id, permissions ) ​

ParameterTypeDescription
user_idnumber
permissionsChatAdministratorRights

Returns: Promise<boolean>

asyncrestrict( user_id, permissions, use_independent_chat_permissions, until_date ) ​

ParameterTypeDescription
user_idnumber
permissionsChatPermissions
use_independent_chat_permissions?boolean
until_date?number

Returns: Promise<boolean>

asyncunban( user_id, only_if_banned ) ​

ParameterTypeDescription
user_idnumber
only_if_bannedboolean

Returns: Promise<boolean>

A modern, powerful library for building your Telegram bots, with seamless support for both JavaScript and Typescript.