What to do to Maintain all Types of Airsoft Guns
First when you are done using you should clean the barrel with a cleaning kit made for airs

Maintaining An Electric Airsoft Gun
To get a full charge out of your battery you should discharge the whole battery before recharging it. Also before you store your battery you should discharge the battery. Remove your battery from your airsoft gun before you store it away. Charge your battery right up til its full, then take it off. You do not want to overcharge your battery other whys you could damage it. Using an overheated battery will damage your gun. You should never fire your gun for over 6 seconds at a time. You should never change the mode of your airsoft gun while firing. Once you are done you should change the mode to semi-automatic, and fire a few more rounds. This will help decompress the gear box spring.
Maintaing An Airsoft Gas Gun
When releasing gas from your gun don't use the release valve because this will cause the O-ring to freeze, and gas will leak out your gun. You should leave enough gas in your magazine to fire one or two shots. To ensure you have a little amount of gas empty the magazine completely, and then fill it for one second. If you have a completely empty or full magazine it could damage the seal on the magazine.