The Power of const

This commit is contained in:
Daniel Odendahl Jr
2017-04-03 22:31:19 +00:00
parent 4f0f1b4ad2
commit 76907549df
87 changed files with 525 additions and 558 deletions
+3 -3
View File
@@ -28,14 +28,14 @@ module.exports = class UrbanDictionary extends commando.Command {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log(`[Command] ${message.content}`);
let wordToDefine = args.word;
const wordToDefine = args.word;
try {
let response = await request
const response = await request
.get('http://api.urbandictionary.com/v0/define')
.query({
term: wordToDefine
});
let data = response.body.list[0];
const data = response.body.list[0];
const embed = new Discord.RichEmbed()
.setColor(0x32a8f0)
.setAuthor('Urban Dictionary', 'http://a1.mzstatic.com/eu/r30/Purple71/v4/66/54/68/6654683f-cacd-4a55-1784-f14257f77874/icon175x175.png')