BanShorter

Signature

export declare class BanShorter extends BaseShorter

Properties

0

No properties.

Methods

5

Methods

remove(guildId: string, memberId: string, reason?: string): Promise<undefined>;

Unbans a member from the guild.

Parameters
guildId
The ID of the guild.
memberId
The ID of the member to unban.
reason
The reason for unbanning the member.
create(guildId: string, memberId: string, options?: BanOptions): Promise<void>;

Bans a member from the guild.

Parameters
guildId
The ID of the guild.
memberId
The ID of the member to ban.
options
The options for banning the member.
fetch(guildId: string, userId: string, force?: boolean): Promise<GuildBanStructure>;

Fetches a ban from the guild.

Parameters
guildId
The ID of the guild.
userId
The ID of the user to fetch.
force
Whether to force fetching the ban from the API even if it exists in the cache.
Returns

A Promise that resolves to the fetched ban.

list(guildId: string, query?: RESTGetAPIGuildBansQuery, force?: boolean): Promise<GuildBanStructure[]>;

Lists bans in the guild based on the provided query.

Parameters
guildId
The ID of the guild.
query
The query parameters for listing bans.
force
Whether to force listing bans from the API even if they exist in the cache.
Returns

A Promise that resolves to an array of listed bans.