Discord-Net-Labs/Discord.Net-Labs

Withbutton method does not handle exception when using buttonbuilder

hikaru1337 opened this issue · 1 comments

Check The Docs

  • I double checked the docs and couldn't find any useful information.

Verify Issue Source

  • I verified the issue was caused by Discord.Net.

Check your intents

  • I double checked that I have the required intents.

Description

When using the assembled buttonbuilder manually, the method does not check the styles, as it is done if the button is assembled through the method.

If it's easier, if you assemble the button through the method, then the style is checked, if you assemble it through the button builder, the style is not checked.

Version

3.6.1 labs

Working Version

No response

Logs

image

Sample

var ButtonRight = new ButtonBuilder { Label = "testLabel", CustomId = $"TestId"};
var Comp = new ComponentBuilder().WithButton(ButtonRight);

try
{
    await Context.Channel.SendMessageAsync("", false, null, components: Comp.Build());
}
catch (Discord.Net.HttpException ex)
{
    Console.WriteLine(ex.Errors);
}

this is resolved in #429