dfx 0.75.0 → 0.76.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.
- package/Cache/prelude.d.ts +3 -3
- package/DiscordGateway/DiscordWS.js +1 -1
- package/DiscordGateway/DiscordWS.js.map +1 -1
- package/DiscordGateway/Shard.d.ts +2 -2
- package/DiscordGateway/Shard.js +1 -1
- package/DiscordGateway/Shard.js.map +1 -1
- package/DiscordGateway/Sharder.js +1 -1
- package/DiscordGateway/Sharder.js.map +1 -1
- package/DiscordGateway/WS.d.ts +0 -1
- package/DiscordGateway/WS.d.ts.map +1 -1
- package/DiscordGateway.d.ts +1 -1
- package/DiscordGateway.js +1 -1
- package/DiscordGateway.js.map +1 -1
- package/DiscordREST.js +1 -1
- package/DiscordREST.js.map +1 -1
- package/Helpers/interactions.js +1 -1
- package/Helpers/interactions.js.map +1 -1
- package/Helpers/permissions.d.ts +2 -2
- package/Helpers/permissions.d.ts.map +1 -1
- package/Interactions/context.d.ts +1 -1
- package/Interactions/definitions.d.ts +3 -3
- package/Interactions/gateway.d.ts +2 -2
- package/RateLimit.d.ts +2 -2
- package/gateway.d.ts +1 -1
- package/gateway.d.ts.map +1 -1
- package/gateway.js +3 -3
- package/gateway.js.map +1 -1
- package/mjs/DiscordGateway/DiscordWS.mjs +1 -1
- package/mjs/DiscordGateway/DiscordWS.mjs.map +1 -1
- package/mjs/DiscordGateway/Shard.mjs +1 -1
- package/mjs/DiscordGateway/Shard.mjs.map +1 -1
- package/mjs/DiscordGateway/Sharder.mjs +1 -1
- package/mjs/DiscordGateway/Sharder.mjs.map +1 -1
- package/mjs/DiscordGateway.mjs +1 -1
- package/mjs/DiscordGateway.mjs.map +1 -1
- package/mjs/DiscordREST.mjs +1 -1
- package/mjs/DiscordREST.mjs.map +1 -1
- package/mjs/Helpers/interactions.mjs +1 -1
- package/mjs/Helpers/interactions.mjs.map +1 -1
- package/mjs/gateway.mjs +3 -3
- package/mjs/gateway.mjs.map +1 -1
- package/mjs/types.mjs +6 -2
- package/mjs/types.mjs.map +1 -1
- package/mjs/version.mjs +1 -1
- package/mjs/webhooks.mjs +3 -3
- package/mjs/webhooks.mjs.map +1 -1
- package/package.json +4 -4
- package/src/DiscordGateway/DiscordWS.ts +1 -1
- package/src/DiscordGateway/Shard.ts +1 -1
- package/src/DiscordGateway/Sharder.ts +1 -1
- package/src/DiscordGateway.ts +1 -1
- package/src/DiscordREST.ts +2 -2
- package/src/Helpers/interactions.ts +1 -1
- package/src/gateway.ts +10 -12
- package/src/types.ts +28 -18
- package/src/version.ts +1 -1
- package/src/webhooks.ts +3 -3
- package/types.d.ts +28 -18
- package/types.d.ts.map +1 -1
- package/types.js +6 -2
- package/types.js.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/webhooks.js +3 -3
- package/webhooks.js.map +1 -1
package/mjs/webhooks.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.mjs","names":["Config","Effect","Layer","DiscordConfig","LiveDiscordREST","makeConfigLayer","Log","LiveMemoryRateLimitStore","LiveRateLimiter","BadWebhookSignature","makeHandler","makeSimpleHandler","WebhookConfig","WebhookParseError","MemoryRateLimit","provide","MemoryREST","webhookLayer","options","config","make","LiveConfig","succeed","LiveWebhook","LiveLog","debug","LiveLogDebug","LiveEnv","
|
|
1
|
+
{"version":3,"file":"webhooks.mjs","names":["Config","Effect","Layer","DiscordConfig","LiveDiscordREST","makeConfigLayer","Log","LiveMemoryRateLimitStore","LiveRateLimiter","BadWebhookSignature","makeHandler","makeSimpleHandler","WebhookConfig","WebhookParseError","MemoryRateLimit","provide","MemoryREST","webhookLayer","options","config","make","LiveConfig","succeed","LiveWebhook","LiveLog","debug","LiveLogDebug","LiveEnv","mergeAll","merge","webhookLayerConfig","unwrapEffect","map","unwrap"],"sources":["../src/webhooks.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,MAAM,MAAM,eAAe;AAEvC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,aAAa,MAAM,mBAAmB;AAElD,SAASC,eAAe,QAAQ,iBAAiB;AAEjD,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,OAAO,KAAKC,GAAG,MAAM,SAAS;AAE9B,SAASC,wBAAwB,EAAEC,eAAe,QAAQ,eAAe;AAEzE,SACEC,mBAAmB,EACnBJ,eAAe,EACfK,WAAW,EACXC,iBAAiB,EACjBC,aAAa,EACbC,iBAAiB,QACZ,0BAA0B;AAEjC,OAAO,MAAMC,eAAe,gBAAGZ,KAAK,CAACa,OAAO,CAC1CP,eAAe,EACfD,wBAAwB,CACzB;AAED,OAAO,MAAMS,UAAU,gBAAGd,KAAK,CAACa,OAAO,CACrCX,eAAe,EACfG,wBAAwB,CACzB;AAED,OAAO,MAAMU,YAAY,GACvBC,OAAgD,IAK9C;EACF,MAAMC,MAAM,GAAGhB,aAAa,CAACiB,IAAI,CAACF,OAAO,CAAC;EAC1C,MAAMG,UAAU,GAAGnB,KAAK,CAACoB,OAAO,CAACnB,aAAa,CAACA,aAAa,EAAEgB,MAAM,CAAC;EACrE,MAAMI,WAAW,GAAGlB,eAAe,CAACa,OAAO,CAAC;EAC5C,MAAMM,OAAO,GAAGL,MAAM,CAACM,KAAK,GAAGnB,GAAG,CAACoB,YAAY,GAAGpB,GAAG,CAACkB,OAAO;EAC7D,MAAMG,OAAO,GAAGzB,KAAK,CAACa,OAAO,CAC3Bb,KAAK,CAAC0B,QAAQ,CAACZ,UAAU,EAAEO,WAAW,EAAET,eAAe,CAAC,EACxDZ,KAAK,CAAC2B,KAAK,CAACL,OAAO,EAAEH,UAAU,CAAC,CACjC;EAED,OAAOM,OAAO;AAChB,CAAC;AAED,OAAO,MAAMG,kBAAkB,GAC7BX,MAAmE,IAMnEjB,KAAK,CAAC6B,YAAY,CAChB9B,MAAM,CAAC+B,GAAG,CAAC/B,MAAM,CAACkB,MAAM,CAACnB,MAAM,CAACiC,MAAM,CAACd,MAAM,CAAC,CAAC,EAAEF,YAAY,CAAC,CAC/D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dfx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.0",
|
|
4
4
|
"description": "Effect-TS discord library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"ws": "^8.14.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@effect/platform": "^0.
|
|
43
|
-
"effect": "2.0.0-next.
|
|
42
|
+
"@effect/platform": "^0.32.0",
|
|
43
|
+
"effect": "2.0.0-next.57"
|
|
44
44
|
},
|
|
45
45
|
"optionalDependencies": {
|
|
46
46
|
"bufferutil": "^4.0.8",
|
|
@@ -48,6 +48,6 @@
|
|
|
48
48
|
"utf-8-validate": "^6.0.3",
|
|
49
49
|
"zlib-sync": "^0.1.9"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "1f7098e7b95af4c17cac16e49d2abca03de54f32",
|
|
52
52
|
"main": "./index.js"
|
|
53
53
|
}
|
|
@@ -70,6 +70,6 @@ const make = Effect.gen(function* (_) {
|
|
|
70
70
|
export interface DiscordWS extends Effect.Effect.Success<typeof make> {}
|
|
71
71
|
export const DiscordWS = Tag<DiscordWS>()
|
|
72
72
|
export const LiveDiscordWS = Layer.provide(
|
|
73
|
-
LiveWS,
|
|
74
73
|
Layer.effect(DiscordWS, make),
|
|
74
|
+
LiveWS,
|
|
75
75
|
)
|
|
@@ -192,8 +192,8 @@ export const make = Effect.gen(function* (_) {
|
|
|
192
192
|
export interface Shard extends Effect.Effect.Success<typeof make> {}
|
|
193
193
|
export const Shard = Tag<Shard>()
|
|
194
194
|
export const LiveShard = Layer.provide(
|
|
195
|
-
Layer.merge(LiveDiscordWS, LiveRateLimiter),
|
|
196
195
|
Layer.effect(Shard, make),
|
|
196
|
+
Layer.merge(LiveDiscordWS, LiveRateLimiter),
|
|
197
197
|
)
|
|
198
198
|
|
|
199
199
|
export interface RunningShard
|
|
@@ -135,6 +135,6 @@ const make = Effect.gen(function* (_) {
|
|
|
135
135
|
export interface Sharder extends Effect.Effect.Success<typeof make> {}
|
|
136
136
|
export const Sharder = Tag<Sharder>()
|
|
137
137
|
export const LiveSharder = Layer.provide(
|
|
138
|
-
Layer.merge(LiveRateLimiter, LiveShard),
|
|
139
138
|
Layer.effect(Sharder, make),
|
|
139
|
+
Layer.merge(LiveRateLimiter, LiveShard),
|
|
140
140
|
)
|
package/src/DiscordGateway.ts
CHANGED
package/src/DiscordREST.ts
CHANGED
|
@@ -255,6 +255,6 @@ export interface DiscordREST
|
|
|
255
255
|
|
|
256
256
|
export const DiscordREST = Tag<DiscordREST>()
|
|
257
257
|
export const LiveDiscordREST = Layer.effect(DiscordREST, make).pipe(
|
|
258
|
-
Layer.
|
|
259
|
-
Layer.
|
|
258
|
+
Layer.provide(LiveRateLimiter),
|
|
259
|
+
Layer.provide(Http.client.layer),
|
|
260
260
|
)
|
|
@@ -151,7 +151,7 @@ export const resolveValues =
|
|
|
151
151
|
),
|
|
152
152
|
Option.bind("r", () => resolved(a)),
|
|
153
153
|
Option.map(({ r, values }) =>
|
|
154
|
-
Arr.
|
|
154
|
+
Arr.getSomes(values.map(a => Option.fromNullable(f(a as any, r)))),
|
|
155
155
|
),
|
|
156
156
|
)
|
|
157
157
|
|
package/src/gateway.ts
CHANGED
|
@@ -28,20 +28,18 @@ export {
|
|
|
28
28
|
export { CachePrelude, DiscordWS, SendEvent, Shard, ShardStore, WS }
|
|
29
29
|
|
|
30
30
|
export const MemoryRateLimit = Layer.provide(
|
|
31
|
-
LiveMemoryRateLimitStore,
|
|
32
31
|
LiveRateLimiter,
|
|
32
|
+
LiveMemoryRateLimitStore,
|
|
33
33
|
)
|
|
34
34
|
|
|
35
|
-
export const MemoryBot = Layer.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
),
|
|
41
|
-
Layer.
|
|
42
|
-
|
|
43
|
-
MemoryRateLimit,
|
|
44
|
-
),
|
|
35
|
+
export const MemoryBot = Layer.mergeAll(
|
|
36
|
+
MemoryRateLimit,
|
|
37
|
+
LiveDiscordGateway,
|
|
38
|
+
).pipe(
|
|
39
|
+
Layer.provideMerge(LiveDiscordREST),
|
|
40
|
+
Layer.provide(LiveJsonDiscordWSCodec),
|
|
41
|
+
Layer.provide(LiveMemoryRateLimitStore),
|
|
42
|
+
Layer.provide(LiveMemoryShardStore),
|
|
45
43
|
)
|
|
46
44
|
|
|
47
45
|
export const gatewayLayer = (
|
|
@@ -61,7 +59,7 @@ export const gatewayLayer = (
|
|
|
61
59
|
Effect.map(config => {
|
|
62
60
|
const LiveLog = config.debug ? Log.LiveLogDebug : Log.LiveLog
|
|
63
61
|
const LiveConfig = Layer.succeed(DiscordConfig.DiscordConfig, config)
|
|
64
|
-
return Layer.provideMerge(Layer.merge(LiveLog, LiveConfig)
|
|
62
|
+
return Layer.provideMerge(MemoryBot, Layer.merge(LiveLog, LiveConfig))
|
|
65
63
|
}),
|
|
66
64
|
),
|
|
67
65
|
)
|
package/src/types.ts
CHANGED
|
@@ -2819,7 +2819,7 @@ export interface Endpoints<O> {
|
|
|
2819
2819
|
params?: Partial<CreateGuildChannelParams>,
|
|
2820
2820
|
options?: O,
|
|
2821
2821
|
) => RestResponse<Channel>
|
|
2822
|
-
/** Create a new emoji for the guild. Requires the
|
|
2822
|
+
/** Create a new emoji for the guild. Requires the CREATE_GUILD_EXPRESSIONS permission. Returns the new emoji object on success. Fires a Guild Emojis Update Gateway event. */
|
|
2823
2823
|
createGuildEmoji: (
|
|
2824
2824
|
guildId: string,
|
|
2825
2825
|
params?: Partial<CreateGuildEmojiParams>,
|
|
@@ -2843,7 +2843,7 @@ export interface Endpoints<O> {
|
|
|
2843
2843
|
params?: Partial<CreateGuildScheduledEventParams>,
|
|
2844
2844
|
options?: O,
|
|
2845
2845
|
) => RestResponse<GuildScheduledEvent>
|
|
2846
|
-
/** Create a new sticker for the guild. Send a multipart/form-data body. Requires the
|
|
2846
|
+
/** Create a new sticker for the guild. Send a multipart/form-data body. Requires the CREATE_GUILD_EXPRESSIONS permission. Returns the new sticker object on success. Fires a Guild Stickers Update Gateway event. */
|
|
2847
2847
|
createGuildSticker: (
|
|
2848
2848
|
guildId: string,
|
|
2849
2849
|
params?: Partial<CreateGuildStickerParams>,
|
|
@@ -2947,7 +2947,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2947
2947
|
commandId: string,
|
|
2948
2948
|
options?: O,
|
|
2949
2949
|
) => RestResponse<any>
|
|
2950
|
-
/** Delete the given emoji.
|
|
2950
|
+
/** Delete the given emoji. For emojis created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other emojis, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns 204 No Content on success. Fires a Guild Emojis Update Gateway event. */
|
|
2951
2951
|
deleteGuildEmoji: (
|
|
2952
2952
|
guildId: string,
|
|
2953
2953
|
emojiId: string,
|
|
@@ -2971,7 +2971,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2971
2971
|
guildScheduledEventId: string,
|
|
2972
2972
|
options?: O,
|
|
2973
2973
|
) => RestResponse<any>
|
|
2974
|
-
/** Delete the given sticker.
|
|
2974
|
+
/** Delete the given sticker. For stickers created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other stickers, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns 204 No Content on success. Fires a Guild Stickers Update Gateway event. */
|
|
2975
2975
|
deleteGuildSticker: (
|
|
2976
2976
|
guildId: string,
|
|
2977
2977
|
stickerId: string,
|
|
@@ -3265,7 +3265,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3265
3265
|
guildId: string,
|
|
3266
3266
|
options?: O,
|
|
3267
3267
|
) => RestResponse<Array<Channel>>
|
|
3268
|
-
/** Returns an emoji object for the given guild and emoji IDs. */
|
|
3268
|
+
/** Returns an emoji object for the given guild and emoji IDs. Includes the user field if the bot has the MANAGE_GUILD_EXPRESSIONS permission, or if the bot created the emoji and has the the CREATE_GUILD_EXPRESSIONS permission. */
|
|
3269
3269
|
getGuildEmoji: (
|
|
3270
3270
|
guildId: string,
|
|
3271
3271
|
emojiId: string,
|
|
@@ -3314,7 +3314,7 @@ If the user is not in the guild, then the guild must be discoverable. */
|
|
|
3314
3314
|
params?: Partial<GetGuildScheduledEventUserParams>,
|
|
3315
3315
|
options?: O,
|
|
3316
3316
|
) => RestResponse<Array<GuildScheduledEventUser>>
|
|
3317
|
-
/** Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the MANAGE_GUILD_EXPRESSIONS permission. */
|
|
3317
|
+
/** Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
|
|
3318
3318
|
getGuildSticker: (
|
|
3319
3319
|
guildId: string,
|
|
3320
3320
|
stickerId: string,
|
|
@@ -3447,7 +3447,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3447
3447
|
) => RestResponse<Array<AutoModerationRule>>
|
|
3448
3448
|
/** Returns all entitlements for a given app, active and expired. */
|
|
3449
3449
|
listEntitlements: (applicationId: string, options?: O) => RestResponse<any>
|
|
3450
|
-
/** Returns a list of emoji objects for the given guild. */
|
|
3450
|
+
/** Returns a list of emoji objects for the given guild. Includes user fields if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
|
|
3451
3451
|
listGuildEmojis: (guildId: string, options?: O) => RestResponse<Array<Emoji>>
|
|
3452
3452
|
/** Returns a list of guild member objects that are members of the guild. */
|
|
3453
3453
|
listGuildMembers: (
|
|
@@ -3455,7 +3455,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3455
3455
|
params?: Partial<ListGuildMemberParams>,
|
|
3456
3456
|
options?: O,
|
|
3457
3457
|
) => RestResponse<Array<GuildMember>>
|
|
3458
|
-
/** Returns an array of sticker objects for the given guild. Includes user fields if the bot has the MANAGE_GUILD_EXPRESSIONS permission. */
|
|
3458
|
+
/** Returns an array of sticker objects for the given guild. Includes user fields if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
|
|
3459
3459
|
listGuildStickers: (
|
|
3460
3460
|
guildId: string,
|
|
3461
3461
|
options?: O,
|
|
@@ -3542,7 +3542,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3542
3542
|
params?: Partial<ModifyGuildChannelPositionParams>,
|
|
3543
3543
|
options?: O,
|
|
3544
3544
|
) => RestResponse<any>
|
|
3545
|
-
/** Modify the given emoji.
|
|
3545
|
+
/** Modify the given emoji. For emojis created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other emojis, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event. */
|
|
3546
3546
|
modifyGuildEmoji: (
|
|
3547
3547
|
guildId: string,
|
|
3548
3548
|
emojiId: string,
|
|
@@ -3588,7 +3588,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3588
3588
|
params?: Partial<ModifyGuildScheduledEventParams>,
|
|
3589
3589
|
options?: O,
|
|
3590
3590
|
) => RestResponse<GuildScheduledEvent>
|
|
3591
|
-
/** Modify the given sticker.
|
|
3591
|
+
/** Modify the given sticker. For stickers created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other stickers, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns the updated sticker object on success. Fires a Guild Stickers Update Gateway event. */
|
|
3592
3592
|
modifyGuildSticker: (
|
|
3593
3593
|
guildId: string,
|
|
3594
3594
|
stickerId: string,
|
|
@@ -3798,7 +3798,7 @@ export interface FollowedChannel {
|
|
|
3798
3798
|
export interface ForumAndMediaThreadMessageParam {
|
|
3799
3799
|
/** Message contents (up to 2000 characters) */
|
|
3800
3800
|
readonly content?: string
|
|
3801
|
-
/**
|
|
3801
|
+
/** Up to 10 rich embeds (up to 6000 characters) */
|
|
3802
3802
|
readonly embeds?: Array<Embed>
|
|
3803
3803
|
/** Allowed mentions for the message */
|
|
3804
3804
|
readonly allowed_mentions?: AllowedMention
|
|
@@ -3808,7 +3808,7 @@ export interface ForumAndMediaThreadMessageParam {
|
|
|
3808
3808
|
readonly sticker_ids?: Array<Snowflake>
|
|
3809
3809
|
/** Attachment objects with filename and description. See Uploading Files */
|
|
3810
3810
|
readonly attachments?: Array<Attachment>
|
|
3811
|
-
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
3811
|
+
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set) */
|
|
3812
3812
|
readonly flags?: number
|
|
3813
3813
|
}
|
|
3814
3814
|
export enum ForumLayoutType {
|
|
@@ -5627,13 +5627,13 @@ export const PermissionFlag = {
|
|
|
5627
5627
|
MANAGE_ROLES: BigInt(1) << BigInt(28),
|
|
5628
5628
|
/** Allows management and editing of webhooks */
|
|
5629
5629
|
MANAGE_WEBHOOKS: BigInt(1) << BigInt(29),
|
|
5630
|
-
/** Allows
|
|
5630
|
+
/** Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users */
|
|
5631
5631
|
MANAGE_GUILD_EXPRESSIONS: BigInt(1) << BigInt(30),
|
|
5632
5632
|
/** Allows members to use application commands, including slash commands and context menu commands. */
|
|
5633
5633
|
USE_APPLICATION_COMMANDS: BigInt(1) << BigInt(31),
|
|
5634
5634
|
/** Allows for requesting to speak in stage channels. (This permission is under active development and may be changed or removed.) */
|
|
5635
5635
|
REQUEST_TO_SPEAK: BigInt(1) << BigInt(32),
|
|
5636
|
-
/** Allows for
|
|
5636
|
+
/** Allows for editing and deleting scheduled events created by all users */
|
|
5637
5637
|
MANAGE_EVENTS: BigInt(1) << BigInt(33),
|
|
5638
5638
|
/** Allows for deleting and archiving threads, and viewing all private threads */
|
|
5639
5639
|
MANAGE_THREADS: BigInt(1) << BigInt(34),
|
|
@@ -5653,6 +5653,10 @@ export const PermissionFlag = {
|
|
|
5653
5653
|
VIEW_CREATOR_MONETIZATION_ANALYTICS: BigInt(1) << BigInt(41),
|
|
5654
5654
|
/** Allows for using soundboard in a voice channel */
|
|
5655
5655
|
USE_SOUNDBOARD: BigInt(1) << BigInt(42),
|
|
5656
|
+
/** Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user */
|
|
5657
|
+
CREATE_GUILD_EXPRESSIONS: BigInt(1) << BigInt(43),
|
|
5658
|
+
/** Allows for creating scheduled events, and editing and deleting those created by the current user */
|
|
5659
|
+
CREATE_EVENTS: BigInt(1) << BigInt(44),
|
|
5656
5660
|
/** Allows the usage of custom soundboard sounds from other servers */
|
|
5657
5661
|
USE_EXTERNAL_SOUNDS: BigInt(1) << BigInt(45),
|
|
5658
5662
|
/** Allows sending voice messages */
|
|
@@ -5699,8 +5703,14 @@ export interface PromptOption {
|
|
|
5699
5703
|
readonly channel_ids: Array<Snowflake>
|
|
5700
5704
|
/** IDs for roles assigned to a member when the option is selected */
|
|
5701
5705
|
readonly role_ids: Array<Snowflake>
|
|
5702
|
-
/** Emoji of the option */
|
|
5703
|
-
readonly emoji
|
|
5706
|
+
/** Emoji of the option (see below) */
|
|
5707
|
+
readonly emoji?: Emoji
|
|
5708
|
+
/** Emoji ID of the option (see below) */
|
|
5709
|
+
readonly emoji_id?: Snowflake
|
|
5710
|
+
/** Emoji name of the option (see below) */
|
|
5711
|
+
readonly emoji_name?: string
|
|
5712
|
+
/** Whether the emoji is animated (see below) */
|
|
5713
|
+
readonly emoji_animated?: boolean
|
|
5704
5714
|
/** Title of the option */
|
|
5705
5715
|
readonly title: string
|
|
5706
5716
|
/** Description of the option */
|
|
@@ -6137,9 +6147,9 @@ export interface StartThreadInForumOrMediaChannelParams {
|
|
|
6137
6147
|
readonly auto_archive_duration?: number
|
|
6138
6148
|
/** amount of seconds a user has to wait before sending another message (0-21600) */
|
|
6139
6149
|
readonly rate_limit_per_user?: number | null
|
|
6140
|
-
/** contents of the first message in the forum thread */
|
|
6150
|
+
/** contents of the first message in the forum/media thread */
|
|
6141
6151
|
readonly message: Message
|
|
6142
|
-
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
|
|
6152
|
+
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM or a GUILD_MEDIA channel */
|
|
6143
6153
|
readonly applied_tags?: Array<Snowflake>
|
|
6144
6154
|
/** Contents of the file being sent. See Uploading Files */
|
|
6145
6155
|
readonly files?: string
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "0.
|
|
1
|
+
export const LIB_VERSION = "0.76.0";
|
package/src/webhooks.ts
CHANGED
|
@@ -21,13 +21,13 @@ export {
|
|
|
21
21
|
} from "dfx/Interactions/webhook"
|
|
22
22
|
|
|
23
23
|
export const MemoryRateLimit = Layer.provide(
|
|
24
|
-
LiveMemoryRateLimitStore,
|
|
25
24
|
LiveRateLimiter,
|
|
25
|
+
LiveMemoryRateLimitStore,
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
export const MemoryREST = Layer.provide(
|
|
29
|
-
LiveMemoryRateLimitStore,
|
|
30
29
|
LiveDiscordREST,
|
|
30
|
+
LiveMemoryRateLimitStore,
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
export const webhookLayer = (
|
|
@@ -42,8 +42,8 @@ export const webhookLayer = (
|
|
|
42
42
|
const LiveWebhook = makeConfigLayer(options)
|
|
43
43
|
const LiveLog = config.debug ? Log.LiveLogDebug : Log.LiveLog
|
|
44
44
|
const LiveEnv = Layer.provide(
|
|
45
|
-
Layer.merge(LiveLog, LiveConfig),
|
|
46
45
|
Layer.mergeAll(MemoryREST, LiveWebhook, MemoryRateLimit),
|
|
46
|
+
Layer.merge(LiveLog, LiveConfig),
|
|
47
47
|
)
|
|
48
48
|
|
|
49
49
|
return LiveEnv
|
package/types.d.ts
CHANGED
|
@@ -1454,7 +1454,7 @@ export interface Endpoints<O> {
|
|
|
1454
1454
|
createGuildBan: (guildId: string, userId: string, params?: Partial<CreateGuildBanParams>, options?: O) => RestResponse<any>;
|
|
1455
1455
|
/** Create a new channel object for the guild. Requires the MANAGE_CHANNELS permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting MANAGE_ROLES permission in channels is only possible for guild administrators. Returns the new channel object on success. Fires a Channel Create Gateway event. */
|
|
1456
1456
|
createGuildChannel: (guildId: string, params?: Partial<CreateGuildChannelParams>, options?: O) => RestResponse<Channel>;
|
|
1457
|
-
/** Create a new emoji for the guild. Requires the
|
|
1457
|
+
/** Create a new emoji for the guild. Requires the CREATE_GUILD_EXPRESSIONS permission. Returns the new emoji object on success. Fires a Guild Emojis Update Gateway event. */
|
|
1458
1458
|
createGuildEmoji: (guildId: string, params?: Partial<CreateGuildEmojiParams>, options?: O) => RestResponse<Emoji>;
|
|
1459
1459
|
/** Create a new guild based on a template. Returns a guild object on success. Fires a Guild Create Gateway event. */
|
|
1460
1460
|
createGuildFromGuildTemplate: (templateCode: string, params?: Partial<CreateGuildFromGuildTemplateParams>, options?: O) => RestResponse<Guild>;
|
|
@@ -1462,7 +1462,7 @@ export interface Endpoints<O> {
|
|
|
1462
1462
|
createGuildRole: (guildId: string, params?: Partial<CreateGuildRoleParams>, options?: O) => RestResponse<Role>;
|
|
1463
1463
|
/** Create a guild scheduled event in the guild. Returns a guild scheduled event object on success. Fires a Guild Scheduled Event Create Gateway event. */
|
|
1464
1464
|
createGuildScheduledEvent: (guildId: string, params?: Partial<CreateGuildScheduledEventParams>, options?: O) => RestResponse<GuildScheduledEvent>;
|
|
1465
|
-
/** Create a new sticker for the guild. Send a multipart/form-data body. Requires the
|
|
1465
|
+
/** Create a new sticker for the guild. Send a multipart/form-data body. Requires the CREATE_GUILD_EXPRESSIONS permission. Returns the new sticker object on success. Fires a Guild Stickers Update Gateway event. */
|
|
1466
1466
|
createGuildSticker: (guildId: string, params?: Partial<CreateGuildStickerParams>, options?: O) => RestResponse<Sticker>;
|
|
1467
1467
|
/** Creates a template for the guild. Requires the MANAGE_GUILD permission. Returns the created guild template object on success. */
|
|
1468
1468
|
createGuildTemplate: (guildId: string, params?: Partial<CreateGuildTemplateParams>, options?: O) => RestResponse<GuildTemplate>;
|
|
@@ -1499,7 +1499,7 @@ export interface Endpoints<O> {
|
|
|
1499
1499
|
deleteGuild: (guildId: string, options?: O) => RestResponse<any>;
|
|
1500
1500
|
/** Delete a guild command. Returns 204 No Content on success. */
|
|
1501
1501
|
deleteGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, options?: O) => RestResponse<any>;
|
|
1502
|
-
/** Delete the given emoji.
|
|
1502
|
+
/** Delete the given emoji. For emojis created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other emojis, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns 204 No Content on success. Fires a Guild Emojis Update Gateway event. */
|
|
1503
1503
|
deleteGuildEmoji: (guildId: string, emojiId: string, options?: O) => RestResponse<any>;
|
|
1504
1504
|
/** Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the MANAGE_GUILD permission. Returns a 204 empty response on success. Fires Guild Integrations Update and Integration Delete Gateway events. */
|
|
1505
1505
|
deleteGuildIntegration: (guildId: string, integrationId: string, options?: O) => RestResponse<any>;
|
|
@@ -1507,7 +1507,7 @@ export interface Endpoints<O> {
|
|
|
1507
1507
|
deleteGuildRole: (guildId: string, roleId: string, options?: O) => RestResponse<any>;
|
|
1508
1508
|
/** Delete a guild scheduled event. Returns a 204 on success. Fires a Guild Scheduled Event Delete Gateway event. */
|
|
1509
1509
|
deleteGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, options?: O) => RestResponse<any>;
|
|
1510
|
-
/** Delete the given sticker.
|
|
1510
|
+
/** Delete the given sticker. For stickers created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other stickers, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns 204 No Content on success. Fires a Guild Stickers Update Gateway event. */
|
|
1511
1511
|
deleteGuildSticker: (guildId: string, stickerId: string, options?: O) => RestResponse<any>;
|
|
1512
1512
|
/** Deletes the template. Requires the MANAGE_GUILD permission. Returns the deleted guild template object on success. */
|
|
1513
1513
|
deleteGuildTemplate: (guildId: string, templateCode: string, options?: O) => RestResponse<GuildTemplate>;
|
|
@@ -1610,7 +1610,7 @@ export interface Endpoints<O> {
|
|
|
1610
1610
|
getGuildBans: (guildId: string, params?: Partial<GetGuildBanParams>, options?: O) => RestResponse<Array<Ban>>;
|
|
1611
1611
|
/** Returns a list of guild channel objects. Does not include threads. */
|
|
1612
1612
|
getGuildChannels: (guildId: string, options?: O) => RestResponse<Array<Channel>>;
|
|
1613
|
-
/** Returns an emoji object for the given guild and emoji IDs. */
|
|
1613
|
+
/** Returns an emoji object for the given guild and emoji IDs. Includes the user field if the bot has the MANAGE_GUILD_EXPRESSIONS permission, or if the bot created the emoji and has the the CREATE_GUILD_EXPRESSIONS permission. */
|
|
1614
1614
|
getGuildEmoji: (guildId: string, emojiId: string, options?: O) => RestResponse<Emoji>;
|
|
1615
1615
|
/** Returns a list of integration objects for the guild. Requires the MANAGE_GUILD permission. */
|
|
1616
1616
|
getGuildIntegrations: (guildId: string, options?: O) => RestResponse<Array<Integration>>;
|
|
@@ -1631,7 +1631,7 @@ export interface Endpoints<O> {
|
|
|
1631
1631
|
getGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<GetGuildScheduledEventParams>, options?: O) => RestResponse<GuildScheduledEvent>;
|
|
1632
1632
|
/** Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of guild scheduled event user objects on success. Guild member data, if it exists, is included if the with_member query parameter is set. */
|
|
1633
1633
|
getGuildScheduledEventUsers: (guildId: string, guildScheduledEventId: string, params?: Partial<GetGuildScheduledEventUserParams>, options?: O) => RestResponse<Array<GuildScheduledEventUser>>;
|
|
1634
|
-
/** Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the MANAGE_GUILD_EXPRESSIONS permission. */
|
|
1634
|
+
/** Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
|
|
1635
1635
|
getGuildSticker: (guildId: string, stickerId: string, options?: O) => RestResponse<Sticker>;
|
|
1636
1636
|
/** Returns a guild template object for the given code. */
|
|
1637
1637
|
getGuildTemplate: (templateCode: string, options?: O) => RestResponse<GuildTemplate>;
|
|
@@ -1690,11 +1690,11 @@ export interface Endpoints<O> {
|
|
|
1690
1690
|
listAutoModerationRulesForGuild: (guildId: string, options?: O) => RestResponse<Array<AutoModerationRule>>;
|
|
1691
1691
|
/** Returns all entitlements for a given app, active and expired. */
|
|
1692
1692
|
listEntitlements: (applicationId: string, options?: O) => RestResponse<any>;
|
|
1693
|
-
/** Returns a list of emoji objects for the given guild. */
|
|
1693
|
+
/** Returns a list of emoji objects for the given guild. Includes user fields if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
|
|
1694
1694
|
listGuildEmojis: (guildId: string, options?: O) => RestResponse<Array<Emoji>>;
|
|
1695
1695
|
/** Returns a list of guild member objects that are members of the guild. */
|
|
1696
1696
|
listGuildMembers: (guildId: string, params?: Partial<ListGuildMemberParams>, options?: O) => RestResponse<Array<GuildMember>>;
|
|
1697
|
-
/** Returns an array of sticker objects for the given guild. Includes user fields if the bot has the MANAGE_GUILD_EXPRESSIONS permission. */
|
|
1697
|
+
/** Returns an array of sticker objects for the given guild. Includes user fields if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
|
|
1698
1698
|
listGuildStickers: (guildId: string, options?: O) => RestResponse<Array<Sticker>>;
|
|
1699
1699
|
/** Returns archived threads in the channel that are of type PRIVATE_THREAD, and the user has joined. Threads are ordered by their id, in descending order. Requires the READ_MESSAGE_HISTORY permission. */
|
|
1700
1700
|
listJoinedPrivateArchivedThreads: (channelId: string, params?: Partial<ListJoinedPrivateArchivedThreadParams>, options?: O) => RestResponse<ListJoinedPrivateArchivedThreadResponse>;
|
|
@@ -1726,7 +1726,7 @@ export interface Endpoints<O> {
|
|
|
1726
1726
|
modifyGuild: (guildId: string, params?: Partial<ModifyGuildParams>, options?: O) => RestResponse<Guild>;
|
|
1727
1727
|
/** Modify the positions of a set of channel objects for the guild. Requires MANAGE_CHANNELS permission. Returns a 204 empty response on success. Fires multiple Channel Update Gateway events. */
|
|
1728
1728
|
modifyGuildChannelPositions: (guildId: string, params?: Partial<ModifyGuildChannelPositionParams>, options?: O) => RestResponse<any>;
|
|
1729
|
-
/** Modify the given emoji.
|
|
1729
|
+
/** Modify the given emoji. For emojis created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other emojis, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event. */
|
|
1730
1730
|
modifyGuildEmoji: (guildId: string, emojiId: string, params?: Partial<ModifyGuildEmojiParams>, options?: O) => RestResponse<Emoji>;
|
|
1731
1731
|
/** Modify attributes of a guild member. Returns a 200 OK with the guild member as the body. Fires a Guild Member Update Gateway event. If the channel_id is set to null, this will force the target user to be disconnected from voice. */
|
|
1732
1732
|
modifyGuildMember: (guildId: string, userId: string, params?: Partial<ModifyGuildMemberParams>, options?: O) => RestResponse<GuildMember>;
|
|
@@ -1740,7 +1740,7 @@ export interface Endpoints<O> {
|
|
|
1740
1740
|
modifyGuildRolePositions: (guildId: string, params?: Partial<ModifyGuildRolePositionParams>, options?: O) => RestResponse<Array<Role>>;
|
|
1741
1741
|
/** Modify a guild scheduled event. Returns the modified guild scheduled event object on success. Fires a Guild Scheduled Event Update Gateway event. */
|
|
1742
1742
|
modifyGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<ModifyGuildScheduledEventParams>, options?: O) => RestResponse<GuildScheduledEvent>;
|
|
1743
|
-
/** Modify the given sticker.
|
|
1743
|
+
/** Modify the given sticker. For stickers created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other stickers, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns the updated sticker object on success. Fires a Guild Stickers Update Gateway event. */
|
|
1744
1744
|
modifyGuildSticker: (guildId: string, stickerId: string, params?: Partial<ModifyGuildStickerParams>, options?: O) => RestResponse<Sticker>;
|
|
1745
1745
|
/** Modifies the template's metadata. Requires the MANAGE_GUILD permission. Returns the guild template object on success. */
|
|
1746
1746
|
modifyGuildTemplate: (guildId: string, templateCode: string, params?: Partial<ModifyGuildTemplateParams>, options?: O) => RestResponse<GuildTemplate>;
|
|
@@ -1863,7 +1863,7 @@ export interface FollowedChannel {
|
|
|
1863
1863
|
export interface ForumAndMediaThreadMessageParam {
|
|
1864
1864
|
/** Message contents (up to 2000 characters) */
|
|
1865
1865
|
readonly content?: string;
|
|
1866
|
-
/**
|
|
1866
|
+
/** Up to 10 rich embeds (up to 6000 characters) */
|
|
1867
1867
|
readonly embeds?: Array<Embed>;
|
|
1868
1868
|
/** Allowed mentions for the message */
|
|
1869
1869
|
readonly allowed_mentions?: AllowedMention;
|
|
@@ -1873,7 +1873,7 @@ export interface ForumAndMediaThreadMessageParam {
|
|
|
1873
1873
|
readonly sticker_ids?: Array<Snowflake>;
|
|
1874
1874
|
/** Attachment objects with filename and description. See Uploading Files */
|
|
1875
1875
|
readonly attachments?: Array<Attachment>;
|
|
1876
|
-
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
1876
|
+
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set) */
|
|
1877
1877
|
readonly flags?: number;
|
|
1878
1878
|
}
|
|
1879
1879
|
export declare enum ForumLayoutType {
|
|
@@ -3681,13 +3681,13 @@ export declare const PermissionFlag: {
|
|
|
3681
3681
|
readonly MANAGE_ROLES: bigint;
|
|
3682
3682
|
/** Allows management and editing of webhooks */
|
|
3683
3683
|
readonly MANAGE_WEBHOOKS: bigint;
|
|
3684
|
-
/** Allows
|
|
3684
|
+
/** Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users */
|
|
3685
3685
|
readonly MANAGE_GUILD_EXPRESSIONS: bigint;
|
|
3686
3686
|
/** Allows members to use application commands, including slash commands and context menu commands. */
|
|
3687
3687
|
readonly USE_APPLICATION_COMMANDS: bigint;
|
|
3688
3688
|
/** Allows for requesting to speak in stage channels. (This permission is under active development and may be changed or removed.) */
|
|
3689
3689
|
readonly REQUEST_TO_SPEAK: bigint;
|
|
3690
|
-
/** Allows for
|
|
3690
|
+
/** Allows for editing and deleting scheduled events created by all users */
|
|
3691
3691
|
readonly MANAGE_EVENTS: bigint;
|
|
3692
3692
|
/** Allows for deleting and archiving threads, and viewing all private threads */
|
|
3693
3693
|
readonly MANAGE_THREADS: bigint;
|
|
@@ -3707,6 +3707,10 @@ export declare const PermissionFlag: {
|
|
|
3707
3707
|
readonly VIEW_CREATOR_MONETIZATION_ANALYTICS: bigint;
|
|
3708
3708
|
/** Allows for using soundboard in a voice channel */
|
|
3709
3709
|
readonly USE_SOUNDBOARD: bigint;
|
|
3710
|
+
/** Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user */
|
|
3711
|
+
readonly CREATE_GUILD_EXPRESSIONS: bigint;
|
|
3712
|
+
/** Allows for creating scheduled events, and editing and deleting those created by the current user */
|
|
3713
|
+
readonly CREATE_EVENTS: bigint;
|
|
3710
3714
|
/** Allows the usage of custom soundboard sounds from other servers */
|
|
3711
3715
|
readonly USE_EXTERNAL_SOUNDS: bigint;
|
|
3712
3716
|
/** Allows sending voice messages */
|
|
@@ -3753,8 +3757,14 @@ export interface PromptOption {
|
|
|
3753
3757
|
readonly channel_ids: Array<Snowflake>;
|
|
3754
3758
|
/** IDs for roles assigned to a member when the option is selected */
|
|
3755
3759
|
readonly role_ids: Array<Snowflake>;
|
|
3756
|
-
/** Emoji of the option */
|
|
3757
|
-
readonly emoji
|
|
3760
|
+
/** Emoji of the option (see below) */
|
|
3761
|
+
readonly emoji?: Emoji;
|
|
3762
|
+
/** Emoji ID of the option (see below) */
|
|
3763
|
+
readonly emoji_id?: Snowflake;
|
|
3764
|
+
/** Emoji name of the option (see below) */
|
|
3765
|
+
readonly emoji_name?: string;
|
|
3766
|
+
/** Whether the emoji is animated (see below) */
|
|
3767
|
+
readonly emoji_animated?: boolean;
|
|
3758
3768
|
/** Title of the option */
|
|
3759
3769
|
readonly title: string;
|
|
3760
3770
|
/** Description of the option */
|
|
@@ -4118,9 +4128,9 @@ export interface StartThreadInForumOrMediaChannelParams {
|
|
|
4118
4128
|
readonly auto_archive_duration?: number;
|
|
4119
4129
|
/** amount of seconds a user has to wait before sending another message (0-21600) */
|
|
4120
4130
|
readonly rate_limit_per_user?: number | null;
|
|
4121
|
-
/** contents of the first message in the forum thread */
|
|
4131
|
+
/** contents of the first message in the forum/media thread */
|
|
4122
4132
|
readonly message: Message;
|
|
4123
|
-
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
|
|
4133
|
+
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM or a GUILD_MEDIA channel */
|
|
4124
4134
|
readonly applied_tags?: Array<Snowflake>;
|
|
4125
4135
|
/** Contents of the file being sent. See Uploading Files */
|
|
4126
4136
|
readonly files?: string;
|