mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 05:54:33 +02:00
The Power of const
This commit is contained in:
@@ -24,9 +24,9 @@ module.exports = class WattpadCommand extends commando.Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let queryBook = args.book;
|
||||
const queryBook = args.book;
|
||||
try {
|
||||
let response = await request
|
||||
const response = await request
|
||||
.get('https://api.wattpad.com:443/v4/stories')
|
||||
.set({
|
||||
'Authorization': `Basic ${config.wattpadkey}`
|
||||
@@ -35,7 +35,7 @@ module.exports = class WattpadCommand extends commando.Command {
|
||||
query: queryBook,
|
||||
limit: 1
|
||||
});
|
||||
let data = response.body.stories[0];
|
||||
const data = response.body.stories[0];
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setColor(0xF89C34)
|
||||
.setAuthor('Wattpad', 'http://www.selfpubtoolbox.com/wp-content/uploads/2015/05/a6044fd3a88acd5043860484db972ca6.png')
|
||||
|
||||
Reference in New Issue
Block a user