@discordjs/core 3.0.0-dev.1790769779-eec9b8f9a → 3.0.0-dev.1791590611-281f8203d
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/http-only.d.mts +40 -5
- package/dist/http-only.d.ts +40 -5
- package/dist/http-only.js +50 -4
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +50 -4
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +40 -5
- package/dist/index.d.ts +40 -5
- package/dist/index.js +50 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -711,11 +711,12 @@ var ChannelsAPI = class {
|
|
|
711
711
|
* @param body - The data for creating the invite
|
|
712
712
|
* @param options - The options for creating the invite
|
|
713
713
|
*/
|
|
714
|
-
async createInvite(channelId, body, { auth, reason, signal } = {}) {
|
|
714
|
+
async createInvite(channelId, { targetUsersFile, ...body }, { auth, reason, signal } = {}) {
|
|
715
715
|
return this.rest.post(Routes3.channelInvites(channelId), {
|
|
716
716
|
auth,
|
|
717
717
|
reason,
|
|
718
718
|
body,
|
|
719
|
+
files: targetUsersFile ? [{ key: "target_users_file", contentType: "text/csv", ...targetUsersFile }] : [],
|
|
719
720
|
signal
|
|
720
721
|
});
|
|
721
722
|
}
|
|
@@ -2195,7 +2196,7 @@ var InvitesAPI = class {
|
|
|
2195
2196
|
/**
|
|
2196
2197
|
* Fetches an invite
|
|
2197
2198
|
*
|
|
2198
|
-
* @see {@link https://discord.com/developers/
|
|
2199
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invite}
|
|
2199
2200
|
* @param code - The invite code
|
|
2200
2201
|
* @param query - The options for fetching the invite
|
|
2201
2202
|
* @param options - The options for fetching the invite
|
|
@@ -2210,13 +2211,58 @@ var InvitesAPI = class {
|
|
|
2210
2211
|
/**
|
|
2211
2212
|
* Deletes an invite
|
|
2212
2213
|
*
|
|
2213
|
-
* @see {@link https://discord.com/developers/
|
|
2214
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#delete-invite}
|
|
2214
2215
|
* @param code - The invite code
|
|
2215
2216
|
* @param options - The options for deleting the invite
|
|
2216
2217
|
*/
|
|
2217
2218
|
async delete(code, { auth, reason, signal } = {}) {
|
|
2218
2219
|
return this.rest.delete(Routes7.invite(code), { auth, reason, signal });
|
|
2219
2220
|
}
|
|
2221
|
+
/**
|
|
2222
|
+
* Fetches an invite's target users
|
|
2223
|
+
*
|
|
2224
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users}
|
|
2225
|
+
* @param code - The invite code
|
|
2226
|
+
* @param options - The options for fetching the invite target users
|
|
2227
|
+
* @returns
|
|
2228
|
+
*/
|
|
2229
|
+
async getTargetUsers(code, { auth, signal } = {}) {
|
|
2230
|
+
return this.rest.get(Routes7.inviteTargetUsers(code), {
|
|
2231
|
+
signal,
|
|
2232
|
+
auth
|
|
2233
|
+
});
|
|
2234
|
+
}
|
|
2235
|
+
/**
|
|
2236
|
+
* Updates an invite's target users
|
|
2237
|
+
*
|
|
2238
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#update-target-users}
|
|
2239
|
+
* @param code - The invite code
|
|
2240
|
+
* @param targetUsersFile - A CSV file with a single column of user ids
|
|
2241
|
+
* for all the users able to accept this invite
|
|
2242
|
+
* @param options - The options for updating the invite target users
|
|
2243
|
+
* @returns
|
|
2244
|
+
*/
|
|
2245
|
+
async updateTargetUsers(code, targetUsersFile, { auth, signal } = {}) {
|
|
2246
|
+
return this.rest.put(Routes7.inviteTargetUsers(code), {
|
|
2247
|
+
files: [{ key: "target_users_file", contentType: "text/csv", ...targetUsersFile }],
|
|
2248
|
+
signal,
|
|
2249
|
+
auth
|
|
2250
|
+
});
|
|
2251
|
+
}
|
|
2252
|
+
/**
|
|
2253
|
+
* Fetches an invite's target users job status
|
|
2254
|
+
*
|
|
2255
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users-job-status}
|
|
2256
|
+
* @param code - The invite code
|
|
2257
|
+
* @param options - The options for fetching the invite target users job status
|
|
2258
|
+
* @returns
|
|
2259
|
+
*/
|
|
2260
|
+
async getTargetUsersJobStatus(code, { auth, signal } = {}) {
|
|
2261
|
+
return this.rest.get(Routes7.inviteTargetUsersJobStatus(code), {
|
|
2262
|
+
signal,
|
|
2263
|
+
auth
|
|
2264
|
+
});
|
|
2265
|
+
}
|
|
2220
2266
|
};
|
|
2221
2267
|
|
|
2222
2268
|
// src/api/monetization.ts
|
|
@@ -3480,7 +3526,7 @@ __name(withFiles, "withFiles");
|
|
|
3480
3526
|
// src/index.ts
|
|
3481
3527
|
export * from "discord-api-types/v10";
|
|
3482
3528
|
import { GatewayRateLimitError as GatewayRateLimitError2 } from "@discordjs/util";
|
|
3483
|
-
var version = "3.0.0-dev.
|
|
3529
|
+
var version = "3.0.0-dev.1791590611-281f8203d";
|
|
3484
3530
|
export {
|
|
3485
3531
|
API,
|
|
3486
3532
|
ApplicationCommandsAPI,
|