Defending against a stronger opponent
If they are a lot bigger than you, Bubble up and wait it out.
If they are distracted and you have the troops, try to see if they are burning castles or sending probes (a troop that doesn't return). If they are sending out most of their forces, many times, you can send in your army and take everything they stole. Just be sure to notice the castle levels and scout. Tier 2 troops don't do well against Tier 3 traps and soldiers.
If you don't care about your castle walls, there is always the Gnat Attack to annoy them.
Shelter all but a handful of your lowest level troops (having a small group of Tier 1s is the cheapest).
Send them 1 troop at a time as fast as you can.
if they attack you, send your troops to the closest resource tile, then recall them after the attack is over to resume.
Adding scouts to keep your gold near 0 also helps to clutter their message feed so they have to try to find their own scouting reports and battle results.
Combining the Gnat Attack with a Backdoor Attack confuses the enemy, so they aren't certain what to do, and many times will leave them without the proper defense or offense to handle what is coming.
The goal is to make it more expensive or frustrating to "mine rss" from the guild than what they gain.
Always check who else is around. If they are farming over their heads, a rally might work, but it's always best to find the largest online person to start it so that we can send the most troops.