async function guild( id, language ) {
	
	try {

		/** Get player from cache */
		let player = await this.player(id, language);
		
        let expiredDate = new Date();
	        expiredDate.setHours(expiredDate.getHours() - guildCooldown);

		let guild  = await cache.get('swapi', 'guilds', {name:player.guildName, updated:{ $gte:expiredDate.getTime() }});

		/** Check if existance and expiration */
		if( !guild || !guild[0] ) { 
		
			/** If not found or expired, fetch new from API and save to cache */
			guild = await swgoh.fetchGuild({ allycode:player.allyCode, language:language, enums:true });
			guild = await cache.put('swapi', 'guilds', {name:guild.name}, guild);
			
		} else {
			/** If found and valid, serve from cache */
			guild = guild[0];
		}
		
		return guild;
		
	} catch(e) { 
		throw e; 
	}    		

}
/**
 *  Fetch guild profile object from cache, and sync if necessary
 *  ! This will only fetch a single allycode 
 * 
 *  Params
 *  @id - allycode or discordId (! discord Id requires patreon-tier api user)
 *  @language - language code for reply
 */
Fetch guild profile object from cache, and sync if necessary
! This will only fetch a single allycode

Params
@id - allycode or discordId (. discord Id requires patreon-tier api user)
@language - language code for reply
Fetch guild profile object from cache and sync if necessary ! This will only fetch a single allycode Params @id - allycode or discordId ( . discord Id requires patreon - tier api user ) @language - language code for reply
async function guild( id, language ) {
	try {
		let player = await this.player(id, language);
        let expiredDate = new Date();
	        expiredDate.setHours(expiredDate.getHours() - guildCooldown);
		let guild  = await cache.get('swapi', 'guilds', {name:player.guildName, updated:{ $gte:expiredDate.getTime() }});
		if( !guild || !guild[0] ) { 
			guild = await swgoh.fetchGuild({ allycode:player.allyCode, language:language, enums:true });
			guild = await cache.put('swapi', 'guilds', {name:guild.name}, guild);
		} else {
			guild = guild[0];
		}
		return guild;
	} catch(e) { 
		throw e; 
	}    		
}
async function guild ( id , language ) { try { let player = await this . player ( id , language ) ; let expiredDate = new Date ( ) ; expiredDate . setHours ( expiredDate . getHours ( ) - guildCooldown ) ; let guild = await cache . get ( 'swapi' , 'guilds' , { name : player . guildName , updated : { $gte : expiredDate . getTime ( ) } } ) ; if ( ! guild || ! guild [ 0 ] ) { guild = await swgoh . fetchGuild ( { allycode : player . allyCode , language : language , enums : true } ) ; guild = await cache . put ( 'swapi' , 'guilds' , { name : guild . name } , guild ) ; } else { guild = guild [ 0 ] ; } return guild ; } catch ( e ) { throw e ; } }
Fetch guild profile object from cache, and sync if necessary
  !
Fetch guild profile object from cache and sync if necessary !
/** Get player from cache */ /** Check if existance and expiration */ /** If not found or expired, fetch new from API and save to cache */ /** If found and valid, serve from cache */