seyfert
Version:
The most advanced framework for discord bots
29 lines (28 loc) • 1.66 kB
TypeScript
import type { ReturnCache } from '../cache';
import type { GuildBanStructure, GuildStructure } from '../client';
import type { UsingClient } from '../commands';
import { type MethodContext, type ObjectToLower } from '../common';
import type { BanShorter } from '../common/shorters/bans';
import type { ActuallyBan, APIBan, RESTGetAPIGuildBansQuery } from '../types';
import { DiscordBase } from './extra/DiscordBase';
export interface GuildBan extends DiscordBase, ObjectToLower<Omit<APIBan, 'id'>> {
}
export declare class GuildBan extends DiscordBase {
readonly guildId: string;
constructor(client: UsingClient, data: APIBan | ActuallyBan, guildId: string);
create(body?: Parameters<BanShorter['create']>[2], reason?: string): 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}>`;
static methods({ client, guildId }: MethodContext<{
guildId: string;
}>): {
fetch: (userId: string, force?: boolean) => Promise<GuildBanStructure>;
list: (query?: RESTGetAPIGuildBansQuery, force?: boolean) => Promise<GuildBanStructure[]>;
create: (memberId: string, body?: Parameters<BanShorter["create"]>[2], reason?: string) => Promise<void>;
remove: (memberId: string, reason?: string) => Promise<undefined>;
bulkCreate: (body: Parameters<BanShorter["bulkCreate"]>[1], reason?: string) => Promise<import("../types").RESTPostAPIGuildBulkBanResult>;
};
}