dfx 1.0.16 → 1.1.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/dist/Cache/prelude.d.ts.map +1 -1
- package/dist/Cache/prelude.js +1 -1
- package/dist/Cache/prelude.js.map +1 -1
- package/dist/DiscordGateway/DiscordWS.d.ts +1 -1
- package/dist/DiscordGateway/DiscordWS.d.ts.map +1 -1
- package/dist/DiscordGateway/DiscordWS.js +1 -1
- package/dist/DiscordGateway/DiscordWS.js.map +1 -1
- package/dist/DiscordGateway/Shard/StateStore.d.ts +1 -1
- package/dist/DiscordGateway/Shard/StateStore.d.ts.map +1 -1
- package/dist/DiscordGateway/Shard/StateStore.js +1 -1
- package/dist/DiscordGateway/Shard/StateStore.js.map +1 -1
- package/dist/DiscordGateway/Shard.d.ts +2 -2
- package/dist/DiscordGateway/Sharder.d.ts +1 -1
- package/dist/DiscordGateway/Sharder.d.ts.map +1 -1
- package/dist/DiscordGateway.d.ts +2 -2
- package/dist/DiscordGateway.d.ts.map +1 -1
- package/dist/DiscordREST/Generated.d.ts +90 -51
- package/dist/DiscordREST/Generated.d.ts.map +1 -1
- package/dist/DiscordREST/Generated.js +11 -5
- package/dist/DiscordREST/Generated.js.map +1 -1
- package/dist/DiscordREST/utils.d.ts +1 -1
- package/dist/DiscordREST/utils.d.ts.map +1 -1
- package/dist/DiscordREST/utils.js +1 -1
- package/dist/DiscordREST/utils.js.map +1 -1
- package/dist/DiscordREST.d.ts +2 -2
- package/dist/DiscordREST.d.ts.map +1 -1
- package/dist/DiscordREST.js +3 -3
- package/dist/DiscordREST.js.map +1 -1
- package/dist/Interactions/builder.d.ts +2 -2
- package/dist/Interactions/builder.d.ts.map +1 -1
- package/dist/Interactions/gateway.d.ts.map +1 -1
- package/dist/Interactions/gateway.js +5 -7
- package/dist/Interactions/gateway.js.map +1 -1
- package/dist/gateway.d.ts +2 -2
- package/dist/gateway.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/webhooks.d.ts +1 -1
- package/dist/webhooks.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/Cache/prelude.ts +21 -32
- package/src/DiscordGateway/DiscordWS.ts +1 -1
- package/src/DiscordGateway/Shard/StateStore.ts +1 -1
- package/src/DiscordGateway.ts +2 -2
- package/src/DiscordREST/Generated.ts +264 -367
- package/src/DiscordREST/utils.ts +1 -1
- package/src/DiscordREST.ts +5 -5
- package/src/Interactions/gateway.ts +6 -9
- package/src/gateway.ts +2 -2
- package/src/index.ts +1 -1
- package/src/types.ts +2 -1
- package/src/version.ts +1 -1
- package/src/webhooks.ts +1 -1
package/src/DiscordREST/utils.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Duration from "effect/Duration"
|
|
2
2
|
import { pipe } from "effect/Function"
|
|
3
3
|
import * as Option from "effect/Option"
|
|
4
|
-
import * as Headers from "effect/
|
|
4
|
+
import * as Headers from "effect/http/Headers"
|
|
5
5
|
|
|
6
6
|
const majorResources = ["channels", "guilds", "webhooks"] as const
|
|
7
7
|
|
package/src/DiscordREST.ts
CHANGED
|
@@ -16,11 +16,11 @@ import * as Layer from "effect/Layer"
|
|
|
16
16
|
import * as Option from "effect/Option"
|
|
17
17
|
import * as Redacted from "effect/Redacted"
|
|
18
18
|
import * as Context from "effect/Context"
|
|
19
|
-
import * as HttpBody from "effect/
|
|
20
|
-
import * as HttpClient from "effect/
|
|
21
|
-
import type { HttpClientError } from "effect/
|
|
22
|
-
import * as HttpRequest from "effect/
|
|
23
|
-
import type * as HttpResponse from "effect/
|
|
19
|
+
import * as HttpBody from "effect/http/HttpBody"
|
|
20
|
+
import * as HttpClient from "effect/http/HttpClient"
|
|
21
|
+
import type { HttpClientError } from "effect/http/HttpClientError"
|
|
22
|
+
import * as HttpRequest from "effect/http/HttpClientRequest"
|
|
23
|
+
import type * as HttpResponse from "effect/http/HttpClientResponse"
|
|
24
24
|
|
|
25
25
|
const make = Effect.gen(function* () {
|
|
26
26
|
const { rest, token } = yield* DiscordConfig
|
|
@@ -11,7 +11,7 @@ import * as Context from "effect/Context"
|
|
|
11
11
|
import { DiscordGateway } from "../DiscordGateway.ts"
|
|
12
12
|
import type { DiscordRESTError } from "../DiscordREST.ts"
|
|
13
13
|
import { DiscordREST } from "../DiscordREST.ts"
|
|
14
|
-
import type { ListMyGuilds200
|
|
14
|
+
import type { ListMyGuilds200 } from "../types.ts"
|
|
15
15
|
import type {
|
|
16
16
|
GlobalApplicationCommand,
|
|
17
17
|
GuildApplicationCommand,
|
|
@@ -81,16 +81,13 @@ export const run =
|
|
|
81
81
|
|
|
82
82
|
const runGuildSync = Effect.gen(function* () {
|
|
83
83
|
const commands = GuildApplicationCommand.map(_ => _.command)
|
|
84
|
-
let
|
|
85
|
-
undefined
|
|
84
|
+
let after: string | undefined
|
|
86
85
|
while (true) {
|
|
87
|
-
const next: ListMyGuilds200 = yield* rest.listMyGuilds({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (!Arr.isReadonlyArrayNonEmpty(next)) break
|
|
91
|
-
results = next
|
|
86
|
+
const next: ListMyGuilds200 = yield* rest.listMyGuilds({ after })
|
|
87
|
+
if (next === null || !Arr.isReadonlyArrayNonEmpty(next)) break
|
|
88
|
+
after = Arr.lastNonEmpty(next).id
|
|
92
89
|
yield* Effect.forEach(
|
|
93
|
-
|
|
90
|
+
next,
|
|
94
91
|
guild =>
|
|
95
92
|
rest.bulkSetGuildApplicationCommands(
|
|
96
93
|
application.id,
|
package/src/gateway.ts
CHANGED
|
@@ -15,9 +15,9 @@ import { InteractionsRegistryLive } from "./Interactions/gateway.ts"
|
|
|
15
15
|
import type { RateLimiter } from "./RateLimit.ts"
|
|
16
16
|
import { MemoryRateLimitStoreLive, RateLimiterLive } from "./RateLimit.ts"
|
|
17
17
|
import * as Layer from "effect/Layer"
|
|
18
|
-
import type * as HttpClient from "effect/
|
|
18
|
+
import type * as HttpClient from "effect/http/HttpClient"
|
|
19
19
|
import type { DiscordConfig } from "./DiscordConfig.ts"
|
|
20
|
-
import type { WebSocketConstructor } from "effect/
|
|
20
|
+
import type { WebSocketConstructor } from "effect/socket/Socket"
|
|
21
21
|
|
|
22
22
|
export { DiscordGateway, DiscordGatewayLive } from "./DiscordGateway.ts"
|
|
23
23
|
|
package/src/index.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -45,7 +45,8 @@ interface APIAutoModerationAction {
|
|
|
45
45
|
export type APIChannel = Rest.GetChannel200
|
|
46
46
|
export type APIEmoji = Rest.EmojiResponse
|
|
47
47
|
export type APIGuild = Rest.GuildResponse
|
|
48
|
-
export type APIGuildIntegration =
|
|
48
|
+
export type APIGuildIntegration =
|
|
49
|
+
NonNullable<Rest.ListGuildIntegrations200>[number]
|
|
49
50
|
export type APIGuildMember = Rest.GuildMemberResponse
|
|
50
51
|
export type APIGuildScheduledEvent = Rest.ScheduledEventResponse
|
|
51
52
|
export type APIMessage = Rest.MessageResponse
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "1.0
|
|
1
|
+
export const LIB_VERSION = "1.1.0";
|
package/src/webhooks.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HttpClient } from "effect/
|
|
1
|
+
import type { HttpClient } from "effect/http/HttpClient"
|
|
2
2
|
import type { DiscordConfig } from "./DiscordConfig.ts"
|
|
3
3
|
import type { DiscordREST } from "./DiscordREST.ts"
|
|
4
4
|
import { DiscordRESTLive } from "./DiscordREST.ts"
|