disgroove 1.2.9 → 1.3.0-dev.3af784e
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.
- package/dist/Client.d.ts +43 -43
- package/dist/Client.js +76 -76
- package/dist/Client.js.map +1 -1
- package/dist/gateway/Shard.js +32 -36
- package/dist/gateway/Shard.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/rest/Endpoints.d.ts +1 -1
- package/dist/rest/Endpoints.js +3 -3
- package/dist/rest/RequestsManager.js +1 -1
- package/dist/rest/RequestsManager.js.map +1 -1
- package/dist/structures/Application.d.ts +72 -72
- package/dist/structures/Application.js +128 -155
- package/dist/structures/Application.js.map +1 -1
- package/dist/structures/ApplicationCommand.d.ts +4 -4
- package/dist/structures/ApplicationCommand.js +19 -19
- package/dist/structures/ApplicationCommand.js.map +1 -1
- package/dist/structures/AuditLog.d.ts +20 -0
- package/dist/structures/AuditLog.js +76 -0
- package/dist/structures/AuditLog.js.map +1 -0
- package/dist/structures/AutoModerationRule.d.ts +7 -7
- package/dist/structures/AutoModerationRule.js +7 -7
- package/dist/structures/AutoModerationRule.js.map +1 -1
- package/dist/structures/Channel.d.ts +134 -134
- package/dist/structures/Channel.js +263 -263
- package/dist/structures/Channel.js.map +1 -1
- package/dist/structures/ClientApplication.d.ts +324 -0
- package/dist/structures/ClientApplication.js +241 -0
- package/dist/structures/ClientApplication.js.map +1 -0
- package/dist/structures/Emoji.d.ts +2 -2
- package/dist/structures/Emoji.js +9 -9
- package/dist/structures/Emoji.js.map +1 -1
- package/dist/structures/Entitlement.d.ts +24 -0
- package/dist/structures/Entitlement.js +68 -0
- package/dist/structures/Entitlement.js.map +1 -0
- package/dist/structures/Guild.d.ts +311 -311
- package/dist/structures/Guild.js +615 -661
- package/dist/structures/Guild.js.map +1 -1
- package/dist/structures/GuildMember.d.ts +10 -10
- package/dist/structures/GuildMember.js +30 -30
- package/dist/structures/GuildMember.js.map +1 -1
- package/dist/structures/GuildScheduledEvent.d.ts +2 -2
- package/dist/structures/GuildScheduledEvent.js +7 -7
- package/dist/structures/GuildScheduledEvent.js.map +1 -1
- package/dist/structures/GuildTemplate.d.ts +4 -4
- package/dist/structures/GuildTemplate.js +7 -9
- package/dist/structures/GuildTemplate.js.map +1 -1
- package/dist/structures/Integration.d.ts +1 -1
- package/dist/structures/Integration.js +2 -2
- package/dist/structures/Integration.js.map +1 -1
- package/dist/structures/Interaction.d.ts +27 -42
- package/dist/structures/Interaction.js +97 -130
- package/dist/structures/Interaction.js.map +1 -1
- package/dist/structures/Invite.d.ts +2 -1
- package/dist/structures/Invite.js +1 -1
- package/dist/structures/Invite.js.map +1 -1
- package/dist/structures/Message.d.ts +23 -20
- package/dist/structures/Message.js +71 -206
- package/dist/structures/Message.js.map +1 -1
- package/dist/structures/PartialApplication.d.ts +70 -70
- package/dist/structures/PartialApplication.js +128 -155
- package/dist/structures/PartialApplication.js.map +1 -1
- package/dist/structures/Role.d.ts +2 -2
- package/dist/structures/Role.js +7 -7
- package/dist/structures/Role.js.map +1 -1
- package/dist/structures/SKU.d.ts +23 -0
- package/dist/structures/SKU.js +63 -0
- package/dist/structures/SKU.js.map +1 -0
- package/dist/structures/StageInstance.d.ts +3 -3
- package/dist/structures/StageInstance.js +7 -7
- package/dist/structures/StageInstance.js.map +1 -1
- package/dist/structures/Sticker.d.ts +2 -2
- package/dist/structures/Sticker.js +9 -9
- package/dist/structures/Sticker.js.map +1 -1
- package/dist/structures/Team.js +2 -2
- package/dist/structures/Team.js.map +1 -1
- package/dist/structures/TestEntitlement.d.ts +23 -0
- package/dist/structures/TestEntitlement.js +61 -0
- package/dist/structures/TestEntitlement.js.map +1 -0
- package/dist/structures/UnavailableGuild.d.ts +2 -487
- package/dist/structures/UnavailableGuild.js +1 -917
- package/dist/structures/UnavailableGuild.js.map +1 -1
- package/dist/structures/User.d.ts +13 -13
- package/dist/structures/User.js +35 -34
- package/dist/structures/User.js.map +1 -1
- package/dist/structures/Webhook.d.ts +26 -26
- package/dist/structures/Webhook.js +116 -148
- package/dist/structures/Webhook.js.map +1 -1
- package/dist/structures/index.d.ts +5 -1
- package/dist/structures/index.js +5 -1
- package/dist/structures/index.js.map +1 -1
- package/dist/types/application.d.ts +3 -3
- package/dist/types/auto-moderation.d.ts +3 -3
- package/dist/types/channel.d.ts +36 -21
- package/dist/types/gateway-events.d.ts +12 -12
- package/dist/types/guild.d.ts +5 -5
- package/dist/types/interaction.d.ts +57 -40
- package/dist/types/invite.d.ts +3 -2
- package/dist/types/message-components.d.ts +4 -4
- package/dist/types/sku.d.ts +1 -1
- package/dist/types/stage-instance.d.ts +3 -2
- package/dist/types/team.d.ts +1 -1
- package/dist/types/user.d.ts +3 -3
- package/dist/utils/Util.d.ts +11 -482
- package/dist/utils/Util.js +329 -151
- package/dist/utils/Util.js.map +1 -1
- package/package.json +1 -1
|
@@ -41,34 +41,20 @@ class Webhook extends _1.Base {
|
|
|
41
41
|
if (data.url !== undefined)
|
|
42
42
|
this.url = data.url;
|
|
43
43
|
}
|
|
44
|
-
/** https://discord.com/developers/docs/resources/webhook#
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
json: {
|
|
48
|
-
name: options.name,
|
|
49
|
-
avatar: options.avatar,
|
|
50
|
-
channel_id: options.channelId,
|
|
51
|
-
},
|
|
44
|
+
/** https://discord.com/developers/docs/resources/webhook#delete-webhook */
|
|
45
|
+
delete(reason) {
|
|
46
|
+
this.client.rest.delete(rest_1.Endpoints.webhook(this.id), {
|
|
52
47
|
reason,
|
|
53
|
-
})
|
|
48
|
+
});
|
|
54
49
|
}
|
|
55
|
-
/** https://discord.com/developers/docs/resources/webhook#
|
|
56
|
-
|
|
50
|
+
/** https://discord.com/developers/docs/resources/webhook#delete-webhook-message */
|
|
51
|
+
deleteMessage(messageId, options) {
|
|
57
52
|
if (!this.token)
|
|
58
53
|
throw new Error("[disgroove] Webhook token not found");
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
avatar: options.avatar,
|
|
54
|
+
this.client.rest.delete(rest_1.Endpoints.webhookMessage(this.id, this.token, messageId), {
|
|
55
|
+
query: {
|
|
56
|
+
thread_id: options?.threadId,
|
|
63
57
|
},
|
|
64
|
-
reason,
|
|
65
|
-
authorization: false,
|
|
66
|
-
}), this.client);
|
|
67
|
-
}
|
|
68
|
-
/** https://discord.com/developers/docs/resources/webhook#delete-webhook */
|
|
69
|
-
delete(reason) {
|
|
70
|
-
this.client.rest.delete(rest_1.Endpoints.webhook(this.id), {
|
|
71
|
-
reason,
|
|
72
58
|
});
|
|
73
59
|
}
|
|
74
60
|
/** https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token */
|
|
@@ -80,138 +66,71 @@ class Webhook extends _1.Base {
|
|
|
80
66
|
authorization: false,
|
|
81
67
|
});
|
|
82
68
|
}
|
|
83
|
-
/** https://discord.com/developers/docs/resources/webhook#
|
|
84
|
-
async
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
? options.embeds !== null
|
|
94
|
-
? this.client.util.embedsToRaw(options.embeds)
|
|
95
|
-
: null
|
|
96
|
-
: undefined,
|
|
97
|
-
allowed_mentions: {
|
|
98
|
-
parse: options.allowedMentions?.parse,
|
|
99
|
-
roles: options.allowedMentions?.roles,
|
|
100
|
-
users: options.allowedMentions?.users,
|
|
101
|
-
replied_user: options.allowedMentions?.repliedUser,
|
|
102
|
-
},
|
|
103
|
-
components: options.components !== undefined
|
|
104
|
-
? options.components !== null
|
|
105
|
-
? this.client.util.messageComponentToRaw(options.components)
|
|
106
|
-
: null
|
|
107
|
-
: undefined,
|
|
108
|
-
attachments: options.attachments,
|
|
109
|
-
flags: options.flags,
|
|
110
|
-
thread_name: options.threadName,
|
|
111
|
-
},
|
|
112
|
-
files: options.files,
|
|
113
|
-
query: {
|
|
114
|
-
wait: options.wait,
|
|
115
|
-
thread_id: options.threadId,
|
|
116
|
-
username: options.username,
|
|
117
|
-
avatarURL: options.avatarURL,
|
|
118
|
-
},
|
|
119
|
-
}), this.client);
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
this.client.rest.post(rest_1.Endpoints.webhook(this.id, this.token), {
|
|
123
|
-
json: {
|
|
124
|
-
content: options.content,
|
|
125
|
-
tts: options.tts,
|
|
126
|
-
embeds: options.embeds !== undefined
|
|
127
|
-
? options.embeds !== null
|
|
128
|
-
? this.client.util.embedsToRaw(options.embeds)
|
|
129
|
-
: null
|
|
130
|
-
: undefined,
|
|
131
|
-
allowed_mentions: {
|
|
132
|
-
parse: options.allowedMentions?.parse,
|
|
133
|
-
roles: options.allowedMentions?.roles,
|
|
134
|
-
users: options.allowedMentions?.users,
|
|
135
|
-
replied_user: options.allowedMentions?.repliedUser,
|
|
136
|
-
},
|
|
137
|
-
components: options.components !== undefined
|
|
138
|
-
? options.components !== null
|
|
139
|
-
? this.client.util.messageComponentToRaw(options.components)
|
|
140
|
-
: null
|
|
141
|
-
: undefined,
|
|
142
|
-
attachments: options.attachments,
|
|
143
|
-
flags: options.flags,
|
|
144
|
-
thread_name: options.threadName,
|
|
145
|
-
},
|
|
146
|
-
files: options.files,
|
|
147
|
-
query: {
|
|
148
|
-
wait: options.wait,
|
|
149
|
-
thread_id: options.threadId,
|
|
150
|
-
username: options.username,
|
|
151
|
-
avatarURL: options.avatarURL,
|
|
152
|
-
},
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
/** https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook */
|
|
157
|
-
async executeSlackCompatible(options) {
|
|
158
|
-
if (!this.token)
|
|
159
|
-
throw new Error("[disgroove] Webhook token not found");
|
|
160
|
-
if (options.wait || options.wait === undefined) {
|
|
161
|
-
return new _1.Message(await this.client.rest.post(rest_1.Endpoints.webhookPlatform(this.id, this.token, "slack"), {
|
|
162
|
-
query: {
|
|
163
|
-
thread_id: options.threadId,
|
|
164
|
-
wait: options.wait,
|
|
165
|
-
},
|
|
166
|
-
}), this.client);
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
this.client.rest.post(rest_1.Endpoints.webhookPlatform(this.id, this.token, "slack"), {
|
|
170
|
-
query: {
|
|
171
|
-
thread_id: options.threadId,
|
|
172
|
-
wait: options.wait,
|
|
173
|
-
},
|
|
174
|
-
});
|
|
175
|
-
}
|
|
69
|
+
/** https://discord.com/developers/docs/resources/webhook#modify-webhook */
|
|
70
|
+
async edit(options, reason) {
|
|
71
|
+
return new Webhook(await this.client.rest.patch(rest_1.Endpoints.webhook(this.id), {
|
|
72
|
+
json: {
|
|
73
|
+
name: options.name,
|
|
74
|
+
avatar: options.avatar,
|
|
75
|
+
channel_id: options.channelId,
|
|
76
|
+
},
|
|
77
|
+
reason,
|
|
78
|
+
}), this.client);
|
|
176
79
|
}
|
|
177
|
-
/** https://discord.com/developers/docs/resources/webhook#
|
|
178
|
-
async
|
|
80
|
+
/** https://discord.com/developers/docs/resources/webhook#edit-webhook-message */
|
|
81
|
+
async editMessage(messageId, options) {
|
|
179
82
|
if (!this.token)
|
|
180
83
|
throw new Error("[disgroove] Webhook token not found");
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
84
|
+
return new _1.Message(await this.client.rest.patch(rest_1.Endpoints.webhookMessage(this.id, this.token, messageId), {
|
|
85
|
+
json: {
|
|
86
|
+
content: options.content,
|
|
87
|
+
embeds: options.embeds !== undefined
|
|
88
|
+
? options.embeds !== null
|
|
89
|
+
? this.client.util.embedsToRaw(options.embeds)
|
|
90
|
+
: null
|
|
91
|
+
: undefined,
|
|
92
|
+
allowed_mentions: {
|
|
93
|
+
parse: options.allowedMentions?.parse,
|
|
94
|
+
roles: options.allowedMentions?.roles,
|
|
95
|
+
users: options.allowedMentions?.users,
|
|
96
|
+
replied_user: options.allowedMentions?.repliedUser,
|
|
194
97
|
},
|
|
195
|
-
|
|
196
|
-
|
|
98
|
+
components: options.components !== undefined
|
|
99
|
+
? options.components !== null
|
|
100
|
+
? this.client.util.messageComponentsToRaw(options.components)
|
|
101
|
+
: null
|
|
102
|
+
: undefined,
|
|
103
|
+
attachments: options.attachments,
|
|
104
|
+
flags: options.flags,
|
|
105
|
+
},
|
|
106
|
+
files: options.files,
|
|
107
|
+
query: {
|
|
108
|
+
thread_id: options.threadId,
|
|
109
|
+
},
|
|
110
|
+
}), this.client);
|
|
197
111
|
}
|
|
198
|
-
/** https://discord.com/developers/docs/resources/webhook#
|
|
199
|
-
async
|
|
112
|
+
/** https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token */
|
|
113
|
+
async editWithToken(options, reason) {
|
|
200
114
|
if (!this.token)
|
|
201
115
|
throw new Error("[disgroove] Webhook token not found");
|
|
202
|
-
return new
|
|
203
|
-
|
|
204
|
-
|
|
116
|
+
return new Webhook(await this.client.rest.patch(rest_1.Endpoints.webhook(this.id, this.token), {
|
|
117
|
+
json: {
|
|
118
|
+
name: options.name,
|
|
119
|
+
avatar: options.avatar,
|
|
205
120
|
},
|
|
121
|
+
reason,
|
|
122
|
+
authorization: false,
|
|
206
123
|
}), this.client);
|
|
207
124
|
}
|
|
208
|
-
/** https://discord.com/developers/docs/resources/webhook#
|
|
209
|
-
async
|
|
125
|
+
/** https://discord.com/developers/docs/resources/webhook#execute-webhook */
|
|
126
|
+
async execute(options) {
|
|
210
127
|
if (!this.token)
|
|
211
128
|
throw new Error("[disgroove] Webhook token not found");
|
|
212
|
-
return
|
|
129
|
+
return this.client.rest
|
|
130
|
+
.post(rest_1.Endpoints.webhook(this.id, this.token), {
|
|
213
131
|
json: {
|
|
214
132
|
content: options.content,
|
|
133
|
+
tts: options.tts,
|
|
215
134
|
embeds: options.embeds !== undefined
|
|
216
135
|
? options.embeds !== null
|
|
217
136
|
? this.client.util.embedsToRaw(options.embeds)
|
|
@@ -225,34 +144,83 @@ class Webhook extends _1.Base {
|
|
|
225
144
|
},
|
|
226
145
|
components: options.components !== undefined
|
|
227
146
|
? options.components !== null
|
|
228
|
-
? this.client.util.
|
|
147
|
+
? this.client.util.messageComponentsToRaw(options.components)
|
|
229
148
|
: null
|
|
230
149
|
: undefined,
|
|
231
150
|
attachments: options.attachments,
|
|
232
151
|
flags: options.flags,
|
|
152
|
+
thread_name: options.threadName,
|
|
233
153
|
},
|
|
234
154
|
files: options.files,
|
|
235
155
|
query: {
|
|
156
|
+
wait: options.wait,
|
|
236
157
|
thread_id: options.threadId,
|
|
158
|
+
username: options.username,
|
|
159
|
+
avatarURL: options.avatarURL,
|
|
237
160
|
},
|
|
238
|
-
})
|
|
161
|
+
})
|
|
162
|
+
.then((response) => {
|
|
163
|
+
if (response !== null) {
|
|
164
|
+
return new _1.Message(response, this.client);
|
|
165
|
+
}
|
|
166
|
+
else
|
|
167
|
+
return null;
|
|
168
|
+
});
|
|
239
169
|
}
|
|
240
|
-
/** https://discord.com/developers/docs/resources/webhook#
|
|
241
|
-
|
|
170
|
+
/** https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook */
|
|
171
|
+
async executeGitHubCompatible(options) {
|
|
242
172
|
if (!this.token)
|
|
243
173
|
throw new Error("[disgroove] Webhook token not found");
|
|
244
|
-
this.client.rest
|
|
174
|
+
return this.client.rest
|
|
175
|
+
.post(rest_1.Endpoints.webhookPlatform(this.id, this.token, "github"), {
|
|
245
176
|
query: {
|
|
246
|
-
thread_id: options
|
|
177
|
+
thread_id: options.threadId,
|
|
178
|
+
wait: options.wait,
|
|
247
179
|
},
|
|
180
|
+
})
|
|
181
|
+
.then((response) => {
|
|
182
|
+
if (response !== null) {
|
|
183
|
+
return new _1.Message(response, this.client);
|
|
184
|
+
}
|
|
185
|
+
else
|
|
186
|
+
return null;
|
|
248
187
|
});
|
|
249
188
|
}
|
|
189
|
+
/** https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook */
|
|
190
|
+
async executeSlackCompatible(options) {
|
|
191
|
+
if (!this.token)
|
|
192
|
+
throw new Error("[disgroove] Webhook token not found");
|
|
193
|
+
return this.client.rest
|
|
194
|
+
.post(rest_1.Endpoints.webhookPlatform(this.id, this.token, "slack"), {
|
|
195
|
+
query: {
|
|
196
|
+
thread_id: options.threadId,
|
|
197
|
+
wait: options.wait,
|
|
198
|
+
},
|
|
199
|
+
})
|
|
200
|
+
.then((response) => {
|
|
201
|
+
if (response !== null) {
|
|
202
|
+
return new _1.Message(response, this.client);
|
|
203
|
+
}
|
|
204
|
+
else
|
|
205
|
+
return null;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/** https://discord.com/developers/docs/resources/webhook#get-webhook-message */
|
|
209
|
+
async getMessage(messageId, options) {
|
|
210
|
+
if (!this.token)
|
|
211
|
+
throw new Error("[disgroove] Webhook token not found");
|
|
212
|
+
return new _1.Message(await this.client.rest.get(rest_1.Endpoints.webhookMessage(this.id, this.token, messageId), {
|
|
213
|
+
query: {
|
|
214
|
+
thread_id: options?.threadId,
|
|
215
|
+
},
|
|
216
|
+
}), this.client);
|
|
217
|
+
}
|
|
250
218
|
toRaw() {
|
|
251
219
|
return this.raw;
|
|
252
220
|
}
|
|
253
221
|
toJSON() {
|
|
254
222
|
return {
|
|
255
|
-
|
|
223
|
+
...super.toJSON(),
|
|
256
224
|
type: this.type,
|
|
257
225
|
guildId: this.guildId,
|
|
258
226
|
channelId: this.channelId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Webhook.js","sourceRoot":"","sources":["../../src/structures/Webhook.ts"],"names":[],"mappings":";;;AAAA,wBAAwD;AAExD,kCAA+C;AAY/C,4DAA4D;AAC5D,MAAa,OAAQ,SAAQ,OAAI;IACZ,GAAG,CAAa;IACnC,IAAI,CAAe;IACnB,OAAO,CAAiB;IACxB,SAAS,C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YACjB,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE;YACvC,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE;YAC3C,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC;IACJ,CAAC;CACF;AArUD,0BAqUC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export * from "./Base";
|
|
2
2
|
export * from "./Application";
|
|
3
3
|
export * from "./ApplicationCommand";
|
|
4
|
+
export * from "./AuditLog";
|
|
4
5
|
export * from "./AutoModerationRule";
|
|
5
6
|
export * from "./Channel";
|
|
7
|
+
export * from "./ClientApplication";
|
|
6
8
|
export * from "./Emoji";
|
|
9
|
+
export * from "./Entitlement";
|
|
7
10
|
export * from "./Guild";
|
|
8
11
|
export * from "./GuildMember";
|
|
9
12
|
export * from "./GuildScheduledEvent";
|
|
@@ -12,11 +15,12 @@ export * from "./Integration";
|
|
|
12
15
|
export * from "./Interaction";
|
|
13
16
|
export * from "./Invite";
|
|
14
17
|
export * from "./Message";
|
|
15
|
-
export * from "./PartialApplication";
|
|
16
18
|
export * from "./Role";
|
|
19
|
+
export * from "./SKU";
|
|
17
20
|
export * from "./StageInstance";
|
|
18
21
|
export * from "./Sticker";
|
|
19
22
|
export * from "./Team";
|
|
23
|
+
export * from "./TestEntitlement";
|
|
20
24
|
export * from "./UnavailableGuild";
|
|
21
25
|
export * from "./User";
|
|
22
26
|
export * from "./VoiceState";
|
package/dist/structures/index.js
CHANGED
|
@@ -17,9 +17,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./Base"), exports);
|
|
18
18
|
__exportStar(require("./Application"), exports);
|
|
19
19
|
__exportStar(require("./ApplicationCommand"), exports);
|
|
20
|
+
__exportStar(require("./AuditLog"), exports);
|
|
20
21
|
__exportStar(require("./AutoModerationRule"), exports);
|
|
21
22
|
__exportStar(require("./Channel"), exports);
|
|
23
|
+
__exportStar(require("./ClientApplication"), exports);
|
|
22
24
|
__exportStar(require("./Emoji"), exports);
|
|
25
|
+
__exportStar(require("./Entitlement"), exports);
|
|
23
26
|
__exportStar(require("./Guild"), exports);
|
|
24
27
|
__exportStar(require("./GuildMember"), exports);
|
|
25
28
|
__exportStar(require("./GuildScheduledEvent"), exports);
|
|
@@ -28,11 +31,12 @@ __exportStar(require("./Integration"), exports);
|
|
|
28
31
|
__exportStar(require("./Interaction"), exports);
|
|
29
32
|
__exportStar(require("./Invite"), exports);
|
|
30
33
|
__exportStar(require("./Message"), exports);
|
|
31
|
-
__exportStar(require("./PartialApplication"), exports);
|
|
32
34
|
__exportStar(require("./Role"), exports);
|
|
35
|
+
__exportStar(require("./SKU"), exports);
|
|
33
36
|
__exportStar(require("./StageInstance"), exports);
|
|
34
37
|
__exportStar(require("./Sticker"), exports);
|
|
35
38
|
__exportStar(require("./Team"), exports);
|
|
39
|
+
__exportStar(require("./TestEntitlement"), exports);
|
|
36
40
|
__exportStar(require("./UnavailableGuild"), exports);
|
|
37
41
|
__exportStar(require("./User"), exports);
|
|
38
42
|
__exportStar(require("./VoiceState"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/structures/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,gDAA8B;AAC9B,uDAAqC;AACrC,uDAAqC;AACrC,4CAA0B;AAC1B,0CAAwB;AACxB,0CAAwB;AACxB,gDAA8B;AAC9B,wDAAsC;AACtC,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,2CAAyB;AACzB,4CAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/structures/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,gDAA8B;AAC9B,uDAAqC;AACrC,6CAA2B;AAC3B,uDAAqC;AACrC,4CAA0B;AAC1B,sDAAoC;AACpC,0CAAwB;AACxB,gDAA8B;AAC9B,0CAAwB;AACxB,gDAA8B;AAC9B,wDAAsC;AACtC,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,2CAAyB;AACzB,4CAA0B;AAC1B,yCAAuB;AACvB,wCAAsB;AACtB,kDAAgC;AAChC,4CAA0B;AAC1B,yCAAuB;AACvB,oDAAkC;AAClC,qDAAmC;AACnC,yCAAuB;AACvB,+CAA6B;AAC7B,4CAA0B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RawUser, RawTeam, JSONTeam, JSONUser, RawGuild, JSONGuild } from ".";
|
|
2
|
-
import type { OAuth2Scopes } from "../constants";
|
|
2
|
+
import type { ApplicationFlags, OAuth2Scopes } from "../constants";
|
|
3
3
|
/** https://discord.com/developers/docs/resources/application#application-object-application-structure */
|
|
4
4
|
export interface RawApplication {
|
|
5
5
|
id: string;
|
|
@@ -19,7 +19,7 @@ export interface RawApplication {
|
|
|
19
19
|
primary_sku_id?: string;
|
|
20
20
|
slug?: string;
|
|
21
21
|
cover_image?: string;
|
|
22
|
-
flags?:
|
|
22
|
+
flags?: ApplicationFlags;
|
|
23
23
|
approximate_guild_count?: number;
|
|
24
24
|
redirect_uris?: Array<string>;
|
|
25
25
|
interactions_endpoint_url?: string;
|
|
@@ -51,7 +51,7 @@ export interface JSONApplication {
|
|
|
51
51
|
primarySKUId?: string;
|
|
52
52
|
slug?: string;
|
|
53
53
|
coverImage?: string;
|
|
54
|
-
flags?:
|
|
54
|
+
flags?: ApplicationFlags;
|
|
55
55
|
approximateGuildCount?: number;
|
|
56
56
|
redirectURIs?: Array<string>;
|
|
57
57
|
interactionsEndpointURL?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { KeywordPresetTypes, ActionTypes, EventTypes } from "../constants";
|
|
1
|
+
import type { KeywordPresetTypes, ActionTypes, EventTypes, TriggerTypes } from "../constants";
|
|
2
2
|
/** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure */
|
|
3
3
|
export interface RawAutoModerationRule {
|
|
4
4
|
id: string;
|
|
@@ -6,7 +6,7 @@ export interface RawAutoModerationRule {
|
|
|
6
6
|
name: string;
|
|
7
7
|
creator_id: string;
|
|
8
8
|
event_type: EventTypes;
|
|
9
|
-
trigger_type:
|
|
9
|
+
trigger_type: TriggerTypes;
|
|
10
10
|
trigger_metadata: RawTriggerMetadata;
|
|
11
11
|
actions: Array<RawAutoModerationAction>;
|
|
12
12
|
enabled: boolean;
|
|
@@ -39,7 +39,7 @@ export interface JSONAutoModerationRule {
|
|
|
39
39
|
name: string;
|
|
40
40
|
creatorId: string;
|
|
41
41
|
eventType: EventTypes;
|
|
42
|
-
triggerType:
|
|
42
|
+
triggerType: TriggerTypes;
|
|
43
43
|
triggerMetadata: JSONTriggerMetadata;
|
|
44
44
|
actions: Array<JSONAutoModerationAction>;
|
|
45
45
|
enabled: boolean;
|
package/dist/types/channel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AllowedMentionTypes, AttachmentFlags, ChannelTypes, MessageActivityTypes } from "../constants";
|
|
1
|
+
import type { AllowedMentionTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, MessageActivityTypes, MessageFlags, MessageTypes, SortOrderTypes, VideoQualityModes } from "../constants";
|
|
2
2
|
import type { RawApplication, RawGuildMember, RawUser, RawEmoji, RawSticker, RawStickerItem, RawMessageInteraction, JSONMessageInteraction, JSONStickerItem, JSONSticker, JSONEmoji, JSONUser, JSONApplication, JSONGuildMember, RawActionRow, JSONActionRow, RawResolvedData, JSONResolvedData } from ".";
|
|
3
3
|
/** https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */
|
|
4
4
|
export interface RawChannel {
|
|
@@ -22,21 +22,21 @@ export interface RawChannel {
|
|
|
22
22
|
parent_id?: string | null;
|
|
23
23
|
last_pin_timestamp?: string | null;
|
|
24
24
|
rtc_region?: string | null;
|
|
25
|
-
video_quality_mode?:
|
|
25
|
+
video_quality_mode?: VideoQualityModes;
|
|
26
26
|
message_count?: number;
|
|
27
27
|
member_count?: number;
|
|
28
28
|
thread_metadata?: RawThreadMetadata;
|
|
29
29
|
member?: RawThreadMember;
|
|
30
30
|
default_auto_archive_duration?: number;
|
|
31
31
|
permissions?: string;
|
|
32
|
-
flags?:
|
|
32
|
+
flags?: ChannelFlags;
|
|
33
33
|
total_message_sent?: number;
|
|
34
34
|
available_tags?: Array<RawForumTag>;
|
|
35
35
|
applied_tags?: Array<string>;
|
|
36
36
|
default_reaction_emoji?: RawDefaultReaction | null;
|
|
37
37
|
default_thread_rate_limit_per_user?: number;
|
|
38
|
-
default_sort_order?:
|
|
39
|
-
default_forum_layout?:
|
|
38
|
+
default_sort_order?: SortOrderTypes | null;
|
|
39
|
+
default_forum_layout?: ForumLayoutTypes;
|
|
40
40
|
}
|
|
41
41
|
/** https://discord.com/developers/docs/resources/channel#message-object-message-structure */
|
|
42
42
|
export interface RawMessage {
|
|
@@ -57,12 +57,12 @@ export interface RawMessage {
|
|
|
57
57
|
nonce?: number | string;
|
|
58
58
|
pinned: boolean;
|
|
59
59
|
webhook_id?: string;
|
|
60
|
-
type:
|
|
60
|
+
type: MessageTypes;
|
|
61
61
|
activity?: RawMessageActivity;
|
|
62
62
|
application?: RawApplication;
|
|
63
63
|
application_id?: string;
|
|
64
64
|
message_reference?: RawMessageReference;
|
|
65
|
-
flags?:
|
|
65
|
+
flags?: MessageFlags;
|
|
66
66
|
referenced_message?: RawMessage | null;
|
|
67
67
|
interaction?: RawMessageInteraction;
|
|
68
68
|
thread?: RawChannel;
|
|
@@ -93,8 +93,16 @@ export interface RawFollowedChannel {
|
|
|
93
93
|
/** https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure */
|
|
94
94
|
export interface RawReaction {
|
|
95
95
|
count: number;
|
|
96
|
+
count_details: RawReactionCountDetails;
|
|
96
97
|
me: boolean;
|
|
98
|
+
me_burst: boolean;
|
|
97
99
|
emoji: RawEmoji;
|
|
100
|
+
burst_colors: Array<string>;
|
|
101
|
+
}
|
|
102
|
+
/** https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure */
|
|
103
|
+
export interface RawReactionCountDetails {
|
|
104
|
+
burst: number;
|
|
105
|
+
normal: number;
|
|
98
106
|
}
|
|
99
107
|
/** https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure */
|
|
100
108
|
export interface RawOverwrite {
|
|
@@ -252,21 +260,21 @@ export interface JSONChannel {
|
|
|
252
260
|
parentId?: string | null;
|
|
253
261
|
lastPinTimestamp?: string | null;
|
|
254
262
|
rtcRegion?: string | null;
|
|
255
|
-
videoQualityMode?:
|
|
263
|
+
videoQualityMode?: VideoQualityModes;
|
|
256
264
|
messageCount?: number;
|
|
257
265
|
memberCount?: number;
|
|
258
266
|
threadMetadata?: JSONThreadMetadata;
|
|
259
267
|
member?: JSONThreadMember;
|
|
260
268
|
defaultAutoArchiveDuration?: number;
|
|
261
269
|
permissions?: string;
|
|
262
|
-
flags?:
|
|
270
|
+
flags?: ChannelFlags;
|
|
263
271
|
totalMessageSent?: number;
|
|
264
272
|
availableTags?: Array<JSONForumTag>;
|
|
265
273
|
appliedTags?: Array<string>;
|
|
266
274
|
defaultReactionEmoji?: JSONDefaultReaction | null;
|
|
267
275
|
defaultThreadRateLimitPerUser?: number;
|
|
268
|
-
defaultSortOrder?:
|
|
269
|
-
defaultForumLayout?:
|
|
276
|
+
defaultSortOrder?: SortOrderTypes | null;
|
|
277
|
+
defaultForumLayout?: ForumLayoutTypes;
|
|
270
278
|
}
|
|
271
279
|
export interface JSONMessage {
|
|
272
280
|
id: string;
|
|
@@ -286,12 +294,12 @@ export interface JSONMessage {
|
|
|
286
294
|
nonce?: number | string;
|
|
287
295
|
pinned: boolean;
|
|
288
296
|
webhookId?: string;
|
|
289
|
-
type:
|
|
297
|
+
type: MessageTypes;
|
|
290
298
|
activity?: JSONMessageActivity;
|
|
291
299
|
application?: JSONApplication;
|
|
292
300
|
applicationId?: string;
|
|
293
301
|
messageReference?: JSONMessageReference;
|
|
294
|
-
flags?:
|
|
302
|
+
flags?: MessageFlags;
|
|
295
303
|
referencedMessage?: JSONMessage | null;
|
|
296
304
|
interaction?: JSONMessageInteraction;
|
|
297
305
|
thread?: JSONChannel;
|
|
@@ -318,8 +326,15 @@ export interface JSONFollowedChannel {
|
|
|
318
326
|
}
|
|
319
327
|
export interface JSONReaction {
|
|
320
328
|
count: number;
|
|
329
|
+
countDetails: JSONReactionCountDetails;
|
|
321
330
|
me: boolean;
|
|
331
|
+
meBurst: boolean;
|
|
322
332
|
emoji: JSONEmoji;
|
|
333
|
+
burstColors: Array<string>;
|
|
334
|
+
}
|
|
335
|
+
export interface JSONReactionCountDetails {
|
|
336
|
+
burst: number;
|
|
337
|
+
normal: number;
|
|
323
338
|
}
|
|
324
339
|
export interface JSONOverwrite {
|
|
325
340
|
id: string;
|
|
@@ -370,19 +385,19 @@ export interface JSONEmbed {
|
|
|
370
385
|
}
|
|
371
386
|
export interface JSONEmbedThumbnail {
|
|
372
387
|
url: string;
|
|
373
|
-
|
|
388
|
+
proxyURL?: string;
|
|
374
389
|
height?: number;
|
|
375
390
|
width?: number;
|
|
376
391
|
}
|
|
377
392
|
export interface JSONEmbedVideo {
|
|
378
393
|
url?: string;
|
|
379
|
-
|
|
394
|
+
proxyURL?: string;
|
|
380
395
|
height?: number;
|
|
381
396
|
width?: number;
|
|
382
397
|
}
|
|
383
398
|
export interface JSONEmbedImage {
|
|
384
399
|
url: string;
|
|
385
|
-
|
|
400
|
+
proxyURL?: string;
|
|
386
401
|
height?: number;
|
|
387
402
|
width?: number;
|
|
388
403
|
}
|
|
@@ -393,13 +408,13 @@ export interface JSONEmbedProvider {
|
|
|
393
408
|
export interface JSONEmbedAuthor {
|
|
394
409
|
name: string;
|
|
395
410
|
url?: string;
|
|
396
|
-
|
|
397
|
-
|
|
411
|
+
iconURL?: string;
|
|
412
|
+
proxyIconURL?: string;
|
|
398
413
|
}
|
|
399
414
|
export interface JSONEmbedFooter {
|
|
400
415
|
text: string;
|
|
401
|
-
|
|
402
|
-
|
|
416
|
+
iconURL?: string;
|
|
417
|
+
proxyIconURL?: string;
|
|
403
418
|
}
|
|
404
419
|
export interface JSONEmbedField {
|
|
405
420
|
name: string;
|
|
@@ -413,7 +428,7 @@ export interface JSONAttachment {
|
|
|
413
428
|
contentType?: string;
|
|
414
429
|
size: number;
|
|
415
430
|
url: string;
|
|
416
|
-
|
|
431
|
+
proxyURL: string;
|
|
417
432
|
height?: number;
|
|
418
433
|
width?: number;
|
|
419
434
|
ephemeral?: boolean;
|