backport: Guild#{fetchEmbed,setEmbed} (#2778)

*  backport: Guild Embeds

* fix: Added missing return

* docs: Updated typings
This commit is contained in:
Kyra
2018-08-28 17:33:51 +02:00
committed by Isabella
parent 3345c77ce2
commit 091b4fc214
3 changed files with 52 additions and 0 deletions

7
typings/index.d.ts vendored
View File

@@ -533,6 +533,7 @@ declare module 'discord.js' {
public equals(guild: Guild): boolean;
public fetchAuditLogs(options?: GuildAuditLogsFetchOptions): Promise<GuildAuditLogs>;
public fetchBans(): Promise<Collection<Snowflake, User>>;
public fetchEmbed(): Promise<GuildEmbedData>;
public fetchInvites(): Promise<Collection<Snowflake, Invite>>;
public fetchMember(user: UserResolvable, cache?: boolean): Promise<GuildMember>;
public fetchMembers(query?: string, limit?: number): Promise<Guild>;
@@ -547,6 +548,7 @@ declare module 'discord.js' {
public setChannelPosition(channel: string | GuildChannel, position: number, relative?: boolean): Promise<Guild>;
public setChannelPositions(channelPositions: ChannelPosition[]): Promise<Guild>;
public setDefaultMessageNotification(defaultMessageNotifications: DefaultMessageNotifications, reason: string): Promise<Guild>;
public setEmbed(embed: GuildEmbedData, reason?: string): Promise<Guild>;
public setExcplicitContentFilter(explicitContentFilter: number, reason?: string): Promise<Guild>;
public setIcon(icon: Base64Resolvable, reason?: string): Promise<Guild>;
public setName(name: string, reason?: string): Promise<Guild>;
@@ -1787,6 +1789,11 @@ declare module 'discord.js' {
splash?: Base64Resolvable;
};
type GuildEmbedData = {
enabled: boolean;
channel: ChannelResolvable;
};
type GuildMemberEditData = {
nick?: string;
roles?: Collection<Snowflake, Role> | Role[] | Snowflake[];