PadowYT2
PadowYT2
DIAdiscord.js - Imagine an app
Created by PadowYT2 on 12/25/2023 in #djs-questions
Updating Select Menu
👍, thank you. But still having
No overload matches this call.
Overload 1 of 2, '(options: InteractionUpdateOptions & { fetchReply: true; }): Promise<Message<true>>', gave the following error.
Type 'ActionRowBuilder<AnyComponentBuilder>' is missing the following properties from type '(APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>)[]': length, pop, push, concat, and 29 more.
Overload 2 of 2, '(options: string | InteractionUpdateOptions | MessagePayload): Promise<InteractionResponse<true>>', gave the following error.
Type 'ActionRowBuilder<AnyComponentBuilder>' is not assignable to type '(APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>)[]'.ts(2769)
No overload matches this call.
Overload 1 of 2, '(options: InteractionUpdateOptions & { fetchReply: true; }): Promise<Message<true>>', gave the following error.
Type 'ActionRowBuilder<AnyComponentBuilder>' is missing the following properties from type '(APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>)[]': length, pop, push, concat, and 29 more.
Overload 2 of 2, '(options: string | InteractionUpdateOptions | MessagePayload): Promise<InteractionResponse<true>>', gave the following error.
Type 'ActionRowBuilder<AnyComponentBuilder>' is not assignable to type '(APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>)[]'.ts(2769)
await interaction.update({
components: ActionRowBuilder.from(interaction.message.components[0]!),
fetchReply: true,
});
await interaction.update({
components: ActionRowBuilder.from(interaction.message.components[0]!),
fetchReply: true,
});
10 replies
DIAdiscord.js - Imagine an app
Created by PadowYT2 on 12/25/2023 in #djs-questions
Updating Select Menu
Already doing that 😉
10 replies
DIAdiscord.js - Imagine an app
Created by PadowYT2 on 12/25/2023 in #djs-questions
Updating Select Menu
ActionRowBuilder.from(interaction.message.components).components
10 replies
DIAdiscord.js - Imagine an app
Created by PadowYT2 on 12/25/2023 in #djs-questions
Updating Select Menu
Alright, but then why won't interaction.message.components work? Should be raw data by now...?
10 replies
DIAdiscord.js - Imagine an app
Created by PadowYT2 on 12/25/2023 in #djs-questions
Updating Select Menu
Not sure though, I have tried interaction.update({ components: ActionRowBuilder.from(select(interaction)).components });, the select function returns of the constructor of ActionRowBuilder<StringSelectMenuBuilder> But TS doesn't like it:
No overload matches this call.
Overload 1 of 2, '(options: InteractionUpdateOptions & { fetchReply: true; }): Promise<Message<true>>', gave the following error.
Type 'AnyComponentBuilder[]' is not assignable to type '(APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>)[]'.
Type 'AnyComponentBuilder' is not assignable to type 'APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>'.
Type 'ButtonBuilder' is not assignable to type 'APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>'.
Type 'ButtonBuilder' is not assignable to type 'JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>>'.
The types returned by 'toJSON()' are incompatible between these types.
Type 'APIButtonComponent' is not assignable to type 'APIActionRowComponent<APIMessageActionRowComponent>'.
Property 'components' is missing in type 'APIButtonComponentWithCustomId' but required in type 'APIActionRowComponent<APIMessageActionRowComponent>'.
Overload 2 of 2, '(options: string | InteractionUpdateOptions | MessagePayload): Promise<InteractionResponse<true>>', gave the following error.
Type 'AnyComponentBuilder[]' is not assignable to type '(APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>)[]'.
No overload matches this call.
Overload 1 of 2, '(options: InteractionUpdateOptions & { fetchReply: true; }): Promise<Message<true>>', gave the following error.
Type 'AnyComponentBuilder[]' is not assignable to type '(APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>)[]'.
Type 'AnyComponentBuilder' is not assignable to type 'APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>'.
Type 'ButtonBuilder' is not assignable to type 'APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>'.
Type 'ButtonBuilder' is not assignable to type 'JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>>'.
The types returned by 'toJSON()' are incompatible between these types.
Type 'APIButtonComponent' is not assignable to type 'APIActionRowComponent<APIMessageActionRowComponent>'.
Property 'components' is missing in type 'APIButtonComponentWithCustomId' but required in type 'APIActionRowComponent<APIMessageActionRowComponent>'.
Overload 2 of 2, '(options: string | InteractionUpdateOptions | MessagePayload): Promise<InteractionResponse<true>>', gave the following error.
Type 'AnyComponentBuilder[]' is not assignable to type '(APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>)[]'.
I have also tried what you told about interaction.message.components, but it isn't assignable to the types of .from()
10 replies
DIAdiscord.js - Imagine an app
Created by PadowYT2 on 9/19/2023 in #djs-questions
Discoverable servers support
yep
11 replies
DIAdiscord.js - Imagine an app
Created by PadowYT2 on 9/19/2023 in #djs-questions
Discoverable servers support
yep, i undestand, but perhaps is there a list of public information
11 replies
DIAdiscord.js - Imagine an app
Created by PadowYT2 on 9/19/2023 in #djs-questions
Discoverable servers support
well, just remembered it, thats it
11 replies