Table of Contents

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 int

Timespan in seconds to delete messages from the banned users

reason string

Reason 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 int

Timespan in seconds to delete messages from the banned users

reason string

Reason for audit logs.

Returns

Task<DiscordBulkBan>

Response contains a which users were banned and which were not.