init wiki
This commit is contained in:
parent
bbe47ce309
commit
55d79bda90
17
config.js
17
config.js
@ -31,14 +31,17 @@ module.exports = function(){
|
||||
|
||||
return dic(message.text_arg).then(res=>{
|
||||
let txt = `*Definitions of ${res.word}:*\n\n`;
|
||||
|
||||
for(let r of res.definitions){
|
||||
let t = r.speech!=''?r.speech:"Other"
|
||||
txt+= `*${t}:*\n`;
|
||||
for(let l of r.lines){
|
||||
txt+= `${l.define}\n\n`;
|
||||
if(res.definitions.length ==0){
|
||||
txt+= "_No definition found_";
|
||||
}else{
|
||||
for(let r of res.definitions){
|
||||
let t = r.speech!=''?r.speech:"Other"
|
||||
txt+= `*${t}:*\n`;
|
||||
for(let l of r.lines){
|
||||
txt+= `${l.define}\n\n`;
|
||||
}
|
||||
txt += `\n`;
|
||||
}
|
||||
txt += `\n`;
|
||||
}
|
||||
return event.replyWithMarkdown(txt);
|
||||
}).catch(err=>{
|
||||
|
Loading…
x
Reference in New Issue
Block a user