Browse Source

added some comments t othe example code

pull/2246/head
Misha133 3 years ago
parent
commit
5648c2f711
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      docs/guides/int_framework/samples/intro/groupmodule.cs

+ 8
- 2
docs/guides/int_framework/samples/intro/groupmodule.cs View File

@@ -1,13 +1,19 @@
//You can put commands in groups
[Group("group-name", "Group description")]
public class CommandGroupModule : InteractionModuleBase<SocketInteractionContext>
{
//This command will look like
// group-name ping
[SlashCommand("ping", "Get a pong")]
public async Task PongSubcommand()
=> await RespondAsync("Pong!");

//And even in sub-command groups
[Group("subcommand-group-name", "Subcommand group description")]
public class SubcommandGroupModule : InteractionModuleBase<SocketInteractionContext>
public class SubСommandGroupModule : InteractionModuleBase<SocketInteractionContext>
{
//This command will look like
// group-name subcommand-group-name echo
[SlashCommand("echo", "Echo an input")]
public async Task PongSubcommand(string input)
=> await RespondAsync(input);


Loading…
Cancel
Save