mirror of
				https://github.com/reality/dbot.git
				synced 2025-11-04 01:47:28 +01:00 
			
		
		
		
	fix youtube
This commit is contained in:
		
							parent
							
								
									a1a292846d
								
							
						
					
					
						commit
						879bbf63b5
					
				@ -48,6 +48,12 @@ var youtube = function(dbot) {
 | 
			
		||||
                    'json': true
 | 
			
		||||
                }, function(error, response, body) {
 | 
			
		||||
                    if(_.isObject(body) && _.has(body, 'entry')) {
 | 
			
		||||
                        if(!_.has(v, 'yt$rating')) {
 | 
			
		||||
                            v['yt$rating'] = {
 | 
			
		||||
                                'numLikes': 0,
 | 
			
		||||
                                'numDislikes': 0
 | 
			
		||||
                            };
 | 
			
		||||
                        }
 | 
			
		||||
                        var v = body.entry;
 | 
			
		||||
                        event.reply(dbot.t('yt_video', {
 | 
			
		||||
                            'title': v.title['$t'],
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user