I would find this more interesting to use in your example for a game or something if it wasn't forcing the $ on the beginning. Maybe have some variable to set what character(s) you want pre- or suffixed to the number? Like you could have the $12,345 by default, or you could make it use the Euro symbol, or say 12,345GP for those good ol' medieval style games.
It would also be interesting to be able to make this output WITHOUT commas. Let's say someone uses a command called !givegold Ted, which gives user Ted some amount of their gold in a game script. This snippet would allow the someone to go !givegold Ted 2k, and have it automatically give 2000 gold to Ted, instead of having to type it out.
Just some thoughts.
This is a nice idea, and I would happily give it a go (Overwhelmed with other projects though). Yawhatnever is right though, you can easily edit it for your needs, rather than adding parts that would only take up space and possibly speed! If you don't want the $ and the commas, take out: $chr(36) $+ $bytes(*,b)
The output format is by design; you're just suggesting a different script.