feat/fix(GuildAuditLogs): handle new event types (#3602)

* feat/fix(GuildAuditLogs): handle new event types

* fix(GuildAuditLogsEntry): coerce to numbers, simplify extra for deleted entities

* fix(GuildAuditLogsEntry): do not revert 'type' extra
This commit is contained in:
SpaceEEC
2020-02-24 18:16:20 +01:00
committed by GitHub
parent 0a1b9a5285
commit a69ebbe9d9
2 changed files with 88 additions and 26 deletions

5
typings/index.d.ts vendored
View File

@@ -765,6 +765,7 @@ declare module 'discord.js' {
export class GuildAuditLogs {
constructor(guild: Guild, data: object);
private webhooks: Collection<Snowflake, Webhook>;
private integrations: Collection<Snowflake, Integration>;
public entries: Collection<Snowflake, GuildAuditLogsEntry>;
@@ -788,7 +789,7 @@ declare module 'discord.js' {
public extra: object | Role | GuildMember | null;
public id: Snowflake;
public reason: string | null;
public target: Guild | User | Role | GuildEmoji | Invite | Webhook;
public target: Guild | User | Role | GuildEmoji | Invite | Webhook | Integration | null;
public targetType: GuildAuditLogsTarget;
public toJSON(): object;
}
@@ -2258,6 +2259,8 @@ declare module 'discord.js' {
WEBHOOK?: string;
EMOJI?: string;
MESSAGE?: string;
INTEGRATION?: string;
UNKNOWN?: string;
}
type GuildChannelResolvable = Snowflake | GuildChannel;