Compare commits

..

5 commits

Author SHA1 Message Date
812e36329c Disable error for series helper temporarily
All checks were successful
Deploy To Production / build (push) Successful in 30s
Deploy To Production / deploy (push) Successful in 17s
2025-04-25 09:14:30 +01:00
c4e345cc46 Fix linting
All checks were successful
Deploy To Production / build (push) Successful in 27s
Deploy To Production / deploy (push) Successful in 16s
2025-04-23 10:41:20 +01:00
659906e562 Add catch to image grid generator
Some checks failed
Deploy To Production / build (push) Failing after 20s
Deploy To Production / deploy (push) Has been skipped
2025-04-23 10:40:06 +01:00
1796f2519e Add error handler to series view command
All checks were successful
Deploy To Production / build (push) Successful in 28s
Deploy To Production / deploy (push) Successful in 16s
2025-04-22 16:12:04 +01:00
211ef74410 v0.8.4
All checks were successful
Deploy To Production / build (push) Successful in 34s
Deploy To Production / deploy (push) Successful in 17s
2025-04-22 15:21:19 +01:00
3 changed files with 51 additions and 40 deletions

View file

@ -1,6 +1,6 @@
{
"name": "card-drop",
"version": "0.8.3",
"version": "0.8.4",
"main": "./dist/bot.js",
"typings": "./dist",
"scripts": {

View file

@ -60,6 +60,7 @@ export default class Series extends Command {
return;
}
try {
const embed = await SeriesHelper.GenerateSeriesViewPage(series.id, 0, interaction.user.id);
await interaction.followUp({
@ -67,6 +68,10 @@ export default class Series extends Command {
components: [ embed!.row ],
files: [ embed!.image ],
});
} catch (e) {
await interaction.followUp("An error has occured generating the series grid.");
AppLogger.CatchError("Series", e);
}
}
private async ListSeries(interaction: CommandInteraction) {

View file

@ -26,6 +26,7 @@ export default class ImageHelper {
const ctx = canvas.getContext("2d");
for (let i = 0; i < cards.length; i++) {
try {
const card = cards[i];
const filePath = path.join(process.env.DATA_DIR!, "cards", card.path);
@ -67,6 +68,11 @@ export default class ImageHelper {
ctx.drawImage(image, imageX, imageY);
}
catch (e) {
// TODO: Enable once we've investigated a fix
//AppLogger.CatchError("ImageHelper", e);
}
}
return canvas.toBuffer();
}