dfx 0.76.0 → 0.76.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.
- package/Cache/prelude.d.ts +3 -3
- package/DiscordGateway/Sharder.d.ts +2 -2
- package/DiscordGateway/WS.d.ts +1 -0
- package/DiscordGateway/WS.d.ts.map +1 -1
- package/DiscordGateway.d.ts +1 -1
- package/Interactions/context.d.ts +1 -1
- package/Interactions/definitions.d.ts +3 -3
- package/Interactions/gateway.d.ts +1 -1
- package/RateLimit.d.ts +2 -2
- package/mjs/version.mjs +1 -1
- package/package.json +4 -4
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/Cache/prelude.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export interface OpsOptions<E, A> {
|
|
|
27
27
|
remove: Stream.Stream<never, E, string>;
|
|
28
28
|
}
|
|
29
29
|
export declare const ops: <E, T>({ create, id, remove, update, }: OpsOptions<E, T>) => Stream.Stream<never, E, CacheOp<T>>;
|
|
30
|
-
export declare const guilds: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, CacheDriver<E, Discord.Guild>>) => Effect.Effect<DiscordREST |
|
|
31
|
-
export declare const channels: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, ParentCacheDriver<E, Discord.Channel>>) => Effect.Effect<DiscordREST |
|
|
32
|
-
export declare const roles: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, ParentCacheDriver<E, Discord.Role>>) => Effect.Effect<DiscordREST |
|
|
30
|
+
export declare const guilds: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, CacheDriver<E, Discord.Guild>>) => Effect.Effect<DiscordREST | Scope.Scope | DiscordGateway | RM, EM, Cache<E, DiscordRESTError | ResponseError, Discord.Guild>>;
|
|
31
|
+
export declare const channels: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, ParentCacheDriver<E, Discord.Channel>>) => Effect.Effect<DiscordREST | Scope.Scope | DiscordGateway | RM, EM, ParentCache<E, DiscordRESTError | ResponseError, DiscordRESTError | ResponseError, Discord.Channel>>;
|
|
32
|
+
export declare const roles: <RM, EM, E>(makeDriver: Effect.Effect<RM, EM, ParentCacheDriver<E, Discord.Role>>) => Effect.Effect<DiscordREST | Scope.Scope | DiscordGateway | RM, EM, ParentCache<E, CacheMissError, DiscordRESTError | ResponseError, Discord.Role>>;
|
|
33
33
|
//# sourceMappingURL=prelude.d.ts.map
|
|
@@ -12,13 +12,13 @@ import type { WebSocketCloseError, WebSocketError } from "dfx/DiscordGateway/WS"
|
|
|
12
12
|
import { DiscordREST } from "dfx/DiscordREST";
|
|
13
13
|
import { RateLimiter } from "dfx/RateLimit";
|
|
14
14
|
import type * as Discord from "dfx/types";
|
|
15
|
-
declare const make: Effect.Effect<DiscordConfig | RateLimiter | DiscordREST |
|
|
15
|
+
declare const make: Effect.Effect<DiscordConfig | RateLimiter | DiscordREST | Shard | ShardStore, never, {
|
|
16
16
|
readonly shards: Effect.Effect<never, never, HashSet.HashSet<RunningShard>>;
|
|
17
17
|
readonly run: (hub: PubSub.PubSub<Discord.GatewayPayload<Discord.ReceiveEvent>>, sendQueue: Queue.Dequeue<Discord.GatewayPayload<Discord.SendEvent>>) => Effect.Effect<never, WebSocketError | WebSocketCloseError, never>;
|
|
18
18
|
}>;
|
|
19
19
|
export interface Sharder extends Effect.Effect.Success<typeof make> {
|
|
20
20
|
}
|
|
21
21
|
export declare const Sharder: Tag<Sharder, Sharder>;
|
|
22
|
-
export declare const LiveSharder: Layer.Layer<DiscordConfig | import("../Log").Log | import("dfx/RateLimit").RateLimitStore | DiscordREST |
|
|
22
|
+
export declare const LiveSharder: Layer.Layer<DiscordConfig | import("../Log").Log | import("dfx/RateLimit").RateLimitStore | DiscordREST | import("./DiscordWS").DiscordWSCodec | ShardStore, never, Sharder>;
|
|
23
23
|
export {};
|
|
24
24
|
//# sourceMappingURL=Sharder.d.ts.map
|
package/DiscordGateway/WS.d.ts
CHANGED
|
@@ -1 +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C3B,eAAO,MAAM,MAAM,6BAAyB,CAAA"}
|
package/DiscordGateway.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ export interface DiscordGateway {
|
|
|
15
15
|
}
|
|
16
16
|
export declare const DiscordGateway: Tag<DiscordGateway, DiscordGateway>;
|
|
17
17
|
export declare const make: Effect.Effect<import("effect/Scope").Scope | Sharder, never, DiscordGateway>;
|
|
18
|
-
export declare const LiveDiscordGateway: Layer.Layer<import("./DiscordConfig").DiscordConfig | import("./Log").Log | import("./RateLimit").RateLimitStore | import("./DiscordREST").DiscordREST | import("./DiscordGateway/
|
|
18
|
+
export declare const LiveDiscordGateway: Layer.Layer<import("./DiscordConfig").DiscordConfig | import("./Log").Log | import("./RateLimit").RateLimitStore | import("./DiscordREST").DiscordREST | import("./DiscordGateway/DiscordWS").DiscordWSCodec | import("./DiscordGateway/ShardStore").ShardStore, never, DiscordGateway>;
|
|
19
19
|
//# sourceMappingURL=DiscordGateway.d.ts.map
|
|
@@ -29,7 +29,7 @@ export declare class SubCommandNotFound {
|
|
|
29
29
|
readonly _tag = "SubCommandNotFound";
|
|
30
30
|
constructor(data: Discord.ApplicationCommandDatum);
|
|
31
31
|
}
|
|
32
|
-
export declare const handleSubCommands: <NER extends Record<string, Effect.Effect<any, any, Discord.InteractionResponse>>>(commands: NER) => Effect.Effect<Discord.
|
|
32
|
+
export declare const handleSubCommands: <NER extends Record<string, Effect.Effect<any, any, Discord.InteractionResponse>>>(commands: NER) => Effect.Effect<Discord.ApplicationCommandDatum | Discord.Interaction | Exclude<[NER[keyof NER]] extends [{
|
|
33
33
|
[Effect.EffectTypeId]: {
|
|
34
34
|
_R: (_: never) => infer R;
|
|
35
35
|
};
|
|
@@ -9,14 +9,14 @@ export declare class GlobalApplicationCommand<R, E> {
|
|
|
9
9
|
readonly _tag = "GlobalApplicationCommand";
|
|
10
10
|
constructor(command: Discord.CreateGlobalApplicationCommandParams, handle: CommandHandler<R, E>);
|
|
11
11
|
}
|
|
12
|
-
export declare const global: <R, E, const A extends DeepReadonlyObject<Discord.CreateGlobalApplicationCommandParams>>(command: A, handle: CommandHandler<R, E, A>) => GlobalApplicationCommand<Exclude<R, Discord.
|
|
12
|
+
export declare const global: <R, E, const A extends DeepReadonlyObject<Discord.CreateGlobalApplicationCommandParams>>(command: A, handle: CommandHandler<R, E, A>) => GlobalApplicationCommand<Exclude<R, Discord.ApplicationCommandDatum | Discord.Interaction>, E>;
|
|
13
13
|
export declare class GuildApplicationCommand<R, E> {
|
|
14
14
|
readonly command: Discord.CreateGuildApplicationCommandParams;
|
|
15
15
|
readonly handle: CommandHandler<R, E>;
|
|
16
16
|
readonly _tag = "GuildApplicationCommand";
|
|
17
17
|
constructor(command: Discord.CreateGuildApplicationCommandParams, handle: CommandHandler<R, E>);
|
|
18
18
|
}
|
|
19
|
-
export declare const guild: <R, E, const A extends DeepReadonlyObject<Discord.CreateGuildApplicationCommandParams>>(command: A, handle: CommandHandler<R, E, A>) => GuildApplicationCommand<Exclude<R, Discord.
|
|
19
|
+
export declare const guild: <R, E, const A extends DeepReadonlyObject<Discord.CreateGuildApplicationCommandParams>>(command: A, handle: CommandHandler<R, E, A>) => GuildApplicationCommand<Exclude<R, Discord.ApplicationCommandDatum | Discord.Interaction>, E>;
|
|
20
20
|
export declare class MessageComponent<R, E> {
|
|
21
21
|
readonly predicate: (customId: string) => Effect.Effect<R, E, boolean>;
|
|
22
22
|
readonly handle: Effect.Effect<R, E, Discord.InteractionResponse>;
|
|
@@ -37,7 +37,7 @@ export declare class Autocomplete<R, E> {
|
|
|
37
37
|
readonly _tag = "Autocomplete";
|
|
38
38
|
constructor(predicate: (data: Discord.ApplicationCommandDatum, focusedOption: Discord.ApplicationCommandInteractionDataOption) => Effect.Effect<R, E, boolean>, handle: Effect.Effect<R, E, Discord.InteractionResponse>);
|
|
39
39
|
}
|
|
40
|
-
export declare const autocomplete: <R1, R2, E1, E2>(pred: (data: Discord.ApplicationCommandDatum, focusedOption: Discord.ApplicationCommandInteractionDataOption) => Effect.Effect<R1, E1, boolean>, handle: Effect.Effect<R2, E2, Discord.InteractionResponse>) => Autocomplete<Exclude<R1, Discord.
|
|
40
|
+
export declare const autocomplete: <R1, R2, E1, E2>(pred: (data: Discord.ApplicationCommandDatum, focusedOption: Discord.ApplicationCommandInteractionDataOption) => Effect.Effect<R1, E1, boolean>, handle: Effect.Effect<R2, E2, Discord.InteractionResponse>) => Autocomplete<Exclude<R1, Discord.ApplicationCommandDatum | Discord.Interaction | FocusedOptionContext> | Exclude<R2, Discord.ApplicationCommandDatum | Discord.Interaction | FocusedOptionContext>, E1 | E2>;
|
|
41
41
|
type DeepReadonly<T> = T extends Array<infer R> ? ReadonlyArray<DeepReadonly<R>> : T extends Function ? T : T extends object ? DeepReadonlyObject<T> : T;
|
|
42
42
|
type DeepReadonlyObject<T> = {
|
|
43
43
|
readonly [P in keyof T]: DeepReadonly<T[P]>;
|
|
@@ -15,7 +15,7 @@ export interface RunOpts {
|
|
|
15
15
|
/**
|
|
16
16
|
* @tsplus pipeable dfx/InteractionBuilder runGateway
|
|
17
17
|
*/
|
|
18
|
-
export declare const run: <R, R2, E, TE, E2>(postHandler: (effect: Effect.Effect<DiscordREST |
|
|
18
|
+
export declare const run: <R, R2, E, TE, E2>(postHandler: (effect: Effect.Effect<DiscordREST | Discord.Interaction | R, DiscordRESTError | DefinitionNotFound | TE, void>) => Effect.Effect<R2, E2, void>, { sync }?: RunOpts) => (ix: InteractionBuilder<R, E, TE>) => Effect.Effect<DiscordREST | DiscordGateway | Exclude<R2, Discord.Interaction>, DiscordRESTError | Http.error.ResponseError | E2, never>;
|
|
19
19
|
export interface InteractionsRegistry {
|
|
20
20
|
readonly register: <E>(ix: InteractionBuilder<never, E, never>) => Effect.Effect<never, never, void>;
|
|
21
21
|
}
|
package/RateLimit.d.ts
CHANGED
|
@@ -19,12 +19,12 @@ export interface RateLimitStore {
|
|
|
19
19
|
}
|
|
20
20
|
export declare const RateLimitStore: Tag<RateLimitStore, RateLimitStore>;
|
|
21
21
|
export declare const LiveMemoryRateLimitStore: Layer.Layer<never, never, RateLimitStore>;
|
|
22
|
-
declare const makeLimiter: Effect.Effect<
|
|
22
|
+
declare const makeLimiter: Effect.Effect<Log | RateLimitStore, never, {
|
|
23
23
|
maybeWait: (key: string, window: Duration.Duration, limit: number, multiplier?: number) => Effect.Effect<never, never, void>;
|
|
24
24
|
}>;
|
|
25
25
|
export interface RateLimiter extends Effect.Effect.Success<typeof makeLimiter> {
|
|
26
26
|
}
|
|
27
27
|
export declare const RateLimiter: Tag<RateLimiter, RateLimiter>;
|
|
28
|
-
export declare const LiveRateLimiter: Layer.Layer<
|
|
28
|
+
export declare const LiveRateLimiter: Layer.Layer<Log | RateLimitStore, never, RateLimiter>;
|
|
29
29
|
export {};
|
|
30
30
|
//# sourceMappingURL=RateLimit.d.ts.map
|
package/mjs/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const LIB_VERSION = "0.76.
|
|
1
|
+
export const LIB_VERSION = "0.76.1";
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dfx",
|
|
3
|
-
"version": "0.76.
|
|
3
|
+
"version": "0.76.1",
|
|
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.32.
|
|
43
|
-
"effect": "2.0.0-next.
|
|
42
|
+
"@effect/platform": "^0.32.1",
|
|
43
|
+
"effect": "2.0.0-next.58"
|
|
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": "ea9623e85af43ad3f27a23a1e7e1171c34e358cd",
|
|
52
52
|
"main": "./index.js"
|
|
53
53
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "0.76.
|
|
1
|
+
export const LIB_VERSION = "0.76.1";
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "0.76.
|
|
1
|
+
export declare const LIB_VERSION = "0.76.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED