GuildBan

class GuildBan()

A guild ban record containing the banned user and the audit-log reason, when available.

exported from lib.weeble.d

Properties

GuildBan.guildId

type: readonly string

Guild ID this ban applies to.

GuildBan.reason

type: readonly string | null

Reason for the ban, or null when Discord did not provide one.

GuildBan.user

type: readonly User

The banned user.

Methods

async GuildBan.delete(reason: string) Promise<void>

Unban the user.

Parameters:
  • reason — – Audit-log reason for removing the ban.

Returns:

A promise that resolves when the unban is complete.

async GuildBan.fetchGuild() Promise<Guild>

Fetch the guild for this ban from Discord.

Returns:

The guild this ban belongs to.