necord 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/commands/slash-commands/decorators/subcommand-group.decorator.d.ts +1 -1
  2. package/dist/commands/slash-commands/decorators/subcommand.decorator.d.ts +1 -1
  3. package/dist/commands/slash-commands/options/attachment-option.decorator.d.ts +1 -1
  4. package/dist/commands/slash-commands/options/boolean-option.decorator.d.ts +1 -1
  5. package/dist/commands/slash-commands/options/channel-option.decorator.d.ts +1 -1
  6. package/dist/commands/slash-commands/options/integer-option.decorator.d.ts +2 -2
  7. package/dist/commands/slash-commands/options/member-option.decorator.d.ts +1 -1
  8. package/dist/commands/slash-commands/options/mentionable-option.decorator.d.ts +1 -1
  9. package/dist/commands/slash-commands/options/number-option.decorator.d.ts +2 -2
  10. package/dist/commands/slash-commands/options/role-option.decorator.d.ts +1 -1
  11. package/dist/commands/slash-commands/options/string-option.decorator.d.ts +2 -2
  12. package/dist/commands/slash-commands/options/user-option.decorator.d.ts +1 -1
  13. package/dist/listeners/handlers/base.handler.d.ts +6 -3
  14. package/dist/listeners/handlers/channel-update.handler.d.ts +9 -1
  15. package/dist/listeners/handlers/guild-audit-log-entry-create.handler.d.ts +19 -1
  16. package/dist/listeners/handlers/guild-member-update.handler.d.ts +13 -1
  17. package/dist/listeners/handlers/guild-update.handler.d.ts +26 -1
  18. package/dist/listeners/handlers/message-update.handler.d.ts +10 -1
  19. package/dist/listeners/handlers/presence-update.handler.d.ts +6 -1
  20. package/dist/listeners/handlers/role-update.handler.d.ts +13 -1
  21. package/dist/listeners/handlers/thread-update.handler.d.ts +17 -1
  22. package/dist/listeners/handlers/user-update.handler.d.ts +12 -1
  23. package/dist/listeners/handlers/voice-state-update.handler.d.ts +17 -1
  24. package/dist/listeners/listener.interface.d.ts +3 -105
  25. package/package.json +3 -3
@@ -1,3 +1,3 @@
1
1
  import { SlashCommandDiscovery, SlashCommandMeta } from '../slash-command.discovery';
2
- export declare const SubcommandGroup: import("@nestjs/core").ReflectableDecorator<Omit<SlashCommandMeta, "type" | "options" | "guilds" | "defaultMemberPermissions">, SlashCommandDiscovery>;
2
+ export declare const SubcommandGroup: import("@nestjs/core").ReflectableDecorator<Omit<SlashCommandMeta, "type" | "defaultMemberPermissions" | "guilds" | "options">, SlashCommandDiscovery>;
3
3
  export declare const createCommandGroupDecorator: (rootOptions: Omit<SlashCommandMeta, 'type'>) => (subOptions?: Omit<SlashCommandMeta, 'type'>) => ClassDecorator;
@@ -1,2 +1,2 @@
1
1
  import { SlashCommandDiscovery, SlashCommandMeta } from '../slash-command.discovery';
2
- export declare const Subcommand: import("@nestjs/core").ReflectableDecorator<Omit<SlashCommandMeta, "type" | "options" | "guilds" | "defaultMemberPermissions">, SlashCommandDiscovery>;
2
+ export declare const Subcommand: import("@nestjs/core").ReflectableDecorator<Omit<SlashCommandMeta, "type" | "defaultMemberPermissions" | "guilds" | "options">, SlashCommandDiscovery>;
@@ -1,7 +1,7 @@
1
1
  export declare const AttachmentOption: (data: {
2
2
  name: string;
3
- description: string;
4
3
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
4
+ description: string;
5
5
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
6
6
  required?: boolean;
7
7
  }) => PropertyDecorator;
@@ -1,7 +1,7 @@
1
1
  export declare const BooleanOption: (data: {
2
2
  name: string;
3
- description: string;
4
3
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
4
+ description: string;
5
5
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
6
6
  required?: boolean;
7
7
  }) => PropertyDecorator;
@@ -1,7 +1,7 @@
1
1
  export declare const ChannelOption: (data: {
2
2
  name: string;
3
- description: string;
4
3
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
4
+ description: string;
5
5
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
6
6
  required?: boolean;
7
7
  channel_types?: (import("discord.js").ChannelType.GuildText | import("discord.js").ChannelType.GuildVoice | import("discord.js").ChannelType.GuildCategory | import("discord.js").ChannelType.GuildAnnouncement | import("discord.js").ChannelType.AnnouncementThread | import("discord.js").ChannelType.PublicThread | import("discord.js").ChannelType.PrivateThread | import("discord.js").ChannelType.GuildStageVoice | import("discord.js").ChannelType.GuildDirectory | import("discord.js").ChannelType.GuildForum)[];
@@ -1,7 +1,7 @@
1
1
  export declare const IntegerOption: (data: {
2
2
  name: string;
3
- description: string;
4
3
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
4
+ description: string;
5
5
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
6
6
  required?: boolean;
7
7
  min_value?: number;
@@ -10,8 +10,8 @@ export declare const IntegerOption: (data: {
10
10
  choices?: [];
11
11
  } | {
12
12
  name: string;
13
- description: string;
14
13
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
14
+ description: string;
15
15
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
16
16
  required?: boolean;
17
17
  min_value?: number;
@@ -1,7 +1,7 @@
1
1
  export declare const MemberOption: (data: {
2
2
  name: string;
3
- description: string;
4
3
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
4
+ description: string;
5
5
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
6
6
  required?: boolean;
7
7
  }) => PropertyDecorator;
@@ -1,7 +1,7 @@
1
1
  export declare const MentionableOption: (data: {
2
2
  name: string;
3
- description: string;
4
3
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
4
+ description: string;
5
5
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
6
6
  required?: boolean;
7
7
  }) => PropertyDecorator;
@@ -1,7 +1,7 @@
1
1
  export declare const NumberOption: (data: {
2
2
  name: string;
3
- description: string;
4
3
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
4
+ description: string;
5
5
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
6
6
  required?: boolean;
7
7
  min_value?: number;
@@ -10,8 +10,8 @@ export declare const NumberOption: (data: {
10
10
  choices?: [];
11
11
  } | {
12
12
  name: string;
13
- description: string;
14
13
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
14
+ description: string;
15
15
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
16
16
  required?: boolean;
17
17
  min_value?: number;
@@ -1,7 +1,7 @@
1
1
  export declare const RoleOption: (data: {
2
2
  name: string;
3
- description: string;
4
3
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
4
+ description: string;
5
5
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
6
6
  required?: boolean;
7
7
  }) => PropertyDecorator;
@@ -1,7 +1,7 @@
1
1
  export declare const StringOption: (data: {
2
2
  name: string;
3
- description: string;
4
3
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
4
+ description: string;
5
5
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
6
6
  required?: boolean;
7
7
  autocomplete: true;
@@ -10,8 +10,8 @@ export declare const StringOption: (data: {
10
10
  max_length?: number;
11
11
  } | {
12
12
  name: string;
13
- description: string;
14
13
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
14
+ description: string;
15
15
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
16
16
  required?: boolean;
17
17
  autocomplete?: false;
@@ -1,7 +1,7 @@
1
1
  export declare const UserOption: (data: {
2
2
  name: string;
3
- description: string;
4
3
  name_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
4
+ description: string;
5
5
  description_localizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>;
6
6
  required?: boolean;
7
7
  }) => PropertyDecorator;
@@ -1,6 +1,9 @@
1
+ import { ClientEvents } from 'discord.js';
1
2
  import { NecordEvents } from '../listener.interface';
2
- export declare abstract class BaseHandler {
3
+ type OnlyCustomEvents = Exclude<NecordEvents, ClientEvents>;
4
+ export declare abstract class BaseHandler<Events extends Record<string, Array<any>> = OnlyCustomEvents> {
3
5
  private readonly client;
4
- protected on<K extends keyof NecordEvents>(event: K, fn: (args: NecordEvents[K]) => void): void;
5
- protected emit<K extends keyof NecordEvents>(event: K, ...args: NecordEvents[K]): void;
6
+ protected on<K extends keyof Events>(event: K, fn: (args: Events[K]) => void): void;
7
+ protected emit<K extends keyof Events>(event: K, ...args: Events[K]): void;
6
8
  }
9
+ export {};
@@ -1,5 +1,13 @@
1
1
  import { BaseHandler } from './base.handler';
2
2
  import { ContextOf } from '../../context';
3
- export declare class ChannelUpdateHandler extends BaseHandler {
3
+ import { DMChannel, NonThreadGuildBasedChannel, PermissionOverwriteManager } from 'discord.js';
4
+ export type CustomChannelUpdateEvents = {
5
+ guildChannelPermissionsUpdate: [
6
+ channel: DMChannel | NonThreadGuildBasedChannel,
7
+ oldPermissions: PermissionOverwriteManager,
8
+ newPermissions: PermissionOverwriteManager
9
+ ];
10
+ };
11
+ export declare class ChannelUpdateHandler extends BaseHandler<CustomChannelUpdateEvents> {
4
12
  handleGuildChannelPermissionsUpdate([oldChannel, newChannel]: ContextOf<'channelUpdate'>): void;
5
13
  }
@@ -1,6 +1,24 @@
1
1
  import { BaseHandler } from './base.handler';
2
2
  import { ContextOf } from '../../context';
3
- export declare class GuildAuditLogEntryCreateHandler extends BaseHandler {
3
+ import { AuditLogEvent, Guild, GuildAuditLogsEntry } from 'discord.js';
4
+ export type CustomGuildAuditLogEntryCreateEvents = {
5
+ guildAuditLogEntryAdd: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
6
+ guildAuditLogEntryUpdate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
7
+ guildAuditLogEntryDelete: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
8
+ guildAuditLogEntryWebhookCreate: [
9
+ auditLogEntry: GuildAuditLogsEntry<AuditLogEvent.WebhookCreate>,
10
+ guild: Guild
11
+ ];
12
+ guildAuditLogEntryWebhookUpdate: [
13
+ auditLogEntry: GuildAuditLogsEntry<AuditLogEvent.WebhookUpdate>,
14
+ guild: Guild
15
+ ];
16
+ guildAuditLogEntryWebhookDelete: [
17
+ auditLogEntry: GuildAuditLogsEntry<AuditLogEvent.WebhookDelete>,
18
+ guild: Guild
19
+ ];
20
+ };
21
+ export declare class GuildAuditLogEntryCreateHandler extends BaseHandler<CustomGuildAuditLogEntryCreateEvents> {
4
22
  handleGuildAuditLogEntryChanges([auditLogEntry, guild]: ContextOf<'guildAuditLogEntryCreate'>): void;
5
23
  handleGuildAuditLogEntryWebhookChanges([auditLogEntry, guild]: ContextOf<'guildAuditLogEntryCreate'>): void;
6
24
  }
@@ -1,6 +1,18 @@
1
1
  import { BaseHandler } from './base.handler';
2
2
  import { ContextOf } from '../../context';
3
- export declare class GuildMemberUpdateHandler extends BaseHandler {
3
+ import { GuildMember, Role } from 'discord.js';
4
+ export type CustomGuildMemberUpdateEvents = {
5
+ guildMemberBoost: [member: GuildMember];
6
+ guildMemberUnboost: [member: GuildMember];
7
+ guildMemberRoleAdd: [member: GuildMember, role: Role];
8
+ guildMemberRoleRemove: [member: GuildMember, role: Role];
9
+ guildMemberNicknameUpdate: [member: GuildMember, oldNickname: string, newNickname: string];
10
+ guildMemberEntered: [member: GuildMember];
11
+ guildMemberAvatarAdd: [member: GuildMember, avatarURL: string];
12
+ guildMemberAvatarUpdate: [member: GuildMember, oldAvatarURL: string, newAvatarURL: string];
13
+ guildMemberAvatarRemove: [member: GuildMember, oldAvatarURL: string];
14
+ };
15
+ export declare class GuildMemberUpdateHandler extends BaseHandler<CustomGuildMemberUpdateEvents> {
4
16
  handleGuildMemberAvatar([oldMember, newMember]: ContextOf<'guildMemberUpdate'>): void;
5
17
  handleGuildMemberRoles([oldMember, newMember]: ContextOf<'guildMemberUpdate'>): void;
6
18
  handleGuildMemberBoosting([oldMember, newMember]: ContextOf<'guildMemberUpdate'>): void;
@@ -1,6 +1,31 @@
1
1
  import { BaseHandler } from './base.handler';
2
2
  import { ContextOf } from '../../context';
3
- export declare class GuildUpdateHandler extends BaseHandler {
3
+ import { Guild, GuildFeature, GuildPremiumTier, VoiceChannel } from 'discord.js';
4
+ export type CustomGuildUpdateEvents = {
5
+ guildBoostLevelUp: [
6
+ guild: Guild,
7
+ oldPremiumTier: GuildPremiumTier,
8
+ newPremiumTier: GuildPremiumTier
9
+ ];
10
+ guildBoostLevelDown: [oldGuild: Guild, newGuild: Guild];
11
+ guildBannerAdd: [guild: Guild, bannerURL: string];
12
+ guildAfkChannelAdd: [guild: Guild, afkChannel: VoiceChannel];
13
+ guildVanityURLAdd: [guild: Guild, vanityURLCode: string];
14
+ guildVanityURLUpdate: [guild: Guild, oldVanityURLCode: string, newVanityURLCode: string];
15
+ guildVanityURLRemove: [guild: Guild, vanityURLCode: string];
16
+ guildFeaturesUpdate: [
17
+ guild: Guild,
18
+ oldFeatures: `${GuildFeature}`[],
19
+ newFeatures: `${GuildFeature}`[]
20
+ ];
21
+ guildAcronymUpdate: [oldGuild: Guild, newGuild: Guild];
22
+ guildOwnerUpdate: [oldGuild: Guild, newGuild: Guild];
23
+ guildPartnerAdd: [guild: Guild];
24
+ guildPartnerRemove: [guild: Guild];
25
+ guildVerificationAdd: [guild: Guild];
26
+ guildVerificationRemove: [guild: Guild];
27
+ };
28
+ export declare class GuildUpdateHandler extends BaseHandler<CustomGuildUpdateEvents> {
4
29
  handleGuildBoostLevel([oldGuild, newGuild]: ContextOf<'guildUpdate'>): void;
5
30
  handleGuildVanityURL([oldGuild, newGuild]: ContextOf<'guildUpdate'>): void;
6
31
  handleGuildPartnered([oldGuild, newGuild]: ContextOf<'guildUpdate'>): void;
@@ -1,6 +1,15 @@
1
1
  import { BaseHandler } from './base.handler';
2
2
  import { ContextOf } from '../../context';
3
- export declare class MessageUpdateHandler extends BaseHandler {
3
+ import { Message, PartialMessage } from 'discord.js';
4
+ export type CustomMessageUpdateEvents = {
5
+ messagePinned: [Message | PartialMessage];
6
+ messageContentEdited: [
7
+ message: Message | PartialMessage,
8
+ oldContent: string,
9
+ newContent: string
10
+ ];
11
+ };
12
+ export declare class MessageUpdateHandler extends BaseHandler<CustomMessageUpdateEvents> {
4
13
  handleMessagePinned([oldMessage, newMessage]: ContextOf<'messageUpdate'>): void;
5
14
  handleMessageContentEdited([oldMessage, newMessage]: ContextOf<'messageUpdate'>): void;
6
15
  }
@@ -1,5 +1,10 @@
1
1
  import { BaseHandler } from './base.handler';
2
2
  import { ContextOf } from '../../context';
3
- export declare class PresenceUpdateHandler extends BaseHandler {
3
+ import { GuildMember, PresenceStatus } from 'discord.js';
4
+ export type CustomPresenceUpdateEvents = {
5
+ guildMemberOffline: [member: GuildMember, oldStatus: PresenceStatus];
6
+ guildMemberOnline: [member: GuildMember, newStatus: PresenceStatus];
7
+ };
8
+ export declare class PresenceUpdateHandler extends BaseHandler<CustomPresenceUpdateEvents> {
4
9
  handlePresenceUpdate([oldPresence, newPresence]: ContextOf<'presenceUpdate'>): void;
5
10
  }
@@ -1,6 +1,18 @@
1
1
  import { BaseHandler } from './base.handler';
2
2
  import { ContextOf } from '../../context';
3
- export declare class RoleUpdateHandler extends BaseHandler {
3
+ import { PermissionsBitField, Role } from 'discord.js';
4
+ export type CustomRoleUpdateEvents = {
5
+ rolePositionUpdate: [role: Role, oldPosition: number, newPosition: number];
6
+ rolePermissionsUpdate: [
7
+ role: Role,
8
+ oldPermissions: Readonly<PermissionsBitField>,
9
+ newPermissions: Readonly<PermissionsBitField>
10
+ ];
11
+ roleIconAdd: [role: Role, iconURL: string];
12
+ roleIconUpdate: [role: Role, oldIconURL: string, newIconURL: string];
13
+ roleIconRemove: [role: Role, iconURL: string];
14
+ };
15
+ export declare class RoleUpdateHandler extends BaseHandler<CustomRoleUpdateEvents> {
4
16
  handleRolePositionUpdate([oldRole, newRole]: ContextOf<'roleUpdate'>): void;
5
17
  handleRolePermissionsUpdate([oldRole, newRole]: ContextOf<'roleUpdate'>): void;
6
18
  handleRoleIconChanges([oldRole, newRole]: ContextOf<'roleUpdate'>): void;
@@ -1,6 +1,22 @@
1
1
  import { BaseHandler } from './base.handler';
2
2
  import { ContextOf } from '../../context';
3
- export declare class ThreadUpdateHandler extends BaseHandler {
3
+ import { ThreadChannel } from 'discord.js';
4
+ export type CustomThreadUpdateEvents = {
5
+ threadStateUpdate: [oldThread: ThreadChannel, newThread: ThreadChannel];
6
+ threadNameUpdate: [thread: ThreadChannel, oldName: string, newName: string];
7
+ threadLockStateUpdate: [oldThread: ThreadChannel, newThread: ThreadChannel];
8
+ threadRateLimitPerUserUpdate: [
9
+ thread: ThreadChannel,
10
+ oldRateLimit: number,
11
+ newRateLimit: number
12
+ ];
13
+ threadAutoArchiveDurationUpdate: [
14
+ thread: ThreadChannel,
15
+ oldDuration: number | string,
16
+ newDuration: number | string
17
+ ];
18
+ };
19
+ export declare class ThreadUpdateHandler extends BaseHandler<CustomThreadUpdateEvents> {
4
20
  handleThreadStateUpdate([oldThread, newThread]: ContextOf<'threadUpdate'>): void;
5
21
  handleThreadNameUpdate([oldThread, newThread]: ContextOf<'threadUpdate'>): void;
6
22
  handleThreadLockUpdate([oldThread, newThread]: ContextOf<'threadUpdate'>): void;
@@ -1,6 +1,17 @@
1
1
  import { BaseHandler } from './base.handler';
2
2
  import { ContextOf } from '../../context';
3
- export declare class UserUpdateHandler extends BaseHandler {
3
+ import { User, UserFlagsBitField } from 'discord.js';
4
+ export type CustomUserUpdateEvents = {
5
+ userAvatarUpdate: [user: User, oldAvatar: string, newAvatar: string];
6
+ userUsernameUpdate: [user: User, oldUsername: string, newUsername: string];
7
+ userDiscriminatorUpdate: [user: User, oldDiscriminator: string, newDiscriminator: string];
8
+ userFlagsUpdate: [
9
+ user: User,
10
+ oldFlags: Readonly<UserFlagsBitField>,
11
+ newFlags: Readonly<UserFlagsBitField>
12
+ ];
13
+ };
14
+ export declare class UserUpdateHandler extends BaseHandler<CustomUserUpdateEvents> {
4
15
  handleUserAvatarUpdate([oldUser, newUser]: ContextOf<'userUpdate'>): void;
5
16
  handleUserUsernameUpdate([oldUser, newUser]: ContextOf<'userUpdate'>): void;
6
17
  handleUserDiscriminatorUpdate([oldUser, newUser]: ContextOf<'userUpdate'>): void;
@@ -1,6 +1,22 @@
1
1
  import { BaseHandler } from './base.handler';
2
2
  import { ContextOf } from '../../context';
3
- export declare class VoiceStateUpdateHandler extends BaseHandler {
3
+ import { GuildMember, VoiceBasedChannel } from 'discord.js';
4
+ export type CustomVoiceStateUpdateEvents = {
5
+ voiceChannelJoin: [member: GuildMember, channel: VoiceBasedChannel];
6
+ voiceChannelSwitch: [
7
+ member: GuildMember,
8
+ oldChannel: VoiceBasedChannel,
9
+ newChannel: VoiceBasedChannel
10
+ ];
11
+ voiceChannelLeave: [member: GuildMember, channel: VoiceBasedChannel];
12
+ voiceChannelMute: [member: GuildMember, type: 'self-muted' | 'server-muted'];
13
+ voiceChannelUnmute: [member: GuildMember, type: 'self-muted' | 'server-muted'];
14
+ voiceChannelDeaf: [member: GuildMember, type: 'self-deafed' | 'server-deafed'];
15
+ voiceChannelUndeaf: [member: GuildMember, type: 'self-deafed' | 'server-deafed'];
16
+ voiceStreamingStart: [member: GuildMember, channel: VoiceBasedChannel];
17
+ voiceStreamingStop: [member: GuildMember, channel: VoiceBasedChannel];
18
+ };
19
+ export declare class VoiceStateUpdateHandler extends BaseHandler<CustomVoiceStateUpdateEvents> {
4
20
  handleVoiceChannelChanges([oldState, newState]: ContextOf<'voiceStateUpdate'>): void;
5
21
  handleVoiceChannelMuteChanges([oldState, newState]: ContextOf<'voiceStateUpdate'>): void;
6
22
  handleVoiceChannelDeafChanges([oldState, newState]: ContextOf<'voiceStateUpdate'>): void;
@@ -1,105 +1,3 @@
1
- import { AuditLogEvent, ClientEvents, DMChannel, Guild, GuildAuditLogsEntry, GuildFeature, GuildMember, GuildPremiumTier, Message, NonThreadGuildBasedChannel, PartialMessage, PermissionOverwriteManager, PermissionsBitField, PresenceStatus, Role, ThreadChannel, User, UserFlagsBitField, VoiceBasedChannel, VoiceChannel } from 'discord.js';
2
- export interface NecordEvents extends ClientEvents {
3
- guildChannelPermissionsUpdate: [
4
- channel: DMChannel | NonThreadGuildBasedChannel,
5
- oldPermissions: PermissionOverwriteManager,
6
- newPermissions: PermissionOverwriteManager
7
- ];
8
- guildMemberBoost: [member: GuildMember];
9
- guildMemberUnboost: [member: GuildMember];
10
- guildMemberRoleAdd: [member: GuildMember, role: Role];
11
- guildMemberRoleRemove: [member: GuildMember, role: Role];
12
- guildMemberNicknameUpdate: [member: GuildMember, oldNickname: string, newNickname: string];
13
- guildMemberEntered: [member: GuildMember];
14
- guildMemberAvatarAdd: [member: GuildMember, avatarURL: string];
15
- guildMemberAvatarUpdate: [member: GuildMember, oldAvatarURL: string, newAvatarURL: string];
16
- guildMemberAvatarRemove: [member: GuildMember, oldAvatarURL: string];
17
- guildBoostLevelUp: [
18
- guild: Guild,
19
- oldPremiumTier: GuildPremiumTier,
20
- newPremiumTier: GuildPremiumTier
21
- ];
22
- guildBoostLevelDown: [oldGuild: Guild, newGuild: Guild];
23
- guildBannerAdd: [guild: Guild, bannerURL: string];
24
- guildAfkChannelAdd: [guild: Guild, afkChannel: VoiceChannel];
25
- guildVanityURLAdd: [guild: Guild, vanityURLCode: string];
26
- guildVanityURLUpdate: [guild: Guild, oldVanityURLCode: string, newVanityURLCode: string];
27
- guildVanityURLRemove: [guild: Guild, vanityURLCode: string];
28
- guildFeaturesUpdate: [
29
- guild: Guild,
30
- oldFeatures: `${GuildFeature}`[],
31
- newFeatures: `${GuildFeature}`[]
32
- ];
33
- guildAcronymUpdate: [oldGuild: Guild, newGuild: Guild];
34
- guildOwnerUpdate: [oldGuild: Guild, newGuild: Guild];
35
- guildPartnerAdd: [guild: Guild];
36
- guildPartnerRemove: [guild: Guild];
37
- guildVerificationAdd: [guild: Guild];
38
- guildVerificationRemove: [guild: Guild];
39
- messagePinned: [Message | PartialMessage];
40
- messageContentEdited: [
41
- message: Message | PartialMessage,
42
- oldContent: string,
43
- newContent: string
44
- ];
45
- guildMemberOffline: [member: GuildMember, oldStatus: PresenceStatus];
46
- guildMemberOnline: [member: GuildMember, newStatus: PresenceStatus];
47
- rolePositionUpdate: [role: Role, oldPosition: number, newPosition: number];
48
- rolePermissionsUpdate: [
49
- role: Role,
50
- oldPermissions: Readonly<PermissionsBitField>,
51
- newPermissions: Readonly<PermissionsBitField>
52
- ];
53
- roleIconAdd: [role: Role, iconURL: string];
54
- roleIconUpdate: [role: Role, oldIconURL: string, newIconURL: string];
55
- roleIconRemove: [role: Role, iconURL: string];
56
- threadStateUpdate: [oldThread: ThreadChannel, newThread: ThreadChannel];
57
- threadNameUpdate: [thread: ThreadChannel, oldName: string, newName: string];
58
- threadLockStateUpdate: [oldThread: ThreadChannel, newThread: ThreadChannel];
59
- threadRateLimitPerUserUpdate: [
60
- thread: ThreadChannel,
61
- oldRateLimit: number,
62
- newRateLimit: number
63
- ];
64
- threadAutoArchiveDurationUpdate: [
65
- thread: ThreadChannel,
66
- oldDuration: number | string,
67
- newDuration: number | string
68
- ];
69
- userAvatarUpdate: [user: User, oldAvatar: string, newAvatar: string];
70
- userUsernameUpdate: [user: User, oldUsername: string, newUsername: string];
71
- userDiscriminatorUpdate: [user: User, oldDiscriminator: string, newDiscriminator: string];
72
- userFlagsUpdate: [
73
- user: User,
74
- oldFlags: Readonly<UserFlagsBitField>,
75
- newFlags: Readonly<UserFlagsBitField>
76
- ];
77
- voiceChannelJoin: [member: GuildMember, channel: VoiceBasedChannel];
78
- voiceChannelSwitch: [
79
- member: GuildMember,
80
- oldChannel: VoiceBasedChannel,
81
- newChannel: VoiceBasedChannel
82
- ];
83
- voiceChannelLeave: [member: GuildMember, channel: VoiceBasedChannel];
84
- voiceChannelMute: [member: GuildMember, type: 'self-muted' | 'server-muted'];
85
- voiceChannelUnmute: [member: GuildMember, type: 'self-muted' | 'server-muted'];
86
- voiceChannelDeaf: [member: GuildMember, type: 'self-deafed' | 'server-deafed'];
87
- voiceChannelUndeaf: [member: GuildMember, type: 'self-deafed' | 'server-deafed'];
88
- voiceStreamingStart: [member: GuildMember, channel: VoiceBasedChannel];
89
- voiceStreamingStop: [member: GuildMember, channel: VoiceBasedChannel];
90
- guildAuditLogEntryAdd: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
91
- guildAuditLogEntryUpdate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
92
- guildAuditLogEntryDelete: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
93
- guildAuditLogEntryWebhookCreate: [
94
- auditLogEntry: GuildAuditLogsEntry<AuditLogEvent.WebhookCreate>,
95
- guild: Guild
96
- ];
97
- guildAuditLogEntryWebhookUpdate: [
98
- auditLogEntry: GuildAuditLogsEntry<AuditLogEvent.WebhookUpdate>,
99
- guild: Guild
100
- ];
101
- guildAuditLogEntryWebhookDelete: [
102
- auditLogEntry: GuildAuditLogsEntry<AuditLogEvent.WebhookDelete>,
103
- guild: Guild
104
- ];
105
- }
1
+ import { ClientEvents } from 'discord.js';
2
+ import { CustomChannelUpdateEvents, CustomGuildAuditLogEntryCreateEvents, CustomGuildMemberUpdateEvents, CustomGuildUpdateEvents, CustomMessageUpdateEvents, CustomPresenceUpdateEvents, CustomRoleUpdateEvents, CustomThreadUpdateEvents, CustomUserUpdateEvents, CustomVoiceStateUpdateEvents } from './handlers';
3
+ export type NecordEvents = ClientEvents & CustomChannelUpdateEvents & CustomGuildAuditLogEntryCreateEvents & CustomGuildMemberUpdateEvents & CustomGuildUpdateEvents & CustomMessageUpdateEvents & CustomPresenceUpdateEvents & CustomRoleUpdateEvents & CustomThreadUpdateEvents & CustomUserUpdateEvents & CustomVoiceStateUpdateEvents;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "necord",
3
3
  "description": "A module for creating Discord bots using NestJS, based on Discord.js",
4
- "version": "6.3.0",
4
+ "version": "6.4.0",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && tsc -p tsconfig.build.json",
7
7
  "prepublish:npm": "npm run build",
@@ -55,8 +55,8 @@
55
55
  "path-to-regexp": "6.2.1"
56
56
  },
57
57
  "devDependencies": {
58
- "@commitlint/cli": "18.0.0",
59
- "@commitlint/config-angular": "18.0.0",
58
+ "@commitlint/cli": "18.2.0",
59
+ "@commitlint/config-angular": "18.1.0",
60
60
  "@favware/npm-deprecate": "1.0.7",
61
61
  "@nestjs/common": "10.2.7",
62
62
  "@nestjs/core": "10.2.7",