This commit is contained in:
José Henrique Ivanchechen 2023-02-12 17:11:12 -03:00
parent c0f7c8cc1d
commit 9be2ffc54a
2 changed files with 1 additions and 15 deletions

View File

@ -10,11 +10,6 @@ namespace TextCommandFramework.Modules
public PictureService PictureService { get; set; } public PictureService PictureService { get; set; }
public PlayerService PlayerService { get; set; } public PlayerService PlayerService { get; set; }
[Command("ping")]
[Alias("pong", "hello")]
public Task PingAsync()
=> ReplyAsync("pong!");
[Command("cat")] [Command("cat")]
public async Task CatAsync() public async Task CatAsync()
{ {
@ -23,10 +18,6 @@ namespace TextCommandFramework.Modules
await Context.Channel.SendFileAsync(stream, "cat.png"); await Context.Channel.SendFileAsync(stream, "cat.png");
} }
[Command("echo")]
public Task EchoAsync([Remainder] string text)
=> ReplyAsync('\u200B' + text);
[Command("play", RunMode = RunMode.Async)] [Command("play", RunMode = RunMode.Async)]
public async Task PlayAsync([Remainder] string text) public async Task PlayAsync([Remainder] string text)
{ {
@ -70,10 +61,5 @@ namespace TextCommandFramework.Modules
await PlayerService.Leave(Context.Guild.Id); await PlayerService.Leave(Context.Guild.Id);
} }
[Command("guild_only")]
[RequireContext(ContextType.Guild, ErrorMessage = "Sorry, this command must be ran from within a server, not a DM!")]
public Task GuildOnlyCommand()
=> ReplyAsync("Nothing to see here!");
} }
} }

View File

@ -34,7 +34,7 @@ namespace TextCommandFramework
services.GetRequiredService<CommandService>().Log += LogAsync; services.GetRequiredService<CommandService>().Log += LogAsync;
await Connect(client); await Connect(client);
client.Disconnected += async (ex) => await Connect(client); //client.Disconnected += async (ex) => await Connect(client);
await services.GetRequiredService<CommandHandlingService>().InitializeAsync(); await services.GetRequiredService<CommandHandlingService>().InitializeAsync();