How about check if the incoming message is actually the command you're listening for?
Also fixes the false triggers I pointed out at least twice.
Code:
local incomingMessage, senderName = ...
if not incomingMessage:find(("^%s%%s"):format(L[db.trigger]:gsub("(%W)", "%%%1"))) then return end