local discardedPatterns = { "wts.*boost", "wtb.*boost", "selling.*boost", "wtb.*dmt", } local function simpleChatFilter(chatFrame, event, text, playerName, _, channelName, _, specialFlags, zoneChannelID, channelIndex, channelBaseName, _, lineID, guid) local textLower = text:lower() for _, pattern in pairs(discardedPatterns) do if textLower:find(pattern) then return true -- discard message end end return false end ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", simpleChatFilter) print("[|cFFFF7777SimpleChatFilter|r] Discarding|cFFCCCCCC", table.concat(discardedPatterns, " |cFFFF7777|||cFFCCCCCC "), "|r")