dfx 0.17.5 → 0.17.6
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.
|
@@ -46,9 +46,9 @@ export declare const autocomplete: <R1, R2, E1, E2>(pred: (data: Discord.Applica
|
|
|
46
46
|
type CommandHandler<R, E, A = any> = Effect<R, E, Discord.InteractionResponse> | CommandHandlerFn<R, E, A>;
|
|
47
47
|
export interface CommandHelper<A> {
|
|
48
48
|
resolve: <T>(name: Resolvables<A>["name"], f: (id: Discord.Snowflake, data: Discord.ResolvedDatum) => T | undefined) => Effect<Discord.Interaction, ResolvedDataNotFound, T>;
|
|
49
|
-
option: (name:
|
|
49
|
+
option: (name: AllCommandOptions<A>["name"]) => Effect<Discord.ApplicationCommandDatum, never, Maybe<Discord.ApplicationCommandInteractionDataOption>>;
|
|
50
50
|
optionValue: (name: AllRequiredCommandOptions<A>["name"]) => Effect<Discord.ApplicationCommandDatum, never, string>;
|
|
51
|
-
optionValueOptional: (name:
|
|
51
|
+
optionValueOptional: (name: AllCommandOptions<A>["name"]) => Effect<Discord.ApplicationCommandDatum, never, Maybe<string>>;
|
|
52
52
|
subCommands: <NER extends SubCommandNames<A> extends never ? never : Record<SubCommandNames<A>, Effect<any, any, Discord.InteractionResponse>>>(commands: NER) => Effect<Exclude<[
|
|
53
53
|
NER[keyof NER]
|
|
54
54
|
] extends [
|
|
@@ -94,9 +94,10 @@ type SubCommands<A> = A extends {
|
|
|
94
94
|
options: Discord.ApplicationCommandOption[];
|
|
95
95
|
} ? SubCommands<A["options"][number]> : never;
|
|
96
96
|
type SubCommandNames<A> = Option<SubCommands<A>>["name"];
|
|
97
|
-
type SubCommandOptions<A> = Extract<Option<SubCommands<A>["options"]>, {
|
|
97
|
+
type SubCommandOptions<A> = Extract<Option<Exclude<SubCommands<A>["options"], undefined>[number]>, {
|
|
98
98
|
type: CommandOptionType;
|
|
99
99
|
}>;
|
|
100
|
+
type AllCommandOptions<A> = CommandOptions<A> | SubCommandOptions<A>;
|
|
100
101
|
type RequiredSubCommandOptions<A> = Extract<SubCommandOptions<A>, {
|
|
101
102
|
required: true;
|
|
102
103
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dfx",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"@fp-ts/data": "^0.0.20"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "763704b1bafd514802579e2ee9336aafd01083b3"
|
|
53
53
|
}
|