banUser

open fun banUser(userId: Long, deleteMessageDuration: Duration = Duration.ZERO, reason: String? = null): CompletableDeferred<NoResult>(source)
open fun banUser(userId: String, deleteMessageDuration: Duration = Duration.ZERO, reason: String? = null): CompletableDeferred<NoResult>(source)

Bans a user from the guild.

Return

A CompletableDeferred that completes when the ban is created.

Parameters

userId

The id of the user.

deleteMessageDuration

The duration of the messages to delete.

reason

The reason for the ban.


open fun banUser(userId: Long, reason: String? = null): CompletableDeferred<NoResult>(source)
open fun banUser(userId: String, reason: String? = null): CompletableDeferred<NoResult>(source)

Bans a user from the guild.

Return

A CompletableDeferred that completes when the ban is created.

Parameters

userId

The id of the user.

reason

The reason for the ban.


open fun banUser(user: User, deleteMessageDuration: Duration = Duration.ZERO, reason: String? = null): CompletableDeferred<NoResult>(source)

Bans a user from the guild.

Parameters

user

The user to ban.

deleteMessageDuration

The duration of the messages to delete.

reason

The reason for the ban.