le async has arrived

This commit is contained in:
flash 2025-04-26 22:28:41 +00:00
commit 7bdf41a047
Signed by: flash
GPG key ID: 2C9C2C574D47FE3E
27 changed files with 282 additions and 309 deletions
SharpChat/ClientCommands

View file

@ -1,4 +1,4 @@
using SharpChat.Events;
using SharpChat.Events;
namespace SharpChat.ClientCommands {
public class ActionClientCommand : ClientCommand {
@ -7,7 +7,7 @@ namespace SharpChat.ClientCommands {
|| ctx.NameEquals("me");
}
public void Dispatch(ClientCommandContext ctx) {
public async Task Dispatch(ClientCommandContext ctx) {
if(ctx.Args.Length < 1)
return;
@ -15,7 +15,7 @@ namespace SharpChat.ClientCommands {
if(string.IsNullOrWhiteSpace(actionStr))
return;
ctx.Chat.DispatchEvent(new MessageCreateEvent(
await ctx.Chat.DispatchEvent(new MessageCreateEvent(
ctx.Chat.RandomSnowflake.Next(),
ctx.Channel.Name,
ctx.User.UserId,