Skip to content

Commit

Permalink
fix: sentry error 2760182145, bad api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Nov 1, 2021
1 parent a8d367d commit e99cff6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@
"no-fallthrough": "off",
"no-case-declarations": "off",
"default-case": "off",
"max-classes-per-file": "off"
"max-classes-per-file": "off",
"consistent-return": "off"
}
},
"babel": {
Expand Down
8 changes: 4 additions & 4 deletions src/commands/Ondemand/Pricecheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ class PriceCheck extends Command {
return this.messageManager.statuses.FAILURE;
}

const sentMessage = await message.channel.send('', { embed: inProgressEmbed });
const sentMessage = await message.channel.send({ embeds: [inProgressEmbed] });

const result = await this.ws.pricecheck(item, { platform: ctx.platform });
if (!result[0]) {
sentMessage.edit({
embed: {
embeds: [{
title: 'Pricechecks Temporarily Disabled',
description: 'There\'s an issue with our upstream data provider. Please check back for prices later.',
},
}],
});
return this.messageManager.statuses.FAILURE;
}
const embed = new PriceCheckEmbed(this.bot, result, item);
sentMessage.edit({ embed });
sentMessage.edit({ embeds: [embed] });
return embed.color === 0xff55ff
? this.messageManager.statuses.FAILURE : this.messageManager.statuses.SUCCESS;
} catch (error) {
Expand Down

0 comments on commit e99cff6

Please sign in to comment.