Made algorithm to search chat commands