Method BulkBanMembersAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
BulkBanMembersAsync(IEnumerable<DiscordUser>, int, string?)
Bans multiple users from this guild.
public Task<DiscordBulkBan> BulkBanMembersAsync(IEnumerable<DiscordUser> users, int deleteMessageSeconds = 0, string? reason = null)
Parameters
users
IEnumerable<DiscordUser>Collection of users to ban
deleteMessageSeconds
intTimespan in seconds to delete messages from the banned users
reason
stringReason for audit logs.
Returns
- Task<DiscordBulkBan>
Response contains a which users were banned and which were not.
BulkBanMembersAsync(IEnumerable<ulong>, int, string?)
Bans multiple users from this guild by their id
public Task<DiscordBulkBan> BulkBanMembersAsync(IEnumerable<ulong> userIds, int deleteMessageSeconds = 0, string? reason = null)
Parameters
userIds
IEnumerable<ulong>Collection of user ids to ban
deleteMessageSeconds
intTimespan in seconds to delete messages from the banned users
reason
stringReason for audit logs.
Returns
- Task<DiscordBulkBan>
Response contains a which users were banned and which were not.