seyfert 1.2.3 → 1.3.1

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 (125) hide show
  1. package/lib/api/Routes/channels.d.ts +15 -1
  2. package/lib/api/api.js +5 -1
  3. package/lib/api/shared.d.ts +3 -1
  4. package/lib/api/utils/utils.d.ts +1 -1
  5. package/lib/api/utils/utils.js +2 -2
  6. package/lib/builders/Poll.d.ts +16 -0
  7. package/lib/builders/Poll.js +48 -0
  8. package/lib/builders/index.d.ts +1 -0
  9. package/lib/builders/index.js +1 -0
  10. package/lib/cache/adapters/index.d.ts +1 -0
  11. package/lib/cache/adapters/index.js +1 -0
  12. package/lib/cache/adapters/limited.d.ts +50 -0
  13. package/lib/cache/adapters/limited.js +188 -0
  14. package/lib/cache/index.d.ts +5 -2
  15. package/lib/cache/index.js +38 -7
  16. package/lib/cache/resources/channels.d.ts +2 -1
  17. package/lib/cache/resources/default/base.d.ts +3 -3
  18. package/lib/cache/resources/default/base.js +8 -3
  19. package/lib/cache/resources/default/guild-based.d.ts +2 -1
  20. package/lib/cache/resources/default/guild-based.js +7 -3
  21. package/lib/cache/resources/default/guild-related.d.ts +2 -1
  22. package/lib/cache/resources/default/guild-related.js +7 -3
  23. package/lib/cache/resources/emojis.d.ts +2 -0
  24. package/lib/cache/resources/emojis.js +4 -0
  25. package/lib/cache/resources/guilds.d.ts +2 -0
  26. package/lib/cache/resources/guilds.js +4 -0
  27. package/lib/cache/resources/members.d.ts +2 -0
  28. package/lib/cache/resources/members.js +5 -1
  29. package/lib/cache/resources/messages.d.ts +15 -0
  30. package/lib/cache/resources/messages.js +53 -0
  31. package/lib/cache/resources/overwrites.d.ts +2 -0
  32. package/lib/cache/resources/overwrites.js +4 -0
  33. package/lib/cache/resources/presence.d.ts +1 -0
  34. package/lib/cache/resources/presence.js +4 -0
  35. package/lib/cache/resources/roles.d.ts +2 -0
  36. package/lib/cache/resources/roles.js +4 -0
  37. package/lib/cache/resources/stage-instances.d.ts +1 -0
  38. package/lib/cache/resources/stage-instances.js +5 -1
  39. package/lib/cache/resources/stickers.d.ts +2 -0
  40. package/lib/cache/resources/stickers.js +4 -0
  41. package/lib/cache/resources/threads.d.ts +2 -0
  42. package/lib/cache/resources/threads.js +4 -0
  43. package/lib/cache/resources/users.d.ts +2 -0
  44. package/lib/cache/resources/users.js +4 -0
  45. package/lib/cache/resources/voice-states.d.ts +2 -1
  46. package/lib/cache/resources/voice-states.js +8 -4
  47. package/lib/client/base.d.ts +25 -13
  48. package/lib/client/base.js +33 -8
  49. package/lib/client/client.d.ts +6 -5
  50. package/lib/client/client.js +13 -1
  51. package/lib/client/oninteractioncreate.js +2 -2
  52. package/lib/client/onmessagecreate.js +2 -2
  53. package/lib/client/workerclient.d.ts +3 -3
  54. package/lib/client/workerclient.js +18 -3
  55. package/lib/collection.d.ts +8 -3
  56. package/lib/collection.js +22 -4
  57. package/lib/commands/applications/chat.d.ts +8 -14
  58. package/lib/commands/applications/chat.js +2 -20
  59. package/lib/commands/applications/chatcontext.d.ts +1 -1
  60. package/lib/commands/applications/menucontext.d.ts +1 -1
  61. package/lib/commands/handler.d.ts +11 -7
  62. package/lib/commands/handler.js +43 -14
  63. package/lib/common/index.d.ts +2 -0
  64. package/lib/common/index.js +2 -0
  65. package/lib/common/it/utils.d.ts +0 -1
  66. package/lib/common/it/utils.js +0 -1
  67. package/lib/common/shorters/channels.d.ts +5 -3
  68. package/lib/common/shorters/channels.js +24 -10
  69. package/lib/common/shorters/guilds.d.ts +7 -6
  70. package/lib/common/shorters/guilds.js +23 -4
  71. package/lib/common/shorters/interaction.d.ts +13 -0
  72. package/lib/common/shorters/interaction.js +61 -0
  73. package/lib/common/shorters/messages.d.ts +6 -3
  74. package/lib/common/shorters/messages.js +33 -15
  75. package/lib/common/shorters/roles.d.ts +3 -3
  76. package/lib/common/shorters/roles.js +12 -17
  77. package/lib/common/shorters/templates.d.ts +7 -6
  78. package/lib/common/shorters/templates.js +28 -6
  79. package/lib/common/shorters/threads.d.ts +39 -0
  80. package/lib/common/shorters/threads.js +76 -0
  81. package/lib/common/shorters/webhook.d.ts +1 -1
  82. package/lib/common/shorters/webhook.js +8 -2
  83. package/lib/common/types/util.d.ts +8 -2
  84. package/lib/common/types/write.d.ts +8 -5
  85. package/lib/components/ButtonComponent.js +1 -1
  86. package/lib/components/componentcontext.d.ts +1 -1
  87. package/lib/components/handler.d.ts +6 -17
  88. package/lib/components/handler.js +7 -2
  89. package/lib/events/handler.d.ts +8 -14
  90. package/lib/events/handler.js +9 -4
  91. package/lib/events/hooks/auto_moderation.d.ts +5 -1
  92. package/lib/events/hooks/guild.d.ts +692 -23
  93. package/lib/events/hooks/guild.js +2 -2
  94. package/lib/events/hooks/integration.d.ts +52 -47
  95. package/lib/events/hooks/interactions.d.ts +1 -1
  96. package/lib/events/hooks/invite.d.ts +67 -3
  97. package/lib/events/hooks/message.d.ts +96 -12
  98. package/lib/events/hooks/message.js +18 -7
  99. package/lib/events/hooks/presence.d.ts +48 -2
  100. package/lib/events/hooks/thread.d.ts +155 -18
  101. package/lib/events/hooks/typing.d.ts +13 -1
  102. package/lib/events/hooks/voice.d.ts +13 -1
  103. package/lib/langs/handler.d.ts +4 -8
  104. package/lib/langs/handler.js +7 -2
  105. package/lib/structures/AutoModerationRule.d.ts +7 -7
  106. package/lib/structures/AutoModerationRule.js +2 -1
  107. package/lib/structures/Guild.d.ts +15 -13
  108. package/lib/structures/GuildRole.d.ts +5 -5
  109. package/lib/structures/GuildTemplate.d.ts +10 -10
  110. package/lib/structures/Interaction.d.ts +4 -4
  111. package/lib/structures/Interaction.js +27 -48
  112. package/lib/structures/Message.d.ts +5 -3
  113. package/lib/structures/Message.js +5 -0
  114. package/lib/structures/Poll.d.ts +15 -0
  115. package/lib/structures/Poll.js +26 -0
  116. package/lib/structures/User.js +2 -2
  117. package/lib/structures/Webhook.d.ts +2 -2
  118. package/lib/structures/channels.d.ts +6 -3
  119. package/lib/structures/channels.js +16 -8
  120. package/lib/structures/extra/Permissions.d.ts +1 -0
  121. package/lib/structures/index.d.ts +1 -0
  122. package/lib/structures/index.js +1 -0
  123. package/lib/websocket/SharedTypes.d.ts +7 -2
  124. package/lib/websocket/discord/shard.js +1 -1
  125. package/package.json +8 -8
@@ -19,8 +19,8 @@ const GUILD_CREATE = (self, data) => {
19
19
  return new structures_1.Guild(self, data);
20
20
  };
21
21
  exports.GUILD_CREATE = GUILD_CREATE;
22
- const GUILD_DELETE = async (_self, data) => {
23
- return data;
22
+ const GUILD_DELETE = async (self, data) => {
23
+ return (await self.cache.guilds?.get(data.id)) ?? data;
24
24
  };
25
25
  exports.GUILD_DELETE = GUILD_DELETE;
26
26
  const GUILD_EMOJIS_UPDATE = (self, data) => {
@@ -1,6 +1,5 @@
1
1
  import type { GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData } from 'discord-api-types/v10';
2
2
  import type { BaseClient } from '../../client/base';
3
- import { User } from '../../structures';
4
3
  export declare const INTEGRATION_CREATE: (self: BaseClient, data: GatewayIntegrationCreateDispatchData) => {
5
4
  id: string;
6
5
  name: string;
@@ -11,7 +10,25 @@ export declare const INTEGRATION_CREATE: (self: BaseClient, data: GatewayIntegra
11
10
  enableEmoticons?: boolean | undefined;
12
11
  expireBehavior?: import("discord-api-types/v10").IntegrationExpireBehavior | undefined;
13
12
  expireGracePeriod?: number | undefined;
14
- user?: import("discord-api-types/v10").APIUser | undefined;
13
+ user?: {
14
+ id?: string | undefined;
15
+ username?: string | undefined;
16
+ discriminator?: string | undefined;
17
+ globalName?: string | null | undefined;
18
+ avatar?: string | null | undefined;
19
+ bot?: boolean | undefined;
20
+ system?: boolean | undefined;
21
+ mfaEnabled?: boolean | undefined;
22
+ banner?: string | null | undefined;
23
+ accentColor?: number | null | undefined;
24
+ locale?: string | undefined;
25
+ verified?: boolean | undefined;
26
+ email?: string | null | undefined;
27
+ flags?: import("discord-api-types/v10").UserFlags | undefined;
28
+ premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
29
+ publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
30
+ avatarDecoration?: string | null | undefined;
31
+ } | undefined;
15
32
  account: {
16
33
  id: string;
17
34
  name: string;
@@ -19,28 +36,13 @@ export declare const INTEGRATION_CREATE: (self: BaseClient, data: GatewayIntegra
19
36
  syncedAt?: string | undefined;
20
37
  subscriberCount?: number | undefined;
21
38
  revoked?: boolean | undefined;
22
- application?: import("discord-api-types/v10").APIGuildIntegrationApplication | undefined;
23
- scopes?: import("discord-api-types/v10").OAuth2Scopes[] | undefined;
24
- guildId: string;
25
- } | {
26
- user: User;
27
- id: string;
28
- name: string;
29
- type: import("discord-api-types/v10").APIGuildIntegrationType;
30
- enabled: boolean;
31
- syncing?: boolean | undefined;
32
- roleId?: string | undefined;
33
- enableEmoticons?: boolean | undefined;
34
- expireBehavior?: import("discord-api-types/v10").IntegrationExpireBehavior | undefined;
35
- expireGracePeriod?: number | undefined;
36
- account: {
37
- id: string;
38
- name: string;
39
- };
40
- syncedAt?: string | undefined;
41
- subscriberCount?: number | undefined;
42
- revoked?: boolean | undefined;
43
- application?: import("discord-api-types/v10").APIGuildIntegrationApplication | undefined;
39
+ application?: {
40
+ id?: string | undefined;
41
+ name?: string | undefined;
42
+ icon?: string | null | undefined;
43
+ description?: string | undefined;
44
+ bot?: import("discord-api-types/v10").APIUser | undefined;
45
+ } | undefined;
44
46
  scopes?: import("discord-api-types/v10").OAuth2Scopes[] | undefined;
45
47
  guildId: string;
46
48
  };
@@ -54,28 +56,25 @@ export declare const INTEGRATION_UPDATE: (self: BaseClient, data: GatewayIntegra
54
56
  enableEmoticons?: boolean | undefined;
55
57
  expireBehavior?: import("discord-api-types/v10").IntegrationExpireBehavior | undefined;
56
58
  expireGracePeriod?: number | undefined;
57
- user?: import("discord-api-types/v10").APIUser | undefined;
58
- account: {
59
- id: string;
60
- name: string;
61
- };
62
- syncedAt?: string | undefined;
63
- subscriberCount?: number | undefined;
64
- revoked?: boolean | undefined;
65
- application?: import("discord-api-types/v10").APIGuildIntegrationApplication | undefined;
66
- scopes?: import("discord-api-types/v10").OAuth2Scopes[] | undefined;
67
- guildId: string;
68
- } | {
69
- user: User;
70
- id: string;
71
- name: string;
72
- type: import("discord-api-types/v10").APIGuildIntegrationType;
73
- enabled: boolean;
74
- syncing?: boolean | undefined;
75
- roleId?: string | undefined;
76
- enableEmoticons?: boolean | undefined;
77
- expireBehavior?: import("discord-api-types/v10").IntegrationExpireBehavior | undefined;
78
- expireGracePeriod?: number | undefined;
59
+ user?: {
60
+ id?: string | undefined;
61
+ username?: string | undefined;
62
+ discriminator?: string | undefined;
63
+ globalName?: string | null | undefined;
64
+ avatar?: string | null | undefined;
65
+ bot?: boolean | undefined;
66
+ system?: boolean | undefined;
67
+ mfaEnabled?: boolean | undefined;
68
+ banner?: string | null | undefined;
69
+ accentColor?: number | null | undefined;
70
+ locale?: string | undefined;
71
+ verified?: boolean | undefined;
72
+ email?: string | null | undefined;
73
+ flags?: import("discord-api-types/v10").UserFlags | undefined;
74
+ premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
75
+ publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
76
+ avatarDecoration?: string | null | undefined;
77
+ } | undefined;
79
78
  account: {
80
79
  id: string;
81
80
  name: string;
@@ -83,7 +82,13 @@ export declare const INTEGRATION_UPDATE: (self: BaseClient, data: GatewayIntegra
83
82
  syncedAt?: string | undefined;
84
83
  subscriberCount?: number | undefined;
85
84
  revoked?: boolean | undefined;
86
- application?: import("discord-api-types/v10").APIGuildIntegrationApplication | undefined;
85
+ application?: {
86
+ id?: string | undefined;
87
+ name?: string | undefined;
88
+ icon?: string | null | undefined;
89
+ description?: string | undefined;
90
+ bot?: import("discord-api-types/v10").APIUser | undefined;
91
+ } | undefined;
87
92
  scopes?: import("discord-api-types/v10").OAuth2Scopes[] | undefined;
88
93
  guildId: string;
89
94
  };
@@ -1,4 +1,4 @@
1
1
  import type { GatewayInteractionCreateDispatchData } from 'discord-api-types/v10';
2
2
  import type { BaseClient } from '../../client/base';
3
3
  import { BaseInteraction } from '../../structures';
4
- export declare const INTERACTION_CREATE: (self: BaseClient, data: GatewayInteractionCreateDispatchData) => import("../../structures").StringSelectMenuInteraction<string[]> | import("../../structures").AutocompleteInteraction<boolean> | BaseInteraction<boolean, import("discord-api-types/v10").APIPingInteraction>;
4
+ export declare const INTERACTION_CREATE: (self: BaseClient, data: GatewayInteractionCreateDispatchData) => import("../../structures").RoleSelectMenuInteraction | import("../../structures").UserSelectMenuInteraction | import("../../structures").MentionableSelectMenuInteraction | import("../../structures").ChannelSelectMenuInteraction | import("../../structures").StringSelectMenuInteraction<string[]> | import("../../structures").AutocompleteInteraction<boolean> | import("../../structures").ChatInputCommandInteraction<boolean> | import("../../structures").UserCommandInteraction<boolean> | import("../../structures").MessageCommandInteraction<boolean> | import("../../structures").ButtonInteraction | import("../../structures").ModalSubmitInteraction<boolean> | BaseInteraction<boolean, import("discord-api-types/v10").APIPingInteraction>;
@@ -5,12 +5,76 @@ export declare const INVITE_CREATE: (_self: BaseClient, data: GatewayInviteCreat
5
5
  code: string;
6
6
  createdAt: number;
7
7
  guildId?: string | undefined;
8
- inviter?: import("discord-api-types/v10").APIUser | undefined;
8
+ inviter?: {
9
+ id?: string | undefined;
10
+ username?: string | undefined;
11
+ discriminator?: string | undefined;
12
+ globalName?: string | null | undefined;
13
+ avatar?: string | null | undefined;
14
+ bot?: boolean | undefined;
15
+ system?: boolean | undefined;
16
+ mfaEnabled?: boolean | undefined;
17
+ banner?: string | null | undefined;
18
+ accentColor?: number | null | undefined;
19
+ locale?: string | undefined;
20
+ verified?: boolean | undefined;
21
+ email?: string | null | undefined;
22
+ flags?: import("discord-api-types/v10").UserFlags | undefined;
23
+ premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
24
+ publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
25
+ avatarDecoration?: string | null | undefined;
26
+ } | undefined;
9
27
  maxAge: number;
10
28
  maxUses: number;
11
29
  targetType?: import("discord-api-types/v10").InviteTargetType | undefined;
12
- targetUser?: import("discord-api-types/v10").APIUser | undefined;
13
- targetApplication?: Partial<import("discord-api-types/v10").APIApplication> | undefined;
30
+ targetUser?: {
31
+ id?: string | undefined;
32
+ username?: string | undefined;
33
+ discriminator?: string | undefined;
34
+ globalName?: string | null | undefined;
35
+ avatar?: string | null | undefined;
36
+ bot?: boolean | undefined;
37
+ system?: boolean | undefined;
38
+ mfaEnabled?: boolean | undefined;
39
+ banner?: string | null | undefined;
40
+ accentColor?: number | null | undefined;
41
+ locale?: string | undefined;
42
+ verified?: boolean | undefined;
43
+ email?: string | null | undefined;
44
+ flags?: import("discord-api-types/v10").UserFlags | undefined;
45
+ premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
46
+ publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
47
+ avatarDecoration?: string | null | undefined;
48
+ } | undefined;
49
+ targetApplication?: {
50
+ id?: string | undefined;
51
+ name?: string | undefined;
52
+ icon?: string | null | undefined;
53
+ description?: string | undefined;
54
+ rpcOrigins?: string[] | undefined;
55
+ botPublic?: boolean | undefined;
56
+ botRequireCodeGrant?: boolean | undefined;
57
+ bot?: import("discord-api-types/v10").APIUser | undefined;
58
+ termsOfServiceUrl?: string | undefined;
59
+ privacyPolicyUrl?: string | undefined;
60
+ owner?: import("discord-api-types/v10").APIUser | undefined;
61
+ summary?: "" | undefined;
62
+ verifyKey?: string | undefined;
63
+ team?: import("discord-api-types/v10").APITeam | null | undefined;
64
+ guildId?: string | undefined;
65
+ guild?: import("discord-api-types/v10").APIPartialGuild | undefined;
66
+ primarySkuId?: string | undefined;
67
+ slug?: string | undefined;
68
+ coverImage?: string | undefined;
69
+ flags?: import("discord-api-types/v10").ApplicationFlags | undefined;
70
+ approximateGuildCount?: number | undefined;
71
+ redirectUris?: string[] | undefined;
72
+ interactionsEndpointUrl?: string | undefined;
73
+ roleConnectionsVerificationUrl?: string | undefined;
74
+ tags?: [string, (string | undefined)?, (string | undefined)?, (string | undefined)?, (string | undefined)?] | undefined;
75
+ installParams?: import("discord-api-types/v10").APIApplicationInstallParams | undefined;
76
+ customInstallUrl?: string | undefined;
77
+ } | undefined;
14
78
  temporary: boolean;
15
79
  uses: 0;
16
80
  };
@@ -1,22 +1,41 @@
1
- import type { GatewayMessageCreateDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData } from 'discord-api-types/v10';
1
+ import type { GatewayMessageCreateDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessageDeleteDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData } from 'discord-api-types/v10';
2
2
  import type { BaseClient } from '../../client/base';
3
3
  import { type MakeRequired, type PartialClass } from '../../common';
4
4
  import { Message } from '../../structures';
5
5
  export declare const MESSAGE_CREATE: (self: BaseClient, data: GatewayMessageCreateDispatchData) => Message;
6
- export declare const MESSAGE_DELETE: (_self: BaseClient, data: GatewayMessageDeleteDispatchData) => {
6
+ export declare const MESSAGE_DELETE: (self: BaseClient, data: GatewayMessageDeleteDispatchData) => Promise<{
7
7
  id: string;
8
8
  channelId: string;
9
9
  guildId?: string | undefined;
10
- };
11
- export declare const MESSAGE_DELETE_BULK: (_self: BaseClient, data: GatewayMessageDeleteBulkDispatchData) => {
10
+ }>;
11
+ export declare const MESSAGE_DELETE_BULK: (self: BaseClient, data: GatewayMessageDeleteBulkDispatchData) => Promise<{
12
+ messages: import("../..").ReturnCache<Message | undefined>[];
12
13
  ids: string[];
13
- channelId: string;
14
- guildId?: string | undefined;
15
- };
14
+ channel_id: string;
15
+ guild_id?: string | undefined;
16
+ }>;
16
17
  export declare const MESSAGE_REACTION_ADD: (_self: BaseClient, data: GatewayMessageReactionAddDispatchData) => {
17
18
  emoji: {
18
19
  roles?: string[] | undefined;
19
- user?: import("discord-api-types/v10").APIUser | undefined;
20
+ user?: {
21
+ id?: string | undefined;
22
+ username?: string | undefined;
23
+ discriminator?: string | undefined;
24
+ globalName?: string | null | undefined;
25
+ avatar?: string | null | undefined;
26
+ bot?: boolean | undefined;
27
+ system?: boolean | undefined;
28
+ mfaEnabled?: boolean | undefined;
29
+ banner?: string | null | undefined;
30
+ accentColor?: number | null | undefined;
31
+ locale?: string | undefined;
32
+ verified?: boolean | undefined;
33
+ email?: string | null | undefined;
34
+ flags?: import("discord-api-types/v10").UserFlags | undefined;
35
+ premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
36
+ publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
37
+ avatarDecoration?: string | null | undefined;
38
+ } | undefined;
20
39
  requireColons?: boolean | undefined;
21
40
  managed?: boolean | undefined;
22
41
  available?: boolean | undefined;
@@ -27,14 +46,44 @@ export declare const MESSAGE_REACTION_ADD: (_self: BaseClient, data: GatewayMess
27
46
  guildId?: string | undefined;
28
47
  channelId: string;
29
48
  messageId: string;
30
- member?: import("discord-api-types/v10").APIGuildMember | undefined;
49
+ member?: {
50
+ user?: import("discord-api-types/v10").APIUser | undefined;
51
+ nick?: string | null | undefined;
52
+ avatar?: string | null | undefined;
53
+ roles?: string[] | undefined;
54
+ joinedAt?: string | undefined;
55
+ premiumSince?: string | null | undefined;
56
+ deaf?: boolean | undefined;
57
+ mute?: boolean | undefined;
58
+ flags?: import("discord-api-types/v10").GuildMemberFlags | undefined;
59
+ pending?: boolean | undefined;
60
+ communicationDisabledUntil?: string | null | undefined;
61
+ } | undefined;
31
62
  userId: string;
32
63
  messageAuthorId?: string | undefined;
33
64
  };
34
65
  export declare const MESSAGE_REACTION_REMOVE: (_self: BaseClient, data: GatewayMessageReactionRemoveDispatchData) => {
35
66
  emoji: {
36
67
  roles?: string[] | undefined;
37
- user?: import("discord-api-types/v10").APIUser | undefined;
68
+ user?: {
69
+ id?: string | undefined;
70
+ username?: string | undefined;
71
+ discriminator?: string | undefined;
72
+ globalName?: string | null | undefined;
73
+ avatar?: string | null | undefined;
74
+ bot?: boolean | undefined;
75
+ system?: boolean | undefined;
76
+ mfaEnabled?: boolean | undefined;
77
+ banner?: string | null | undefined;
78
+ accentColor?: number | null | undefined;
79
+ locale?: string | undefined;
80
+ verified?: boolean | undefined;
81
+ email?: string | null | undefined;
82
+ flags?: import("discord-api-types/v10").UserFlags | undefined;
83
+ premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
84
+ publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
85
+ avatarDecoration?: string | null | undefined;
86
+ } | undefined;
38
87
  requireColons?: boolean | undefined;
39
88
  managed?: boolean | undefined;
40
89
  available?: boolean | undefined;
@@ -55,7 +104,25 @@ export declare const MESSAGE_REACTION_REMOVE_ALL: (_self: BaseClient, data: Gate
55
104
  export declare const MESSAGE_REACTION_REMOVE_EMOJI: (_self: BaseClient, data: GatewayMessageReactionRemoveEmojiDispatchData) => {
56
105
  emoji: {
57
106
  roles?: string[] | undefined;
58
- user?: import("discord-api-types/v10").APIUser | undefined;
107
+ user?: {
108
+ id?: string | undefined;
109
+ username?: string | undefined;
110
+ discriminator?: string | undefined;
111
+ globalName?: string | null | undefined;
112
+ avatar?: string | null | undefined;
113
+ bot?: boolean | undefined;
114
+ system?: boolean | undefined;
115
+ mfaEnabled?: boolean | undefined;
116
+ banner?: string | null | undefined;
117
+ accentColor?: number | null | undefined;
118
+ locale?: string | undefined;
119
+ verified?: boolean | undefined;
120
+ email?: string | null | undefined;
121
+ flags?: import("discord-api-types/v10").UserFlags | undefined;
122
+ premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
123
+ publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
124
+ avatarDecoration?: string | null | undefined;
125
+ } | undefined;
59
126
  requireColons?: boolean | undefined;
60
127
  managed?: boolean | undefined;
61
128
  available?: boolean | undefined;
@@ -67,4 +134,21 @@ export declare const MESSAGE_REACTION_REMOVE_EMOJI: (_self: BaseClient, data: Ga
67
134
  messageId: string;
68
135
  guildId?: string | undefined;
69
136
  };
70
- export declare const MESSAGE_UPDATE: (self: BaseClient, data: GatewayMessageUpdateDispatchData) => MakeRequired<PartialClass<Message>, 'id' | 'channelId' | 'createdAt' | 'createdTimestamp' | 'rest' | 'cache' | 'api' | 'client'>;
137
+ export declare const MESSAGE_UPDATE: (self: BaseClient, data: GatewayMessageUpdateDispatchData) => Promise<[
138
+ undefined | Message,
139
+ MakeRequired<PartialClass<Message>, 'id' | 'channelId' | 'createdAt' | 'createdTimestamp' | 'rest' | 'cache' | 'api' | 'client'>
140
+ ]>;
141
+ export declare const MESSAGE_POLL_VOTE_ADD: (_: BaseClient, data: GatewayMessagePollVoteDispatchData) => {
142
+ userId: string;
143
+ channelId: string;
144
+ messageId: string;
145
+ guildId?: string | undefined;
146
+ answerId: number;
147
+ };
148
+ export declare const MESSAGE_POLL_VOTE_REMOVE: (_: BaseClient, data: GatewayMessagePollVoteDispatchData) => {
149
+ userId: string;
150
+ channelId: string;
151
+ messageId: string;
152
+ guildId?: string | undefined;
153
+ answerId: number;
154
+ };
@@ -1,18 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MESSAGE_UPDATE = exports.MESSAGE_REACTION_REMOVE_EMOJI = exports.MESSAGE_REACTION_REMOVE_ALL = exports.MESSAGE_REACTION_REMOVE = exports.MESSAGE_REACTION_ADD = exports.MESSAGE_DELETE_BULK = exports.MESSAGE_DELETE = exports.MESSAGE_CREATE = void 0;
3
+ exports.MESSAGE_POLL_VOTE_REMOVE = exports.MESSAGE_POLL_VOTE_ADD = exports.MESSAGE_UPDATE = exports.MESSAGE_REACTION_REMOVE_EMOJI = exports.MESSAGE_REACTION_REMOVE_ALL = exports.MESSAGE_REACTION_REMOVE = exports.MESSAGE_REACTION_ADD = exports.MESSAGE_DELETE_BULK = exports.MESSAGE_DELETE = exports.MESSAGE_CREATE = void 0;
4
4
  const common_1 = require("../../common");
5
5
  const structures_1 = require("../../structures");
6
6
  const MESSAGE_CREATE = (self, data) => {
7
7
  return new structures_1.Message(self, data);
8
8
  };
9
9
  exports.MESSAGE_CREATE = MESSAGE_CREATE;
10
- const MESSAGE_DELETE = (_self, data) => {
11
- return (0, common_1.toCamelCase)(data);
10
+ const MESSAGE_DELETE = async (self, data) => {
11
+ return (await self.cache.messages?.get(data.id)) ?? (0, common_1.toCamelCase)(data);
12
12
  };
13
13
  exports.MESSAGE_DELETE = MESSAGE_DELETE;
14
- const MESSAGE_DELETE_BULK = (_self, data) => {
15
- return (0, common_1.toCamelCase)(data);
14
+ const MESSAGE_DELETE_BULK = async (self, data) => {
15
+ return {
16
+ ...data,
17
+ messages: await Promise.all(data.ids.map(id => self.cache.messages?.get(id))),
18
+ };
16
19
  };
17
20
  exports.MESSAGE_DELETE_BULK = MESSAGE_DELETE_BULK;
18
21
  const MESSAGE_REACTION_ADD = (_self, data) => {
@@ -31,7 +34,15 @@ const MESSAGE_REACTION_REMOVE_EMOJI = (_self, data) => {
31
34
  return (0, common_1.toCamelCase)(data);
32
35
  };
33
36
  exports.MESSAGE_REACTION_REMOVE_EMOJI = MESSAGE_REACTION_REMOVE_EMOJI;
34
- const MESSAGE_UPDATE = (self, data) => {
35
- return new structures_1.Message(self, data);
37
+ const MESSAGE_UPDATE = async (self, data) => {
38
+ return [await self.cache.messages?.get(data.id), new structures_1.Message(self, data)];
36
39
  };
37
40
  exports.MESSAGE_UPDATE = MESSAGE_UPDATE;
41
+ const MESSAGE_POLL_VOTE_ADD = (_, data) => {
42
+ return (0, common_1.toCamelCase)(data);
43
+ };
44
+ exports.MESSAGE_POLL_VOTE_ADD = MESSAGE_POLL_VOTE_ADD;
45
+ const MESSAGE_POLL_VOTE_REMOVE = (_, data) => {
46
+ return (0, common_1.toCamelCase)(data);
47
+ };
48
+ exports.MESSAGE_POLL_VOTE_REMOVE = MESSAGE_POLL_VOTE_REMOVE;
@@ -22,6 +22,52 @@ export declare const PRESENCE_UPDATE: (_self: BaseClient, data: GatewayPresenceU
22
22
  };
23
23
  guildId: string;
24
24
  status?: import("discord-api-types/v10").PresenceUpdateReceiveStatus | undefined;
25
- activities?: import("discord-api-types/v10").GatewayActivity[] | undefined;
26
- clientStatus?: import("discord-api-types/v10").GatewayPresenceClientStatus | undefined;
25
+ activities?: {
26
+ id: string;
27
+ name: string;
28
+ type: import("discord-api-types/v10").ActivityType;
29
+ url?: string | null | undefined;
30
+ createdAt: number;
31
+ timestamps?: {
32
+ start?: number | undefined;
33
+ end?: number | undefined;
34
+ } | undefined;
35
+ syncId?: string | undefined;
36
+ platform?: string | undefined;
37
+ applicationId?: string | undefined;
38
+ details?: string | null | undefined;
39
+ state?: string | null | undefined;
40
+ emoji?: {
41
+ id?: string | null | undefined;
42
+ animated?: boolean | undefined;
43
+ name?: string | null | undefined;
44
+ } | undefined;
45
+ sessionId?: string | undefined;
46
+ party?: {
47
+ id?: string | undefined;
48
+ size?: [current_size: number, max_size: number] | undefined;
49
+ } | undefined;
50
+ assets?: {
51
+ largeImage?: string | undefined;
52
+ largeText?: string | undefined;
53
+ smallImage?: string | undefined;
54
+ smallText?: string | undefined;
55
+ } | undefined;
56
+ secrets?: {
57
+ match?: string | undefined;
58
+ join?: string | undefined;
59
+ spectate?: string | undefined;
60
+ } | undefined;
61
+ instance?: boolean | undefined;
62
+ flags?: import("discord-api-types/v10").ActivityFlags | undefined;
63
+ buttons?: string[] | {
64
+ label: string;
65
+ url: string;
66
+ }[] | undefined;
67
+ }[] | undefined;
68
+ clientStatus?: {
69
+ desktop?: import("discord-api-types/v10").PresenceUpdateReceiveStatus | undefined;
70
+ mobile?: import("discord-api-types/v10").PresenceUpdateReceiveStatus | undefined;
71
+ web?: import("discord-api-types/v10").PresenceUpdateReceiveStatus | undefined;
72
+ } | undefined;
27
73
  };