missing return
This commit is contained in:
parent
42b8c30fcb
commit
5170362e7d
@ -13,9 +13,9 @@ module.exports = bot => {
|
||||
|
||||
rp(`${url}?term=${term}`, { json: true }).then(data => {
|
||||
if(data.result_type === "no_results")
|
||||
e.reply("Term not found");
|
||||
return e.reply("Term not found");
|
||||
if(!data.list[index-1])
|
||||
e.reply("Index not found");
|
||||
return e.reply("Index not found");
|
||||
const res = data.list[index-1];
|
||||
|
||||
e.reply(`[${index}/${data.list.length}] [b]${res.word}[/b]: ${res.definition.replace(/\r\n/g, "")} - ${res.example.replace(/\r\n/g, "")}`);
|
||||
|
Loading…
Reference in New Issue
Block a user