fix(GuildAuditLogsEntry): correct mapped AuditLogChange objects

backport #10438 djs v14
This commit is contained in:
Elysia
2024-09-17 10:09:22 +07:00
parent e7ff84471c
commit 37e52486ff
2 changed files with 13 additions and 6 deletions

12
typings/index.d.ts vendored
View File

@@ -5197,11 +5197,13 @@ export interface AutoModerationActionMetadataOptions extends Partial<Omit<AutoMo
channel: GuildTextChannelResolvable | ThreadChannel;
}
export interface AuditLogChange {
key: APIAuditLogChange['key'];
old?: APIAuditLogChange['old_value'];
new?: APIAuditLogChange['new_value'];
}
export type AuditLogChange = {
[SourceElement in APIAuditLogChange as SourceElement['key']]: {
key: SourceElement['key'];
old?: SourceElement['old_value'];
new?: SourceElement['new_value'];
};
}[APIAuditLogChange['key']];
export type Awaitable<T> = T | PromiseLike<T>;