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:
14
docs/guides/components_v2/samples/recipes-command.cs
Normal file
14
docs/guides/components_v2/samples/recipes-command.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
[SlashCommand("recipes", "Gets all recipes")]
|
||||
public async Task GetRecipesAsync()
|
||||
{
|
||||
MessageComponent? embed = (await recipeService.GetRecipesComponentAsync())?.Build();
|
||||
|
||||
if (embed is null)
|
||||
{
|
||||
await RespondAsync($"No recipes found.", ephemeral: true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await RespondAsync(components: embed);
|
||||
}
|
||||
Reference in New Issue
Block a user