isLimited

open suspend override fun isLimited(limits: RateLimits, telegramId: Long, actionId: String?): Boolean

The function which will be called to check if the request limit is exceeded.

Return

True if the action is to be restricted

Parameters

limits

A class with specified restriction parameters.

telegramId

Telegram id of user.

actionId

Parameter with an action identifier in case it is not a general restriction mechanism.