I'm trying to make a command what you type "!say hello" in the chat window and it will say "hello" or whatever you put after "!say" in a toast window. It isn't working . I've tried everything I can think of. Please help.
code:function OnEvent_ChatWndSendMessage(ChatWnd,Message)
{
var e = Message;
if(e.substring(0,4) == '!say')
{
var x = Message.splice(5);
MsgPlus.DisplayToast("",x);
}