Skip to content

Commit

Permalink
Fix some deprecated APIs and explicitly update SemVer minor of discor…
Browse files Browse the repository at this point in the history
…d.js
  • Loading branch information
PopFlamingo committed Apr 6, 2023
1 parent 01a2176 commit 69138bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions commands/CommandStationRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
CacheType,
Message,
ActionRowBuilder,
SelectMenuBuilder,
StringSelectMenuBuilder,
ComponentType,
} from "discord.js";
import { BotServices } from "../BotServices";
Expand Down Expand Up @@ -94,8 +94,8 @@ export default class CommandStationRequest implements CommandDescriptor {
return { label: name, value: `${index}` };
});

const row = new ActionRowBuilder<SelectMenuBuilder>().addComponents(
new SelectMenuBuilder()
const row = new ActionRowBuilder<StringSelectMenuBuilder>().addComponents(
new StringSelectMenuBuilder()
.setCustomId("station_choice")
.setPlaceholder("Choix de la station")
.addOptions(options)
Expand Down Expand Up @@ -162,7 +162,7 @@ export default class CommandStationRequest implements CommandDescriptor {

try {
await componentInteraction.deferUpdate();
if (!componentInteraction.isSelectMenu()) {
if (!componentInteraction.isStringSelectMenu()) {
throw new Error("COMPONENT_NOT_SELECT_MENU");
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"axios": "^0.21.1",
"axios-cache-adapter": "^2.7.3",
"csv-parser": "^3.0.0",
"discord.js": "^14.3.0",
"discord.js": "^14.9.0",
"dotenv": "^10.0.0",
"fuse.js": "^6.4.6",
"reflect-metadata": "^0.1.13",
Expand Down

0 comments on commit 69138bb

Please sign in to comment.