From bbe47ce30927f8f0fe0ea90e800115294e988fa0 Mon Sep 17 00:00:00 2001 From: Cedric Hoelzl Date: Tue, 15 Oct 2019 21:56:47 +0200 Subject: [PATCH] init wiki --- config.js | 2 +- wiktionary.js | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/config.js b/config.js index 02f0306..34171dc 100644 --- a/config.js +++ b/config.js @@ -36,7 +36,7 @@ module.exports = function(){ let t = r.speech!=''?r.speech:"Other" txt+= `*${t}:*\n`; for(let l of r.lines){ - txt+= ` - _${l.define}_\n\n`; + txt+= `${l.define}\n\n`; } txt += `\n`; } diff --git a/wiktionary.js b/wiktionary.js index c40610f..3c74ed0 100644 --- a/wiktionary.js +++ b/wiktionary.js @@ -145,20 +145,3 @@ 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=>{ - }) - -