seyfert
Version:
The most advanced framework for discord bots
27 lines (26 loc) • 1.49 kB
TypeScript
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 { 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, guildId: string);
create(body?: Parameters<BanShorter['create']>[2], reason?: string): Promise<void>;
remove(reason?: string): Promise<never>;
guild(force?: boolean): Promise<GuildStructure<'api'>>;
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<never>;
bulkCreate: (body: Parameters<BanShorter["bulkCreate"]>[1], reason?: string) => Promise<import("../types").RESTPostAPIGuildBulkBanResult>;
};
}