Class

GuildBan

Represents a ban in a guild.

Extends Base

Constructor

new GuildBan(client: Client, data: APIBan & { guild_id?: string }, guildId: string)
client
Client
data
APIBan & { guild_id?: string }API ban from GET /guilds/{id}/bans or gateway GUILD_BAN_ADD
guildId
string

Properties

NameTypeDescription
clientread-onlyClient
expiresAtread-onlyDate | nullWhen a temporary ban expires. Null for permanent bans.
guildIdread-onlystring
reasonread-onlystring | null
userread-onlyUser

Methods

.unban()

Promise<void>

Remove this ban (unban the user). Requires Ban Members permission.

await guildBan.unban();