#BASE_TYPE_REQUIRED: This field is required

1 messages · Page 1 of 1 (latest)

spiral bear
#

I'm trying to create a select menu and respond with it to a command. I do it like so:

            .WithPlaceholder("Placeholder")
            .AddOption("Option 1", "1")
            .AddOption("Option 2", "2")).Build();

            await command.RespondAsync(components: builder, ephemeral: true);```

But I get this error every time it is being executed:

```Discord.Net.HttpException: The server responded with error 50035: Invalid Form Body
Inner Errors:
BASE_TYPE_REQUIRED: This field is required
   at Discord.Net.Queue.RequestBucket.SendAsync(RestRequest request)
   at Discord.Net.Queue.RequestQueue.SendAsync(RestRequest request)
   at Discord.API.DiscordRestApiClient.SendInternalAsync(String method, String endpoint, RestRequest request)
   at Discord.API.DiscordRestApiClient.SendJsonAsync(String method, String endpoint, Object payload, BucketId bucketId, ClientBucketType clientBucket, RequestOptions options)
   at Discord.API.DiscordRestApiClient.CreateInteractionResponseAsync(InteractionResponse response, UInt64 interactionId, String interactionToken, RequestOptions options)
   at Discord.Rest.InteractionHelper.SendInteractionResponseAsync(BaseDiscordClient client, InteractionResponse response, IDiscordInteraction interaction, IMessageChannel channel, RequestOptions options)
   at Discord.WebSocket.SocketCommandBase.RespondAsync(String text, Embed[] embeds, Boolean isTTS, Boolean ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options)```

How can I fix it?
hearty burrow
#

I am unsure, but you do need to specifiy a few things

#
.WithCustomId("menu-1")
.WithMinValues(1)
.WithMaxValues(1)
#

the custom id is for the handler

#

the min and max values help specify how many things can be selected by users

spiral bear