le async has arrived
This commit is contained in:
parent
2eba089a21
commit
7bdf41a047
27 changed files with 282 additions and 309 deletions
SharpChat/ClientCommands
|
@ -1,4 +1,4 @@
|
|||
using System.Globalization;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace SharpChat.ClientCommands {
|
||||
|
@ -11,7 +11,7 @@ namespace SharpChat.ClientCommands {
|
|||
return ctx.NameEquals("afk");
|
||||
}
|
||||
|
||||
public void Dispatch(ClientCommandContext ctx) {
|
||||
public async Task Dispatch(ClientCommandContext ctx) {
|
||||
string? statusText = ctx.Args.FirstOrDefault();
|
||||
if(string.IsNullOrWhiteSpace(statusText))
|
||||
statusText = DEFAULT;
|
||||
|
@ -24,7 +24,7 @@ namespace SharpChat.ClientCommands {
|
|||
statusText = sti.SubstringByTextElements(0, Math.Min(sti.LengthInTextElements, MAX_GRAPHEMES)).Trim();
|
||||
}
|
||||
|
||||
ctx.Chat.UpdateUser(
|
||||
await ctx.Chat.UpdateUser(
|
||||
ctx.User,
|
||||
status: UserStatus.Away,
|
||||
statusText: statusText
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue