Skip to content

Commit

Permalink
Remove duplicate types
Browse files Browse the repository at this point in the history
Signed-off-by: cobalt <[email protected]>
  • Loading branch information
cobaltt7 committed Nov 17, 2024
1 parent f660c84 commit 1217d9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/discord.js/src/structures/GuildAuditLogsEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const Partials = require('../util/Partials');
const { flatten } = require('../util/Util');

const Targets = {
All: 'All',
Guild: 'Guild',
GuildScheduledEvent: 'GuildScheduledEvent',
Channel: 'Channel',
Expand Down
8 changes: 4 additions & 4 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5711,11 +5711,13 @@ export interface GuildAuditLogsEntryExtraField {
};
}

export interface GuildAuditLogsEntryTargetField<TAction extends GuildAuditLogsResolvable> {
export interface GuildAuditLogsEntryTargetField<TAction extends AuditLogEvent> {
User: User | PartialUser | null;
Guild: Guild;
Webhook: Webhook<WebhookType.ChannelFollower | WebhookType.Incoming>;
Invite: Invite;
Emoji: GuildEmoji | { id: Snowflake };
Role: Role | { id: Snowflake };
Message: TAction extends AuditLogEvent.MessageBulkDelete ? GuildTextBasedChannel | { id: Snowflake } : User | null;
Integration: Integration;
Channel: NonThreadGuildBasedChannel | { id: Snowflake; [x: string]: unknown };
Expand All @@ -5726,8 +5728,6 @@ export interface GuildAuditLogsEntryTargetField<TAction extends GuildAuditLogsRe
ApplicationCommand: ApplicationCommand | { id: Snowflake };
AutoModeration: AutoModerationRule;
GuildOnboardingPrompt: GuildOnboardingPrompt | { id: Snowflake; [x: string]: unknown };
Role: Role | { id: Snowflake };
Emoji: GuildEmoji | { id: Snowflake };
// TODO: Update when https://github.com/discordjs/discord.js/pull/10590 is merged
SoundboardSound: { id: Snowflake };
}
Expand All @@ -5742,7 +5742,7 @@ export interface GuildAuditLogsFetchOptions<Event extends GuildAuditLogsResolvab

export type GuildAuditLogsResolvable = AuditLogEvent | null;

export type GuildAuditLogsTargetType = GuildAuditLogsTypes[keyof GuildAuditLogsTypes][0] | 'Unknown';
export type GuildAuditLogsTargetType = GuildAuditLogsTypes[keyof GuildAuditLogsTypes][0] | 'All' | 'Unknown';

export type GuildAuditLogsTargets = {
[Key in GuildAuditLogsTargetType]: Key;
Expand Down

0 comments on commit 1217d9c

Please sign in to comment.