|
1 | | -//using Disc.NET.Commands; |
2 | | -//using Disc.NET.Commands.Attributes; |
3 | | -//using Disc.NET.Commands.Contexts; |
4 | | -//using Disc.NET.Shared.Enums; |
5 | | -//using System; |
6 | | -//using System.Collections.Generic; |
7 | | -//using System.Linq; |
8 | | -//using System.Text; |
9 | | -//using System.Threading.Tasks; |
| 1 | +using Disc.NET.Commands; |
| 2 | +using Disc.NET.Commands.Attributes; |
| 3 | +using Disc.NET.Commands.Contexts; |
| 4 | +using Disc.NET.Shared.Enums; |
| 5 | +using System; |
| 6 | +using System.Collections.Generic; |
| 7 | +using System.Linq; |
| 8 | +using System.Text; |
| 9 | +using System.Threading.Tasks; |
10 | 10 |
|
11 | | -//namespace GenericBot |
12 | | -//{ |
13 | | -// [SlashCommand("teste2", InteractionType.String, "teste comand2")] |
| 11 | +namespace GenericBot |
| 12 | +{ |
| 13 | + [SlashCommand("comando_sem_parametros", InteractionType.SubCommand, "teste comand2")] |
14 | 14 |
|
15 | | -// internal class SlashCommandTest2 : CommandBase, ISlashCommand<CommandContext> |
16 | | -// { |
17 | | -// public Task<bool> RunAsync(CommandContext context, SlashCommandParamsResult result) |
18 | | -// { |
19 | | -// throw new NotImplementedException(); |
20 | | -// } |
| 15 | + internal class SlashCommandTest2 : CommandBase, ISlashCommand |
| 16 | + { |
| 17 | + public async Task<bool> RunAsync(InteractionContext context, SlashCommandParamsResult result) |
| 18 | + { |
| 19 | + return true; |
| 20 | + } |
21 | 21 |
|
22 | | -// public List<SlashCommandOptions> BuildOptions() |
23 | | -// { |
24 | | -// return new List<SlashCommandOptions>() |
25 | | -// { |
26 | | -// new() |
27 | | -// { |
28 | | -// Name = "param1", |
29 | | -// Description = "Primeiro parâmetro", |
30 | | -// Type = InteractionType.String, |
31 | | -// Required = true, |
32 | | -// Choices = new List<SlashCommandChoices>() |
33 | | -// { |
34 | | -// new () |
35 | | -// { |
36 | | -// Name = "Dog", |
37 | | -// Value = "animal_dog" |
38 | | -// } |
39 | | -// } |
40 | | -// } |
41 | | -// }; |
42 | | -// } |
43 | | -// } |
44 | | -//} |
| 22 | + } |
| 23 | +} |
0 commit comments