add /chat command

This commit is contained in:
Davran Dilshat 2021-09-05 18:16:57 +01:00
parent 7c60c6a733
commit 59ca69e41f

View File

@ -256,8 +256,21 @@ namespace osu.Game.Online.Chat
JoinChannel(channel);
break;
case "chat":
if (string.IsNullOrWhiteSpace(content))
{
target.AddNewMessages(new ErrorMessage("Usage: /chat [user]"));
break;
}
var request = new GetUserRequest(content);
request.Success += OpenPrivateChannel;
request.Failure += _ => target.AddNewMessages(new ErrorMessage("User not found."));
api.Queue(request);
break;
case "help":
target.AddNewMessages(new InfoMessage("Supported commands: /help, /me [action], /join [channel], /np"));
target.AddNewMessages(new InfoMessage("Supported commands: /help, /me [action], /join [channel], /chat [user], /np"));
break;
default: