Skip to content

Commit

Permalink
components: fix select menus
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcarreon123 committed Feb 20, 2024
1 parent 5382644 commit 6970da4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ for (const file of buttonFiles) {

// Load select menus
logger.info("Loading select menus");
client.buttons = new Map();
client.selectMenus = new Map();
const selectMenusPath = path.join(import.meta.dir, "./components/selectmenus");
const selectMenuFiles = fs
.readdirSync(buttonsPath)
.readdirSync(selectMenusPath)
.filter((file: string) => file.endsWith(".ts"));

for (const file of buttonFiles) {
for (const file of selectMenusPath) {
const selectMenu = require(`${selectMenusPath}/${file}`);
client.selectMenus.set(selectMenu.data.customId, selectMenu);
}
Expand Down

0 comments on commit 6970da4

Please sign in to comment.