Docs/components v2 :wires: (#3162)

* new pages :3

* fimished intro page

* fimished interaction page

* remove unused shit

* I think we are done lmao

* I lied, fixed some small mistakes

* Update docs/guides/components_v2/interaction.md

Co-authored-by: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com>

* misha quality assurance :3 + breakings pages

* Apply suggestions from code review

Co-authored-by: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com>

* component types guide expanded

* :3

* Apply suggestions from code review

Co-authored-by: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com>

---------

Co-authored-by: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com>
This commit is contained in:
Adriaan Waem
2025-07-18 21:14:24 +02:00
committed by GitHub
parent 80b4328578
commit cf66ab4520
20 changed files with 455 additions and 5 deletions

View File

@@ -0,0 +1,32 @@
private async Task<ComponentBuilderV2> BuildComponentsUnsafeAsync()
{
if (!_recipes.Any()) // _recipes is simply a list of recipe objects
{
return new ComponentBuilderV2()
.WithTextDisplay(
"""
# No recipes found
You should consider adding some.
""");
}
var builder = new ComponentBuilderV2();
Emote? emote = await _clientProvider.Client.GetApplicationEmoteAsync(1393996479357517925);
foreach (Recipe recipe in _recipes)
{
var buttonBuilder = new ButtonBuilder("Look inside", $"{RecipesLookInsideButton}-{recipe.RecipeId}"); // RecipesLookInsideButton is a constant string
if (emote is not null)
buttonBuilder.WithEmote(emote);
builder
.WithTextDisplay($"# {recipe.Name}")
.WithMediaGallery(["https://cdn.discordapp.com/attachments/964253122547552349/1336440069892083712/7Q3S.gif?ex=67a3d04e&is=67a27ece&hm=059c9d28466f43a50c4b450ca26fc01298a2080356421d8524384bf67ea8f3ab&"])
.WithActionRow([
buttonBuilder
]);
}
return builder;
}