Apply suggestion to src/commands/djs.ts

merge-requests/12/head
Bsian 2020-05-19 17:48:40 -04:00
parent 721262f7d3
commit 5225a2bda2
1 changed files with 2 additions and 3 deletions

View File

@ -25,10 +25,9 @@ export default class DJS extends Command {
return this.client.util.handleError(err, message, this);
}
const { data }: AxiosResponse<EmbedOptions> = res;
if (!data) return this.error(message.channel, 'Could not find information. Try something else.');
if (!res.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.setTimestamp();
return message.channel.createMessage({ embed });