public override Task Run(string commandArgument, SocketMessage message) { if (commandArgument == Usage && message.Author.Username == Parent) { Environment.Exit(0); return(Task.CompletedTask); } else { return(message.Channel.SendMessageAsync( MockCommand.GenerateMockMessage( message.Author.Username, "Spongebot", message.Content.TrimStart('>')))); } }
public override async Task Run(string commandArgument, SocketMessage message) { string[] split = commandArgument.Split(new char[] { ':' }, 2); if (split.Length == 1) { await message.Channel.SendMessageAsync( MockCommand.GenerateMockMessage("Someone", message.Author.Username, split[0])); } else { await message.Channel.SendMessageAsync( MockCommand.GenerateMockMessage(split[0], message.Author.Username, split[1].TrimStart())); } }