init wiki
This commit is contained in:
parent
abff2aab6d
commit
c44e376d9c
@ -33,7 +33,8 @@ module.exports = function(){
|
||||
let txt = `*Definitions of ${res.word}:*\n\n`;
|
||||
|
||||
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){
|
||||
txt+= ` - _${l.define}_\n\n`;
|
||||
}
|
||||
|
@ -145,3 +145,20 @@ var wiki = function () {
|
||||
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=>{
|
||||
})
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user