seyfert 1.4.0 → 1.5.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 (85) hide show
  1. package/README.md +7 -7
  2. package/lib/api/Router.js +3 -1
  3. package/lib/api/Routes/guilds.d.ts +4 -1
  4. package/lib/cache/index.d.ts +6 -2
  5. package/lib/cache/index.js +18 -0
  6. package/lib/cache/resources/bans.d.ts +12 -0
  7. package/lib/cache/resources/bans.js +35 -0
  8. package/lib/cache/resources/members.js +4 -4
  9. package/lib/cache/resources/messages.js +8 -6
  10. package/lib/client/base.d.ts +7 -3
  11. package/lib/client/base.js +43 -24
  12. package/lib/client/client.d.ts +17 -5
  13. package/lib/client/client.js +39 -43
  14. package/lib/client/collectors.d.ts +36 -0
  15. package/lib/client/collectors.js +85 -0
  16. package/lib/client/httpclient.js +6 -6
  17. package/lib/client/onmessagecreate.d.ts +12 -2
  18. package/lib/client/onmessagecreate.js +32 -17
  19. package/lib/client/workerclient.d.ts +4 -1
  20. package/lib/client/workerclient.js +59 -67
  21. package/lib/collection.d.ts +2 -2
  22. package/lib/collection.js +2 -2
  23. package/lib/commands/applications/chat.d.ts +10 -9
  24. package/lib/commands/applications/chat.js +21 -7
  25. package/lib/commands/applications/menu.d.ts +8 -7
  26. package/lib/commands/applications/menu.js +3 -2
  27. package/lib/commands/applications/shared.d.ts +12 -0
  28. package/lib/commands/decorators.d.ts +11 -17
  29. package/lib/commands/decorators.js +7 -14
  30. package/lib/commands/handler.js +39 -29
  31. package/lib/common/index.d.ts +1 -0
  32. package/lib/common/index.js +3 -1
  33. package/lib/common/it/formatter.d.ts +155 -0
  34. package/lib/common/it/formatter.js +184 -0
  35. package/lib/common/it/logger.js +5 -5
  36. package/lib/common/it/utils.js +2 -4
  37. package/lib/common/shorters/bans.d.ts +43 -0
  38. package/lib/common/shorters/bans.js +78 -0
  39. package/lib/common/shorters/emojis.d.ts +1 -1
  40. package/lib/common/shorters/emojis.js +4 -3
  41. package/lib/common/shorters/interaction.js +9 -7
  42. package/lib/common/shorters/messages.js +2 -2
  43. package/lib/common/shorters/webhook.js +2 -2
  44. package/lib/components/componentcommand.d.ts +3 -2
  45. package/lib/components/componentcommand.js +2 -1
  46. package/lib/components/componentcontext.d.ts +1 -1
  47. package/lib/components/handler.d.ts +1 -1
  48. package/lib/components/handler.js +25 -28
  49. package/lib/components/modalcommand.d.ts +2 -1
  50. package/lib/components/modalcommand.js +1 -0
  51. package/lib/components/modalcontext.d.ts +1 -1
  52. package/lib/events/event.d.ts +4 -3
  53. package/lib/events/handler.d.ts +8 -5
  54. package/lib/events/handler.js +58 -13
  55. package/lib/events/hooks/guild.d.ts +18 -73
  56. package/lib/events/hooks/integration.d.ts +57 -0
  57. package/lib/events/hooks/invite.d.ts +3 -0
  58. package/lib/events/hooks/message.d.ts +11 -6
  59. package/lib/events/hooks/presence.d.ts +4 -0
  60. package/lib/events/hooks/thread.d.ts +14 -3
  61. package/lib/events/hooks/typing.d.ts +1 -0
  62. package/lib/index.d.ts +3 -3
  63. package/lib/index.js +3 -2
  64. package/lib/structures/Guild.d.ts +9 -1
  65. package/lib/structures/Guild.js +2 -0
  66. package/lib/structures/GuildBan.d.ts +25 -0
  67. package/lib/structures/GuildBan.js +36 -0
  68. package/lib/structures/GuildEmoji.d.ts +1 -1
  69. package/lib/structures/GuildMember.d.ts +7 -2
  70. package/lib/structures/GuildMember.js +4 -4
  71. package/lib/structures/Interaction.d.ts +3 -2
  72. package/lib/structures/Interaction.js +21 -9
  73. package/lib/structures/Message.d.ts +69 -8
  74. package/lib/structures/Message.js +59 -17
  75. package/lib/structures/Sticker.d.ts +3 -3
  76. package/lib/structures/User.d.ts +1 -0
  77. package/lib/structures/User.js +4 -1
  78. package/lib/structures/channels.d.ts +4 -1
  79. package/lib/structures/channels.js +36 -6
  80. package/lib/structures/extra/functions.js +1 -1
  81. package/lib/websocket/discord/basesocket.d.ts +1 -0
  82. package/lib/websocket/discord/basesocket.js +17 -0
  83. package/lib/websocket/discord/shard.d.ts +1 -0
  84. package/lib/websocket/discord/shard.js +6 -0
  85. package/package.json +8 -8
@@ -7,90 +7,22 @@ export declare const GUILD_AUDIT_LOG_ENTRY_CREATE: (_self: UsingClient, data: Ga
7
7
  changes?: ({
8
8
  key: "$add";
9
9
  newValue?: {
10
- id: string;
11
10
  name: string;
12
- color: number;
13
- hoist: boolean;
14
- icon?: string | null | undefined;
15
- unicodeEmoji?: string | null | undefined;
16
- position: number;
17
- permissions: string;
18
- managed: boolean;
19
- mentionable: boolean;
20
- tags?: {
21
- botId?: string | undefined;
22
- premiumSubscriber?: null | undefined;
23
- integrationId?: string | undefined;
24
- subscriptionListingId?: string | undefined;
25
- availableForPurchase?: null | undefined;
26
- guildConnections?: null | undefined;
27
- } | undefined;
28
- flags: import("discord-api-types/v10").RoleFlags;
11
+ id: string;
29
12
  }[] | undefined;
30
13
  oldValue?: {
31
- id: string;
32
14
  name: string;
33
- color: number;
34
- hoist: boolean;
35
- icon?: string | null | undefined;
36
- unicodeEmoji?: string | null | undefined;
37
- position: number;
38
- permissions: string;
39
- managed: boolean;
40
- mentionable: boolean;
41
- tags?: {
42
- botId?: string | undefined;
43
- premiumSubscriber?: null | undefined;
44
- integrationId?: string | undefined;
45
- subscriptionListingId?: string | undefined;
46
- availableForPurchase?: null | undefined;
47
- guildConnections?: null | undefined;
48
- } | undefined;
49
- flags: import("discord-api-types/v10").RoleFlags;
15
+ id: string;
50
16
  }[] | undefined;
51
17
  } | {
52
18
  key: "$remove";
53
19
  newValue?: {
54
- id: string;
55
20
  name: string;
56
- color: number;
57
- hoist: boolean;
58
- icon?: string | null | undefined;
59
- unicodeEmoji?: string | null | undefined;
60
- position: number;
61
- permissions: string;
62
- managed: boolean;
63
- mentionable: boolean;
64
- tags?: {
65
- botId?: string | undefined;
66
- premiumSubscriber?: null | undefined;
67
- integrationId?: string | undefined;
68
- subscriptionListingId?: string | undefined;
69
- availableForPurchase?: null | undefined;
70
- guildConnections?: null | undefined;
71
- } | undefined;
72
- flags: import("discord-api-types/v10").RoleFlags;
21
+ id: string;
73
22
  }[] | undefined;
74
23
  oldValue?: {
75
- id: string;
76
24
  name: string;
77
- color: number;
78
- hoist: boolean;
79
- icon?: string | null | undefined;
80
- unicodeEmoji?: string | null | undefined;
81
- position: number;
82
- permissions: string;
83
- managed: boolean;
84
- mentionable: boolean;
85
- tags?: {
86
- botId?: string | undefined;
87
- premiumSubscriber?: null | undefined;
88
- integrationId?: string | undefined;
89
- subscriptionListingId?: string | undefined;
90
- availableForPurchase?: null | undefined;
91
- guildConnections?: null | undefined;
92
- } | undefined;
93
- flags: import("discord-api-types/v10").RoleFlags;
25
+ id: string;
94
26
  }[] | undefined;
95
27
  } | {
96
28
  key: "actions";
@@ -470,7 +402,7 @@ export declare const GUILD_AUDIT_LOG_ENTRY_CREATE: (_self: UsingClient, data: Ga
470
402
  actionType: import("discord-api-types/v10").AuditLogEvent;
471
403
  options?: {
472
404
  autoModerationRuleName?: string | undefined;
473
- autoModerationRuleTriggerType?: "1" | "3" | "4" | "5" | undefined;
405
+ autoModerationRuleTriggerType?: "1" | "3" | "4" | "5" | "6" | undefined;
474
406
  deleteMemberDays?: string | undefined;
475
407
  membersRemoved?: string | undefined;
476
408
  channelId?: string | undefined;
@@ -530,6 +462,10 @@ export declare const GUILD_MEMBERS_CHUNK: (self: UsingClient, data: GatewayGuild
530
462
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
531
463
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
532
464
  avatarDecoration?: string | null | undefined;
465
+ avatarDecorationData?: {
466
+ asset: string;
467
+ skuId: string;
468
+ } | null | undefined;
533
469
  };
534
470
  status?: import("discord-api-types/v10").PresenceUpdateReceiveStatus | undefined;
535
471
  activities?: {
@@ -616,6 +552,7 @@ export declare const GUILD_SCHEDULED_EVENT_CREATE: (_self: UsingClient, data: Ga
616
552
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
617
553
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
618
554
  avatarDecoration?: string | null | undefined;
555
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
619
556
  } | undefined;
620
557
  userCount?: number | undefined;
621
558
  image?: string | null | undefined;
@@ -651,6 +588,7 @@ export declare const GUILD_SCHEDULED_EVENT_CREATE: (_self: UsingClient, data: Ga
651
588
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
652
589
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
653
590
  avatarDecoration?: string | null | undefined;
591
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
654
592
  } | undefined;
655
593
  userCount?: number | undefined;
656
594
  image?: string | null | undefined;
@@ -688,6 +626,7 @@ export declare const GUILD_SCHEDULED_EVENT_CREATE: (_self: UsingClient, data: Ga
688
626
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
689
627
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
690
628
  avatarDecoration?: string | null | undefined;
629
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
691
630
  } | undefined;
692
631
  userCount?: number | undefined;
693
632
  image?: string | null | undefined;
@@ -724,6 +663,7 @@ export declare const GUILD_SCHEDULED_EVENT_UPDATE: (_self: UsingClient, data: Ga
724
663
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
725
664
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
726
665
  avatarDecoration?: string | null | undefined;
666
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
727
667
  } | undefined;
728
668
  userCount?: number | undefined;
729
669
  image?: string | null | undefined;
@@ -759,6 +699,7 @@ export declare const GUILD_SCHEDULED_EVENT_UPDATE: (_self: UsingClient, data: Ga
759
699
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
760
700
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
761
701
  avatarDecoration?: string | null | undefined;
702
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
762
703
  } | undefined;
763
704
  userCount?: number | undefined;
764
705
  image?: string | null | undefined;
@@ -796,6 +737,7 @@ export declare const GUILD_SCHEDULED_EVENT_UPDATE: (_self: UsingClient, data: Ga
796
737
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
797
738
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
798
739
  avatarDecoration?: string | null | undefined;
740
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
799
741
  } | undefined;
800
742
  userCount?: number | undefined;
801
743
  image?: string | null | undefined;
@@ -832,6 +774,7 @@ export declare const GUILD_SCHEDULED_EVENT_DELETE: (_self: UsingClient, data: Ga
832
774
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
833
775
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
834
776
  avatarDecoration?: string | null | undefined;
777
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
835
778
  } | undefined;
836
779
  userCount?: number | undefined;
837
780
  image?: string | null | undefined;
@@ -867,6 +810,7 @@ export declare const GUILD_SCHEDULED_EVENT_DELETE: (_self: UsingClient, data: Ga
867
810
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
868
811
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
869
812
  avatarDecoration?: string | null | undefined;
813
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
870
814
  } | undefined;
871
815
  userCount?: number | undefined;
872
816
  image?: string | null | undefined;
@@ -904,6 +848,7 @@ export declare const GUILD_SCHEDULED_EVENT_DELETE: (_self: UsingClient, data: Ga
904
848
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
905
849
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
906
850
  avatarDecoration?: string | null | undefined;
851
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
907
852
  } | undefined;
908
853
  userCount?: number | undefined;
909
854
  image?: string | null | undefined;
@@ -1,4 +1,5 @@
1
1
  import type { GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData } from 'discord-api-types/v10';
2
+ import { User } from '../../structures';
2
3
  import type { UsingClient } from '../../commands';
3
4
  export declare const INTEGRATION_CREATE: (self: UsingClient, data: GatewayIntegrationCreateDispatchData) => {
4
5
  id: string;
@@ -28,6 +29,7 @@ export declare const INTEGRATION_CREATE: (self: UsingClient, data: GatewayIntegr
28
29
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
29
30
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
30
31
  avatarDecoration?: string | null | undefined;
32
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
31
33
  } | undefined;
32
34
  account: {
33
35
  id: string;
@@ -45,6 +47,33 @@ export declare const INTEGRATION_CREATE: (self: UsingClient, data: GatewayIntegr
45
47
  } | undefined;
46
48
  scopes?: import("discord-api-types/v10").OAuth2Scopes[] | undefined;
47
49
  guildId: string;
50
+ } | {
51
+ user: User;
52
+ id: string;
53
+ name: string;
54
+ type: import("discord-api-types/v10").APIGuildIntegrationType;
55
+ enabled: boolean;
56
+ syncing?: boolean | undefined;
57
+ roleId?: string | undefined;
58
+ enableEmoticons?: boolean | undefined;
59
+ expireBehavior?: import("discord-api-types/v10").IntegrationExpireBehavior | undefined;
60
+ expireGracePeriod?: number | undefined;
61
+ account: {
62
+ id: string;
63
+ name: string;
64
+ };
65
+ syncedAt?: string | undefined;
66
+ subscriberCount?: number | undefined;
67
+ revoked?: boolean | undefined;
68
+ application?: {
69
+ id: string;
70
+ name: string;
71
+ icon: string | null;
72
+ description: string;
73
+ bot?: import("discord-api-types/v10").APIUser | undefined;
74
+ } | undefined;
75
+ scopes?: import("discord-api-types/v10").OAuth2Scopes[] | undefined;
76
+ guildId: string;
48
77
  };
49
78
  export declare const INTEGRATION_UPDATE: (self: UsingClient, data: GatewayIntegrationUpdateDispatchData) => {
50
79
  id: string;
@@ -74,6 +103,7 @@ export declare const INTEGRATION_UPDATE: (self: UsingClient, data: GatewayIntegr
74
103
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
75
104
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
76
105
  avatarDecoration?: string | null | undefined;
106
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
77
107
  } | undefined;
78
108
  account: {
79
109
  id: string;
@@ -91,6 +121,33 @@ export declare const INTEGRATION_UPDATE: (self: UsingClient, data: GatewayIntegr
91
121
  } | undefined;
92
122
  scopes?: import("discord-api-types/v10").OAuth2Scopes[] | undefined;
93
123
  guildId: string;
124
+ } | {
125
+ user: User;
126
+ id: string;
127
+ name: string;
128
+ type: import("discord-api-types/v10").APIGuildIntegrationType;
129
+ enabled: boolean;
130
+ syncing?: boolean | undefined;
131
+ roleId?: string | undefined;
132
+ enableEmoticons?: boolean | undefined;
133
+ expireBehavior?: import("discord-api-types/v10").IntegrationExpireBehavior | undefined;
134
+ expireGracePeriod?: number | undefined;
135
+ account: {
136
+ id: string;
137
+ name: string;
138
+ };
139
+ syncedAt?: string | undefined;
140
+ subscriberCount?: number | undefined;
141
+ revoked?: boolean | undefined;
142
+ application?: {
143
+ id: string;
144
+ name: string;
145
+ icon: string | null;
146
+ description: string;
147
+ bot?: import("discord-api-types/v10").APIUser | undefined;
148
+ } | undefined;
149
+ scopes?: import("discord-api-types/v10").OAuth2Scopes[] | undefined;
150
+ guildId: string;
94
151
  };
95
152
  export declare const INTEGRATION_DELETE: (_self: UsingClient, data: GatewayIntegrationDeleteDispatchData) => {
96
153
  id: string;
@@ -23,6 +23,7 @@ export declare const INVITE_CREATE: (_self: UsingClient, data: GatewayInviteCrea
23
23
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
24
24
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
25
25
  avatarDecoration?: string | null | undefined;
26
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
26
27
  } | undefined;
27
28
  maxAge: number;
28
29
  maxUses: number;
@@ -45,6 +46,7 @@ export declare const INVITE_CREATE: (_self: UsingClient, data: GatewayInviteCrea
45
46
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
46
47
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
47
48
  avatarDecoration?: string | null | undefined;
49
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
48
50
  } | undefined;
49
51
  targetApplication?: {
50
52
  id?: string | undefined;
@@ -73,6 +75,7 @@ export declare const INVITE_CREATE: (_self: UsingClient, data: GatewayInviteCrea
73
75
  roleConnectionsVerificationUrl?: string | undefined;
74
76
  tags?: [string, (string | undefined)?, (string | undefined)?, (string | undefined)?, (string | undefined)?] | undefined;
75
77
  installParams?: import("discord-api-types/v10").APIApplicationInstallParams | undefined;
78
+ integrationTypesConfig?: import("discord-api-types/v10").APIApplicationIntegrationTypesConfigMap | undefined;
76
79
  customInstallUrl?: string | undefined;
77
80
  } | undefined;
78
81
  temporary: boolean;
@@ -1,13 +1,9 @@
1
1
  import type { GatewayMessageCreateDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessageDeleteDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData } from 'discord-api-types/v10';
2
- import { type MakeRequired, type PartialClass } from '../../common';
2
+ import { type MakeRequired, type PartialClass, type ObjectToLower } from '../../common';
3
3
  import { Message } from '../../structures';
4
4
  import type { UsingClient } from '../../commands';
5
5
  export declare const MESSAGE_CREATE: (self: UsingClient, data: GatewayMessageCreateDispatchData) => Message;
6
- export declare const MESSAGE_DELETE: (self: UsingClient, data: GatewayMessageDeleteDispatchData) => Promise<{
7
- id: string;
8
- channelId: string;
9
- guildId?: string | undefined;
10
- }>;
6
+ export declare const MESSAGE_DELETE: (self: UsingClient, data: GatewayMessageDeleteDispatchData) => Promise<Message | ObjectToLower<GatewayMessageDeleteDispatchData>>;
11
7
  export declare const MESSAGE_DELETE_BULK: (self: UsingClient, data: GatewayMessageDeleteBulkDispatchData) => Promise<{
12
8
  messages: import("../..").ReturnCache<Message | undefined>[];
13
9
  ids: string[];
@@ -35,6 +31,7 @@ export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMes
35
31
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
36
32
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
37
33
  avatarDecoration?: string | null | undefined;
34
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
38
35
  } | undefined;
39
36
  requireColons?: boolean | undefined;
40
37
  managed?: boolean | undefined;
@@ -43,6 +40,7 @@ export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMes
43
40
  name: string | null;
44
41
  animated?: boolean | undefined;
45
42
  };
43
+ type: import("discord-api-types/v10").ReactionType;
46
44
  guildId?: string | undefined;
47
45
  channelId: string;
48
46
  messageId: string;
@@ -58,9 +56,12 @@ export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMes
58
56
  flags: import("discord-api-types/v10").GuildMemberFlags;
59
57
  pending?: boolean | undefined;
60
58
  communicationDisabledUntil?: string | null | undefined;
59
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
61
60
  } | undefined;
62
61
  userId: string;
62
+ burstColors: string[];
63
63
  messageAuthorId?: string | undefined;
64
+ burst: boolean;
64
65
  };
65
66
  export declare const MESSAGE_REACTION_REMOVE: (_self: UsingClient, data: GatewayMessageReactionRemoveDispatchData) => {
66
67
  emoji: {
@@ -83,6 +84,7 @@ export declare const MESSAGE_REACTION_REMOVE: (_self: UsingClient, data: Gateway
83
84
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
84
85
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
85
86
  avatarDecoration?: string | null | undefined;
87
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
86
88
  } | undefined;
87
89
  requireColons?: boolean | undefined;
88
90
  managed?: boolean | undefined;
@@ -91,10 +93,12 @@ export declare const MESSAGE_REACTION_REMOVE: (_self: UsingClient, data: Gateway
91
93
  name: string | null;
92
94
  animated?: boolean | undefined;
93
95
  };
96
+ type: import("discord-api-types/v10").ReactionType;
94
97
  guildId?: string | undefined;
95
98
  channelId: string;
96
99
  messageId: string;
97
100
  userId: string;
101
+ burst: boolean;
98
102
  };
99
103
  export declare const MESSAGE_REACTION_REMOVE_ALL: (_self: UsingClient, data: GatewayMessageReactionRemoveAllDispatchData) => {
100
104
  channelId: string;
@@ -122,6 +126,7 @@ export declare const MESSAGE_REACTION_REMOVE_EMOJI: (_self: UsingClient, data: G
122
126
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
123
127
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
124
128
  avatarDecoration?: string | null | undefined;
129
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
125
130
  } | undefined;
126
131
  requireColons?: boolean | undefined;
127
132
  managed?: boolean | undefined;
@@ -23,6 +23,10 @@ export declare const PRESENCE_UPDATE: (self: UsingClient, data: GatewayPresenceU
23
23
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
24
24
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
25
25
  avatarDecoration?: string | null | undefined;
26
+ avatarDecorationData?: {
27
+ asset: string;
28
+ skuId: string;
29
+ } | null | undefined;
26
30
  };
27
31
  guildId: string;
28
32
  status?: import("discord-api-types/v10").PresenceUpdateReceiveStatus | undefined;
@@ -31,6 +31,10 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
31
31
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
32
32
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
33
33
  avatarDecoration?: string | null | undefined;
34
+ avatarDecorationData?: {
35
+ asset: string;
36
+ skuId: string;
37
+ } | null | undefined;
34
38
  }[] | undefined;
35
39
  } | {
36
40
  defaultForumLayout: import("discord-api-types/v10").ForumLayoutType;
@@ -72,8 +76,8 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
72
76
  topic?: string | null | undefined;
73
77
  type: import("discord-api-types/v10").ChannelType.GuildAnnouncement;
74
78
  id: string;
75
- rateLimitPerUser?: number | undefined;
76
79
  flags?: import("discord-api-types/v10").ChannelFlags | undefined;
80
+ rateLimitPerUser?: number | undefined;
77
81
  lastMessageId?: string | null | undefined;
78
82
  lastPinTimestamp?: string | null | undefined;
79
83
  name: string;
@@ -116,6 +120,10 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
116
120
  premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
117
121
  publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
118
122
  avatarDecoration?: string | null | undefined;
123
+ avatarDecorationData?: {
124
+ asset: string;
125
+ skuId: string;
126
+ } | null | undefined;
119
127
  }[] | undefined;
120
128
  } | {
121
129
  name: string;
@@ -213,8 +221,8 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
213
221
  topic?: string | null | undefined;
214
222
  type: import("discord-api-types/v10").ChannelType.GuildText;
215
223
  id: string;
216
- rateLimitPerUser?: number | undefined;
217
224
  flags?: import("discord-api-types/v10").ChannelFlags | undefined;
225
+ rateLimitPerUser?: number | undefined;
218
226
  lastMessageId?: string | null | undefined;
219
227
  lastPinTimestamp?: string | null | undefined;
220
228
  name: string;
@@ -251,8 +259,8 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
251
259
  appliedTags: string[];
252
260
  type: import("discord-api-types/v10").ThreadChannelType;
253
261
  id: string;
254
- rateLimitPerUser?: number | undefined;
255
262
  flags?: import("discord-api-types/v10").ChannelFlags | undefined;
263
+ rateLimitPerUser?: number | undefined;
256
264
  lastMessageId?: string | null | undefined;
257
265
  lastPinTimestamp?: string | null | undefined;
258
266
  name: string;
@@ -284,6 +292,7 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
284
292
  flags: import("discord-api-types/v10").GuildMemberFlags;
285
293
  pending?: boolean | undefined;
286
294
  communicationDisabledUntil?: string | null | undefined;
295
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
287
296
  } | undefined;
288
297
  }[];
289
298
  };
@@ -304,6 +313,7 @@ export declare const THREAD_MEMBER_UPDATE: (_self: UsingClient, data: GatewayThr
304
313
  flags: import("discord-api-types/v10").GuildMemberFlags;
305
314
  pending?: boolean | undefined;
306
315
  communicationDisabledUntil?: string | null | undefined;
316
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
307
317
  } | undefined;
308
318
  guildId: string;
309
319
  };
@@ -328,6 +338,7 @@ export declare const THREAD_MEMBERS_UPDATE: (_self: UsingClient, data: GatewayTh
328
338
  flags: import("discord-api-types/v10").GuildMemberFlags;
329
339
  pending?: boolean | undefined;
330
340
  communicationDisabledUntil?: string | null | undefined;
341
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
331
342
  } | undefined;
332
343
  }[] | undefined;
333
344
  removedMemberIds?: string[] | undefined;
@@ -18,6 +18,7 @@ export declare const TYPING_START: (self: UsingClient, data: GatewayTypingStartD
18
18
  flags: import("discord-api-types/v10").GuildMemberFlags;
19
19
  pending?: boolean | undefined;
20
20
  communicationDisabledUntil?: string | null | undefined;
21
+ avatarDecorationData?: import("discord-api-types/v10").APIAvatarDecorationData | null | undefined;
21
22
  } | undefined;
22
23
  } | {
23
24
  member: GuildMember;
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type BaseClientOptions, type InternalRuntimeConfig, type InternalRuntimeConfigHTTP, type RuntimeConfig, type RuntimeConfigHTTP } from './client/base';
2
- import type { ClientNameEvents, EventContext } from './events';
3
- export { Logger, PermissionStrings, Watcher } from './common';
2
+ import type { CustomEventsKeys, ClientNameEvents, EventContext } from './events';
3
+ export { Logger, PermissionStrings, Watcher, Formatter } from './common';
4
4
  export { Collection, LimitedCollection } from './collection';
5
5
  export * from './api';
6
6
  export * from './builders';
@@ -27,7 +27,7 @@ export declare function throwError(msg: string): never;
27
27
  * }
28
28
  * });
29
29
  */
30
- export declare function createEvent<E extends ClientNameEvents>(data: {
30
+ export declare function createEvent<E extends ClientNameEvents | CustomEventsKeys>(data: {
31
31
  data: {
32
32
  name: E;
33
33
  once?: boolean;
package/lib/index.js CHANGED
@@ -14,13 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.extendContext = exports.config = exports.createEvent = exports.throwError = exports.WorkerManager = exports.ShardManager = exports.LimitedCollection = exports.Collection = exports.Watcher = exports.Logger = void 0;
17
+ exports.extendContext = exports.config = exports.createEvent = exports.throwError = exports.WorkerManager = exports.ShardManager = exports.LimitedCollection = exports.Collection = exports.Formatter = exports.Watcher = exports.Logger = void 0;
18
18
  const v10_1 = require("discord-api-types/gateway/v10");
19
19
  const base_1 = require("./client/base");
20
20
  const common_1 = require("./common");
21
21
  var common_2 = require("./common");
22
22
  Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return common_2.Logger; } });
23
23
  Object.defineProperty(exports, "Watcher", { enumerable: true, get: function () { return common_2.Watcher; } });
24
+ Object.defineProperty(exports, "Formatter", { enumerable: true, get: function () { return common_2.Formatter; } });
24
25
  //
25
26
  var collection_1 = require("./collection");
26
27
  Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return collection_1.Collection; } });
@@ -94,7 +95,7 @@ exports.config = {
94
95
  ...data,
95
96
  };
96
97
  if ((0, common_1.isCloudfareWorker)())
97
- base_1.BaseClient._seyferHttpConfig = obj;
98
+ base_1.BaseClient._seyfertConfig = obj;
98
99
  return obj;
99
100
  },
100
101
  };
@@ -9,6 +9,7 @@ import { GuildTemplate } from './GuildTemplate';
9
9
  import { Sticker } from './Sticker';
10
10
  import { BaseGuild } from './extra/BaseGuild';
11
11
  import type { DiscordBase } from './extra/DiscordBase';
12
+ import { GuildBan } from './GuildBan';
12
13
  export interface Guild extends ObjectToLower<Omit<APIGuild, 'stickers' | 'emojis' | 'roles'>>, DiscordBase {
13
14
  }
14
15
  declare const Guild_base: ToClass<Omit<BaseGuild, "name" | "id" | "description" | "icon" | "splash" | "banner" | "features" | "welcomeScreen" | "verificationLevel" | "vanityUrlCode">, Guild<"api">>;
@@ -76,10 +77,17 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
76
77
  edit: (emojiId: string, body: import("discord-api-types/v10").RESTPatchAPIGuildEmojiJSONBody, reason?: string | undefined) => Promise<GuildEmoji>;
77
78
  create: (body: Omit<import("discord-api-types/v10").RESTPostAPIGuildEmojiJSONBody, "image"> & {
78
79
  image: import("../common").ImageResolvable;
79
- }) => Promise<void>;
80
+ }) => Promise<GuildEmoji>;
80
81
  fetch: (emojiId: string, force?: boolean) => Promise<GuildEmoji>;
81
82
  list: (force?: boolean) => Promise<GuildEmoji[]>;
82
83
  };
84
+ bans: {
85
+ fetch: (userId: string, force?: boolean) => Promise<GuildBan>;
86
+ list: (query?: import("discord-api-types/v10").RESTGetAPIGuildBansQuery | undefined, force?: boolean) => Promise<GuildBan[]>;
87
+ create: (memberId: string, body?: import("discord-api-types/v10").RESTPutAPIGuildBanJSONBody | undefined, reason?: string | undefined) => Promise<void>;
88
+ remove: (memberId: string, reason?: string | undefined) => Promise<void>;
89
+ bulkCreate: (body: import("discord-api-types/v10").RESTPostAPIGuildBulkBanJSONBody, reason?: string | undefined) => Promise<import("discord-api-types/v10").RESTPostAPIGuildBulkBanResult>;
90
+ };
83
91
  }
84
92
  /** Maximun custom guild emojis per level */
85
93
  export type MaxEmojis = 50 | 100 | 150 | 250;
@@ -9,6 +9,7 @@ const GuildTemplate_1 = require("./GuildTemplate");
9
9
  const Sticker_1 = require("./Sticker");
10
10
  const channels_1 = require("./channels");
11
11
  const BaseGuild_1 = require("./extra/BaseGuild");
12
+ const GuildBan_1 = require("./GuildBan");
12
13
  class Guild extends BaseGuild_1.BaseGuild {
13
14
  joinedAt;
14
15
  memberCount;
@@ -62,5 +63,6 @@ class Guild extends BaseGuild_1.BaseGuild {
62
63
  roles = GuildRole_1.GuildRole.methods({ client: this.client, guildId: this.id });
63
64
  channels = channels_1.BaseChannel.allMethods({ client: this.client, guildId: this.id });
64
65
  emojis = GuildEmoji_1.GuildEmoji.methods({ client: this.client, guildId: this.id });
66
+ bans = GuildBan_1.GuildBan.methods({ client: this.client, guildId: this.id });
65
67
  }
66
68
  exports.Guild = Guild;
@@ -0,0 +1,25 @@
1
+ import type { APIBan, RESTGetAPIGuildBansQuery } from 'discord-api-types/v10';
2
+ import type { UsingClient } from '../commands';
3
+ import type { MethodContext, ObjectToLower } from '../common';
4
+ import { DiscordBase } from './extra/DiscordBase';
5
+ import type { BanShorter } from '../common/shorters/bans';
6
+ export interface GuildBan extends DiscordBase, ObjectToLower<Omit<APIBan, 'id'>> {
7
+ }
8
+ export declare class GuildBan extends DiscordBase {
9
+ readonly guildId: string;
10
+ constructor(client: UsingClient, data: APIBan, guildId: string);
11
+ create(body?: Parameters<BanShorter['create']>[2], reason?: string): Promise<void>;
12
+ remove(reason?: string): Promise<void>;
13
+ guild(force?: boolean): Promise<import("./Guild").Guild<"cached"> | import("./Guild").Guild<"api">>;
14
+ fetch(force?: boolean): Promise<GuildBan>;
15
+ toString(): string;
16
+ static methods({ client, guildId }: MethodContext<{
17
+ guildId: string;
18
+ }>): {
19
+ fetch: (userId: string, force?: boolean) => Promise<GuildBan>;
20
+ list: (query?: RESTGetAPIGuildBansQuery, force?: boolean) => Promise<GuildBan[]>;
21
+ create: (memberId: string, body?: Parameters<BanShorter['create']>[2], reason?: string) => Promise<void>;
22
+ remove: (memberId: string, reason?: string) => Promise<void>;
23
+ bulkCreate: (body: Parameters<BanShorter['bulkCreate']>[1], reason?: string) => Promise<import("discord-api-types/v10").RESTPostAPIGuildBulkBanResult>;
24
+ };
25
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GuildBan = void 0;
4
+ const DiscordBase_1 = require("./extra/DiscordBase");
5
+ class GuildBan extends DiscordBase_1.DiscordBase {
6
+ guildId;
7
+ constructor(client, data, guildId) {
8
+ super(client, { ...data, id: data.user.id });
9
+ this.guildId = guildId;
10
+ }
11
+ create(body, reason) {
12
+ return this.client.bans.create(this.guildId, this.id, body, reason);
13
+ }
14
+ remove(reason) {
15
+ return this.client.bans.remove(this.guildId, this.id, reason);
16
+ }
17
+ guild(force = false) {
18
+ return this.client.guilds.fetch(this.guildId, force);
19
+ }
20
+ fetch(force = false) {
21
+ return this.client.bans.fetch(this.guildId, this.id, force);
22
+ }
23
+ toString() {
24
+ return `<@${this.id}>`;
25
+ }
26
+ static methods({ client, guildId }) {
27
+ return {
28
+ fetch: (userId, force = false) => client.bans.fetch(guildId, userId, force),
29
+ list: (query, force = false) => client.bans.list(guildId, query, force),
30
+ create: (memberId, body, reason) => client.bans.create(guildId, memberId, body, reason),
31
+ remove: (memberId, reason) => client.bans.remove(guildId, memberId, reason),
32
+ bulkCreate: (body, reason) => client.bans.bulkCreate(guildId, body, reason),
33
+ };
34
+ }
35
+ }
36
+ exports.GuildBan = GuildBan;
@@ -23,7 +23,7 @@ export declare class GuildEmoji extends DiscordBase {
23
23
  guildId: string;
24
24
  }>): {
25
25
  edit: (emojiId: string, body: RESTPatchAPIGuildEmojiJSONBody, reason?: string) => Promise<GuildEmoji>;
26
- create: (body: Parameters<EmojiShorter['create']>[1]) => Promise<void>;
26
+ create: (body: Parameters<EmojiShorter['create']>[1]) => Promise<GuildEmoji>;
27
27
  fetch: (emojiId: string, force?: boolean) => Promise<GuildEmoji>;
28
28
  list: (force?: boolean) => Promise<GuildEmoji[]>;
29
29
  };
@@ -80,8 +80,13 @@ export declare class GuildMember extends BaseGuildMember {
80
80
  get displayName(): string;
81
81
  dm(force?: boolean): Promise<import("./channels").DMChannel>;
82
82
  write(body: MessageCreateBodyRequest): Promise<import("./Message").Message>;
83
- avatarURL(options?: ImageOptions): string;
84
- dynamicAvatarURL(options?: ImageOptions): string;
83
+ defaultAvatarURL(): string;
84
+ avatarURL(options: ImageOptions & {
85
+ exclude: true;
86
+ }): string | null;
87
+ avatarURL(options?: ImageOptions & {
88
+ exclude?: false;
89
+ }): string;
85
90
  bannerURL(options?: ImageOptions): string | undefined;
86
91
  fetchPermissions(force?: boolean): Promise<PermissionsBitField>;
87
92
  manageable(force?: boolean): Promise<boolean>;