Class

GuildBan

Represents a ban in a guild.

Extends Base

Constructor

new GuildBan(client: Client, data: APIBan & { guild_id?: string }, guildId: string)
ParamTypeDescription
clientClient
dataAPIBan & { guild_id?: string }

API ban from GET /guilds/{id}/bans or gateway GUILD_BAN_ADD

guildIdstring

Properties

client: Client (readonly)
expiresAt: string | null (readonly)

ISO timestamp when a temporary ban expires. Null for permanent bans.

guildId: string (readonly)
reason: string | null (readonly)
user: User (readonly)

Methods

unban(): Promise<void>

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