There are already good custom HTML elements for viewing glTF files, a much more expressive 3D standard that STL, which does not even have color, and probably will never have. Look at Google's model-viewer. You don't have to build your preview from scratch!
Your bot should support glTF and glB files first, with automatic STL conversion supported as a special case.