GuildBan
Signature
export declare class GuildBan extends DiscordBaseProperties
7Methods
7Properties
readonly guildId: string;id: string;createdTimestampGetterget createdTimestamp(): number;Create a timestamp for the current object.
createdAtGetterget createdAt(): Date;createdAt gets the creation Date instace of the current object.
readonly client: UsingClient;user: { id: string; username: string; discriminator: string; globalName: string | null; avatar: string | null; bot?: boolean | undefined; system?: boolean | undefined; mfaEnabled?: boolean | undefined; banner?: string | null | undefined; accentColor?: number | null | undefined; locale?: string | undefined; verified?: boolean | undefined; email?: string | null | undefined; flags?: UserFlags | undefined; premiumType?: UserPremiumType | undefined; publicFlags?: UserFlags | undefined; avatarDecorationData?: { asset: string; skuId: string; } | null | undefined; collectibles?: { nameplate?: APINameplateData | undefined; } | null | undefined; primaryGuild?: { identityGuildId: string | null; identityEnabled: boolean | null; tag: string | null; badge: string | null; } | null | undefined; };reason: string | null;Methods
constructorConstructorconstructor(client: UsingClient, data: APIBan | ActuallyBan, guildId: string);create(options?: BanOptions): Promise<void>;remove(reason?: string): Promise<undefined>;guild(mode?: 'rest' | 'flow'): Promise<GuildStructure<'cached' | 'api'>>;guild(mode: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;fetch(force?: boolean): Promise<GuildBanStructure>;toString(): `<@${string}>`;Returns a string representation of an object.
static methods({ client, guildId }: MethodContext<{ guildId: string;}>): { fetch: (userId: string, force?: boolean) => Promise<GuildBanStructure>; list: (query?: RESTGetAPIGuildBansQuery, force?: boolean) => Promise<GuildBanStructure[]>; create: (memberId: string, options?: Parameters<BanShorter["create"]>[2]) => Promise<void>; remove: (memberId: string, reason?: string) => Promise<undefined>; bulkCreate: (body: Parameters<BanShorter["bulkCreate"]>[1], reason?: string) => Promise<RESTPostAPIGuildBulkBanResult>;};