From a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 23 Jan 2022 18:13:05 -0500 Subject: fix discord.js breaking changes, some other stuff --- src/lib/extensions/discord.js/BushGuildManager.ts | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/lib/extensions/discord.js/BushGuildManager.ts (limited to 'src/lib/extensions/discord.js/BushGuildManager.ts') diff --git a/src/lib/extensions/discord.js/BushGuildManager.ts b/src/lib/extensions/discord.js/BushGuildManager.ts new file mode 100644 index 0000000..41618e3 --- /dev/null +++ b/src/lib/extensions/discord.js/BushGuildManager.ts @@ -0,0 +1,35 @@ +import type { BushClient, BushGuild, BushGuildResolvable } from '#lib'; +import { + CachedManager, + GuildManager, + type Collection, + type FetchGuildOptions, + type FetchGuildsOptions, + type GuildCreateOptions, + type OAuth2Guild, + type Snowflake +} from 'discord.js'; +import { type RawGuildData } from 'discord.js/typings/rawDataTypes'; + +/** + * Manages API methods for Guilds and stores their cache. + */ +export declare class BushGuildManager extends CachedManager implements GuildManager { + public constructor(client: BushClient, iterable?: Iterable); + + /** + * Creates a guild. + * This is only available to bots in fewer than 10 guilds. + * @param name The name of the guild + * @param options Options for creating the guild + * @returns The guild that was created + */ + public create(name: string, options?: GuildCreateOptions): Promise; + + /** + * Obtains one or multiple guilds from Discord, or the guild cache if it's already available. + * @param options The guild's id or options + */ + public fetch(options: Snowflake | FetchGuildOptions): Promise; + public fetch(options?: FetchGuildsOptions): Promise>; +} -- cgit