guilded.ts
Version:
A powerful NPM module that allows you to easily interact with the Guilded API.
48 lines • 1.77 kB
TypeScript
import { BaseManager, FetchManyOptions, FetchOptions } from '../BaseManager';
import { Server } from '../../structures/server/Server';
import { ServerBan } from '../../structures/server/ServerBan';
import { Collection } from '@discordjs/collection';
import { ServerMember } from '../../structures/server/ServerMember';
/**
* The manager of bans that belong to a server.
* @example new ServerBanManager(server);
*/
export declare class ServerBanManager extends BaseManager<string, ServerBan> {
readonly server: Server;
/** @param server The server the bans belongs to. */
constructor(server: Server);
/**
* Fetch a ban from the server, or cache.
* @param ban The ban to fetch.
* @param options The options to fetch the ban with.
* @returns The fetched ban.
* @example bans.fetch(ban);
*/
fetch(ban: string | ServerBan, options?: FetchOptions): Promise<ServerBan>;
/**
* Fetch bans from thw server.
* @param options The options to fetch bans with.
* @returns The fetched bans.
* @example bans.fetch();
*/
fetch(options?: FetchManyOptions): Promise<Collection<string, ServerBan>>;
/** @ignore */
private fetchSingle;
/** @ignore */
private fetchMany;
/**
* Create a ban in the server.
* @param member The member the ban belongs to.
* @param reason The reason of the ban.
* @returns The created ban.
* @example bans.create(member);
*/
create(member: string | ServerMember, reason?: string): Promise<ServerBan>;
/**
* Remove a ban in the server.
* @param ban The ban to remove.
* @example bans.remove(ban);
*/
remove(ban: string | ServerBan): Promise<void>;
}
//# sourceMappingURL=ServerBanManager.d.ts.map