Assuming that you didn't get the phone wet, blow out the charging port. Use canned air or a very light stream of air from a compressor with a dryer on it. (Don't use straight compressed air - that's filled with an oil mist.)
If you did get the phone wet, bring it into a repair shop and see if it pays to have it repaired. (If the motherboard has already started to rot, there's nothing that can be reused except the case, and a new G6 would be far cheaper.)