It uses fuzzysearch for the image search, fuzzysearch source here. From previous comments from @wander, the bot verifies the artist by e6, if no artist is listed or not posted to e6, the bot amends the message to indicate the link might be the commissioner.
What's funny is that i ran this image through Nightshade to protect it against AI, whereas i posted to FA and E926 before AI was as big so that older version is clean. Apparently the bot doesn't get confused between the two versions which is great.