ToggleCommunityMemberIsBanned class final
Bans or unbans a member of a community; requires can_ban_members administrator right in the community. A banned member is banned in all chats of the community. Administrators of the community can be banned only by the owner of the community and administrators, which can edit administrator rights of the member. If an owner of a chat in the community is banned, then the chat is removed from the community; in this case, can_edit_chat_list administrator right is also required
Returns Ok.
- Inheritance
-
- Object
- TdFunction<
Ok> - ToggleCommunityMemberIsBanned
Constructors
- ToggleCommunityMemberIsBanned({required int communityId, required MessageSender memberId, required bool isBanned})
-
Bans or unbans a member of a community; requires can_ban_members administrator right in the community. A banned member is banned in all chats of the community. Administrators of the community can be banned only by the owner of the community and administrators, which can edit administrator rights of the member. If an owner of a chat in the community is banned, then the chat is removed from the community; in this case, can_edit_chat_list administrator right is also required
const
Properties
- canBeCalledSynchronously → bool
-
Whether TDLib documents this request as callable through
td_execute.no setterinherited - communityId → int
-
Identifier of the community
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBanned → bool
-
Pass true to ban the member; pass false to unban the member
final
- memberId → MessageSender
-
Identifier of the member to ban or unban
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{int? communityId, MessageSender? memberId, bool? isBanned}) → ToggleCommunityMemberIsBanned -
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g.
field: () => nullto clear it. -
getConstructor(
) → String -
TDLib function name, e.g.
getMe.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
[dynamic extra]) → Map< String, dynamic> -
Converts this request to TDLib JSON, tagged with
extraif given.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CONSTRUCTOR → const String
- TDLib type name.