stuff
This commit is contained in:
parent
c0f7c8cc1d
commit
9be2ffc54a
@ -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!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user