Add dropdown to /inventory command for quick navigation (#365)
- Add ability to handle dropdown menus with the bot - Add a dropdown to the inventoryhelper - Add handler for the dropdown to navigate to that page #344 Reviewed-on: #365 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
5ebc5ff27c
commit
1762b525b2
11 changed files with 146 additions and 7 deletions
|
@ -11,7 +11,7 @@ export default class Inventory extends ButtonEvent {
|
|||
const page = interaction.customId.split(" ")[2];
|
||||
|
||||
AppLogger.LogSilly("Button/Inventory", `Parameters: userid=${userid}, page=${page}`);
|
||||
|
||||
|
||||
await interaction.deferUpdate();
|
||||
|
||||
const member = interaction.guild.members.cache.find(x => x.id == userid) || await interaction.guild.members.fetch(userid);
|
||||
|
@ -34,7 +34,7 @@ export default class Inventory extends ButtonEvent {
|
|||
await interaction.editReply({
|
||||
files: [ embed.image ],
|
||||
embeds: [ embed.embed ],
|
||||
components: [ embed.row ],
|
||||
components: [ embed.row1, embed.row2 ],
|
||||
});
|
||||
} catch (e) {
|
||||
AppLogger.LogError("Button/Inventory", `Error generating inventory page for ${member.user.username} with id ${member.user.id}: ${e}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue