Skip to content

Commit

Permalink
Move message.edit
Browse files Browse the repository at this point in the history
  • Loading branch information
holzmaster committed Sep 18, 2024
1 parent 38db3c4 commit 0ed57c8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/commands/inventar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,20 +172,18 @@ export default class InventarCommand implements ApplicationCommand {
switch (i.customId) {
case "page-prev":
pageIndex = Math.max(0, pageIndex - 1);
await message.edit({
...buildMessageData(pageIndex),
});
break;
case "page-next":
pageIndex = Math.min(lastPageIndex, pageIndex + 1);
await message.edit({
...buildMessageData(pageIndex),
});
break;
default:
log.warn(`Unknown customId: "${i.customId}"`);
break;
return;
}

await message.edit({
...buildMessageData(pageIndex),
});
});

collector.on("end", async () => {
Expand Down

0 comments on commit 0ed57c8

Please sign in to comment.