I checked your bot and you issue was use used star[0] instead of star When your pattern has a single star wildcard then the variable is just "star" If your pattern has multiple wildcards then star becomes an array star[0], star[1], etc.