For the 1 unknown command, I suggest you look elsewhere, as there's nothing in that script that would produce that error. Check the exact message that comes up, as it's an unknown command error, it should indicate what script and line it's coming from.

Regarding the bold & green highlighting, you'd have to pull those words out of the results that are returned, then put in the bold & green highlighting before displaying the information to the channel.