Add error handler to series view command
This commit is contained in:
parent
211ef74410
commit
1796f2519e
1 changed files with 11 additions and 6 deletions
|
@ -60,13 +60,18 @@ export default class Series extends Command {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed = await SeriesHelper.GenerateSeriesViewPage(series.id, 0, interaction.user.id);
|
try {
|
||||||
|
const embed = await SeriesHelper.GenerateSeriesViewPage(series.id, 0, interaction.user.id);
|
||||||
|
|
||||||
await interaction.followUp({
|
await interaction.followUp({
|
||||||
embeds: [ embed!.embed ],
|
embeds: [ embed!.embed ],
|
||||||
components: [ embed!.row ],
|
components: [ embed!.row ],
|
||||||
files: [ embed!.image ],
|
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) {
|
private async ListSeries(interaction: CommandInteraction) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue