init wiki
This commit is contained in:
parent
bbe47ce309
commit
55d79bda90
@ -31,7 +31,9 @@ module.exports = function(){
|
||||
|
||||
return dic(message.text_arg).then(res=>{
|
||||
let txt = `*Definitions of ${res.word}:*\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`;
|
||||
@ -40,6 +42,7 @@ module.exports = function(){
|
||||
}
|
||||
txt += `\n`;
|
||||
}
|
||||
}
|
||||
return event.replyWithMarkdown(txt);
|
||||
}).catch(err=>{
|
||||
bot.error(err);
|
||||
|
Loading…
x
Reference in New Issue
Block a user