From 25362d12bf29acd3940ac665bd32a261fe2dd950 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 18 Oct 2018 01:00:49 +0000 Subject: [PATCH] Examples too --- commands/search/urban-dictionary.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/search/urban-dictionary.js b/commands/search/urban-dictionary.js index 8789f76e..90f4fe8a 100644 --- a/commands/search/urban-dictionary.js +++ b/commands/search/urban-dictionary.js @@ -34,10 +34,10 @@ module.exports = class UrbanDictionaryCommand extends Command { .setAuthor('Urban Dictionary', 'https://i.imgur.com/Fo0nRTe.png', 'https://www.urbandictionary.com/') .setURL(data.permalink) .setTitle(data.word) - .setDescription(shorten(data.definition.replace(/\[\]/g, ''))) + .setDescription(shorten(data.definition.replace(/\[|\]/g, ''))) .setFooter(`👍 ${formatNumber(data.thumbs_up)} 👎 ${formatNumber(data.thumbs_down)}`) .setTimestamp(new Date(data.written_on)) - .addField('❯ Example', data.example ? shorten(data.example, 1000) : 'None'); + .addField('❯ Example', data.example ? shorten(data.example.replace(/\[|\]/g, ''), 1000) : 'None'); return msg.embed(embed); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);