-
-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Discord; | ||
|
||
/// <summary> | ||
/// Represents a result of a bulk ban. | ||
/// </summary> | ||
public readonly struct BulkBanResult | ||
{ | ||
/// <summary> | ||
/// Gets the collection of user IDs that were successfully banned. | ||
/// </summary> | ||
public IReadOnlyCollection<ulong> BannedUsers { get; } | ||
|
||
/// <summary> | ||
/// Gets the collection of user IDs that failed to be banned. | ||
/// </summary> | ||
public IReadOnlyCollection<ulong> FailedUsers { get; } | ||
|
||
internal BulkBanResult(IReadOnlyCollection<ulong> bannedUsers, IReadOnlyCollection<ulong> failedUsers) | ||
{ | ||
BannedUsers = bannedUsers; | ||
FailedUsers = failedUsers; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Discord.API; | ||
|
||
internal class BulkBanResult | ||
{ | ||
[JsonProperty("banned_users")] | ||
public ulong[] BannedUsers { get; set; } | ||
|
||
[JsonProperty("failed_users")] | ||
public ulong[] FailedUsers { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Discord.API.Rest; | ||
|
||
internal class BulkBanParams | ||
{ | ||
[JsonProperty("user_ids")] | ||
public ulong[] UserIds { get; set; } | ||
|
||
[JsonProperty("delete_message_seconds")] | ||
public Optional<int> DeleteMessageSeconds { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters