restrictChatMember method

Future<bool> restrictChatMember(
  1. ChatID chatId,
  2. int userId,
  3. ChatPermissions permissions, {
  4. int? untilDate,
})
inherited

Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights.

Pass True for all permissions to lift restrictions from a user.

Returns True on success.

Implementation

Future<bool> restrictChatMember(
  ChatID chatId,
  int userId,
  ChatPermissions permissions, {
  int? untilDate,
}) {
  return _client.apiCall(_token, 'restrictChatMember', {
    'chat_id': chatId,
    'user_id': userId,
    'permissions': permissions,
    'until_date': untilDate,
  });
}