Add image grid to the series view command (#294)
- Add the image grid to the series view command - Moved the image generation logic to its own class so we can have common logic between them - Fixed a bug where paginated commands that deferred (series view, inventory) were creating new messages, rather than updating #279 Reviewed-on: #294 Reviewed-by: VylpesTester <tester@vylpes.com> Co-authored-by: Ethan Lane <ethan@vylpes.com> Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
parent
1b9857dfe5
commit
acfdcb17f2
6 changed files with 72 additions and 51 deletions
|
@ -31,7 +31,7 @@ export default class Inventory extends ButtonEvent {
|
|||
return;
|
||||
}
|
||||
|
||||
await interaction.followUp({
|
||||
await interaction.editReply({
|
||||
files: [ embed.image ],
|
||||
embeds: [ embed.embed ],
|
||||
components: [ embed.row ],
|
||||
|
|
|
@ -24,11 +24,14 @@ export default class Series extends ButtonEvent {
|
|||
const seriesid = interaction.customId.split(" ")[2];
|
||||
const page = interaction.customId.split(" ")[3];
|
||||
|
||||
const embed = SeriesHelper.GenerateSeriesViewPage(Number(seriesid), Number(page));
|
||||
await interaction.deferUpdate();
|
||||
|
||||
await interaction.update({
|
||||
const embed = await SeriesHelper.GenerateSeriesViewPage(Number(seriesid), Number(page));
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [ embed!.embed ],
|
||||
components: [ embed!.row ],
|
||||
files: [ embed!.image ],
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -42,4 +45,4 @@ export default class Series extends ButtonEvent {
|
|||
components: [ embed!.row ],
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue