feat(llc): deprecate channel.banUser in favor of channel.banMember.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -1296,9 +1296,17 @@ class Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Bans the user with given [userID] from the channel.
|
/// Bans the user with given [userID] from the channel.
|
||||||
|
@Deprecated("Use 'banMember' instead")
|
||||||
Future<EmptyResponse> banUser(
|
Future<EmptyResponse> banUser(
|
||||||
String userID,
|
String userID,
|
||||||
Map<String, dynamic> options,
|
Map<String, dynamic> options,
|
||||||
|
) =>
|
||||||
|
banMember(userID, options);
|
||||||
|
|
||||||
|
/// Bans the member with given [userID] from the channel.
|
||||||
|
Future<EmptyResponse> banMember(
|
||||||
|
String userID,
|
||||||
|
Map<String, dynamic> options,
|
||||||
) async {
|
) async {
|
||||||
_checkInitialized();
|
_checkInitialized();
|
||||||
final opts = Map<String, dynamic>.from(options)
|
final opts = Map<String, dynamic>.from(options)
|
||||||
@@ -1310,7 +1318,11 @@ class Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Remove the ban for the user with given [userID] in the channel.
|
/// Remove the ban for the user with given [userID] in the channel.
|
||||||
Future<EmptyResponse> unbanUser(String userID) async {
|
@Deprecated("Use 'unbanMember' instead")
|
||||||
|
Future<EmptyResponse> unbanUser(String userID) => unbanMember(userID);
|
||||||
|
|
||||||
|
/// Remove the ban for the member with given [userID] in the channel.
|
||||||
|
Future<EmptyResponse> unbanMember(String userID) async {
|
||||||
_checkInitialized();
|
_checkInitialized();
|
||||||
return _client.unbanUser(userID, {
|
return _client.unbanUser(userID, {
|
||||||
'type': type,
|
'type': type,
|
||||||
|
|||||||
Reference in New Issue
Block a user