init wiki
This commit is contained in:
		@@ -33,7 +33,8 @@ module.exports = function(){
 | 
				
			|||||||
					let txt = `*Definitions of ${res.word}:*\n\n`;
 | 
										let txt = `*Definitions of ${res.word}:*\n\n`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					for(let r of res.definitions){
 | 
										for(let r of res.definitions){
 | 
				
			||||||
						txt+= `*${r.speech}:*\n`;
 | 
					                        let t = r.speech!=''?r.speech:"Other"
 | 
				
			||||||
 | 
											txt+= `*${t}:*\n`;
 | 
				
			||||||
						for(let l of r.lines){
 | 
											for(let l of r.lines){
 | 
				
			||||||
							txt+= ` - _${l.define}_\n\n`;
 | 
												txt+= ` - _${l.define}_\n\n`;
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -145,3 +145,20 @@ var wiki = function () {
 | 
				
			|||||||
module.exports = wiki;
 | 
					module.exports = wiki;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					return wiki('gay').then(res=>{
 | 
				
			||||||
 | 
					                    let txt = `*Definitions of ${res.word}:*\n\n`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    for(let r of res.definitions){
 | 
				
			||||||
 | 
					                        console.log(r)
 | 
				
			||||||
 | 
					                        let t = r.speech!=''?r.speech:"Other"
 | 
				
			||||||
 | 
					                        txt+= `*${r.speech}:*\n`;
 | 
				
			||||||
 | 
					                        for(let l of r.lines){
 | 
				
			||||||
 | 
					                            txt+= ` - _${l.define}_\n\n`;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                        txt += `\n`;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    console.log(txt);
 | 
				
			||||||
 | 
					                }).catch(err=>{
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user