The simple answer is you cannot block a raid in the coin master, but you can use a strategy in which you have to build your whole village at once to avoid loss for the Raids.