mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 02:15:10 +02:00
The Power of const
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user