feat: GuildEmbed support (#2766)

* feat: Guild embed support

* docs: Fixed setEmbed's reason argument not being optional

* fix: Guild#setEmbed should return the guild itself for consistency

* docs: Updated typings

* fix: Requested change
This commit is contained in:
Kyra
2018-08-21 10:40:47 +02:00
committed by SpaceEEC
parent 0401b8ad77
commit 5787deef26
2 changed files with 46 additions and 0 deletions

7
typings/index.d.ts vendored
View File

@@ -395,6 +395,7 @@ declare module 'discord.js' {
public fetchVanityCode(): Promise<string>;
public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
public fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
public fetchEmbed(): Promise<GuildEmbedData>;
public iconURL(options?: AvatarOptions): string;
public leave(): Promise<Guild>;
public member(user: UserResolvable): GuildMember;
@@ -410,6 +411,7 @@ declare module 'discord.js' {
public setSplash(splash: Base64Resolvable, reason?: string): Promise<Guild>;
public setSystemChannel(systemChannel: ChannelResolvable, reason?: string): Promise<Guild>;
public setVerificationLevel(verificationLevel: number, reason?: string): Promise<Guild>;
public setEmbed(embed: GuildEmbedData, reason?: string): Promise<Guild>;
public splashURL(options?: AvatarOptions): string;
public toJSON(): object;
public toString(): string;
@@ -1698,6 +1700,11 @@ declare module 'discord.js' {
splash?: Base64Resolvable;
};
type GuildEmbedData = {
enabled: boolean;
channel?: GuildChannelResolvable;
};
type GuildFeatures = 'INVITE_SPLASH'
| 'MORE_EMOJI'
| 'VERIFIED'