Apply suggestion to src/commands/djs.ts
parent
721262f7d3
commit
5225a2bda2
|
@ -25,10 +25,9 @@ export default class DJS extends Command {
|
||||||
return this.client.util.handleError(err, message, this);
|
return this.client.util.handleError(err, message, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data }: AxiosResponse<EmbedOptions> = res;
|
if (!res.data) return this.error(message.channel, 'Could not find information. Try something else.');
|
||||||
if (!data) return this.error(message.channel, 'Could not find information. Try something else.');
|
|
||||||
|
|
||||||
const embed = new RichEmbed(data);
|
const embed = new RichEmbed(res.data);
|
||||||
embed.setFooter(this.client.user.username, this.client.user.avatarURL);
|
embed.setFooter(this.client.user.username, this.client.user.avatarURL);
|
||||||
embed.setTimestamp();
|
embed.setTimestamp();
|
||||||
return message.channel.createMessage({ embed });
|
return message.channel.createMessage({ embed });
|
||||||
|
|
Loading…
Reference in New Issue