fix empty guid in chat command

This commit is contained in:
zznty
2022-07-28 20:01:38 +07:00
parent 80b0330ad2
commit f7ec604161

View File

@@ -92,7 +92,7 @@ public class ChatController : WebApiController, IChatController
var argsList = Regex.Matches(argText, "(\"[^\"]+\"|\\S+)").Cast<Match>().Select(x => x.ToString().Replace("\"", "")).ToList(); var argsList = Regex.Matches(argText, "(\"[^\"]+\"|\\S+)").Cast<Match>().Select(x => x.ToString().Replace("\"", "")).ToList();
var id = new Guid(); var id = Guid.NewGuid();
var context = new WebSocketCommandContext(Statics.Torch, command.Plugin, argText, argsList, Statics.ChatModule, id); var context = new WebSocketCommandContext(Statics.Torch, command.Plugin, argText, argsList, Statics.ChatModule, id);
if (await Statics.Torch.InvokeAsync(() => command.TryInvoke(context))) if (await Statics.Torch.InvokeAsync(() => command.TryInvoke(context)))