diff --git a/.github/actions/deploy-app/action.yaml b/.github/actions/deploy-app/action.yaml index 1376f9a..735d4e8 100644 --- a/.github/actions/deploy-app/action.yaml +++ b/.github/actions/deploy-app/action.yaml @@ -23,4 +23,4 @@ runs: mkdir ~/.ssh echo $KNOWN_HOSTS >> ~/.ssh/known_hosts echo "Connect to VM and start app..." - ssh -i ~/vm_key.key $ADDRESS_VM "cd /app && docker pull mimotej/oqix:latest &&" 'docker kill $(sudo docker ps -a -q); docker rm $(docker ps --filter status=exited -q);' "docker run -d -e DISCORD_TOKEN=$DISCORD_TOKEN -e CLIENT_ID=$CLIENT_ID -e GUILD_ID=$GUILD_ID -it --mount type=bind,source=/app/userLog.json,target=/root/userLog.json --mount type=bind,source=/app/config.json,target=/root/config.json mimotej/oqix:latest" + ssh -i ~/vm_key.key $ADDRESS_VM "cd /app && docker pull mimotej/oqix:latest &&" 'docker kill $(sudo docker ps -a -q); docker rm $(docker ps --filter status=exited -q);' "docker run -d --restart unless-stopped -e DISCORD_TOKEN=$DISCORD_TOKEN -e CLIENT_ID=$CLIENT_ID -e GUILD_ID=$GUILD_ID -it --mount type=bind,source=/app/userLog.json,target=/root/userLog.json --mount type=bind,source=/app/config.json,target=/root/config.json mimotej/oqix:latest" diff --git a/src/listeners/interactionListener.ts b/src/listeners/interactionListener.ts index 2abfe8a..9eb0377 100644 --- a/src/listeners/interactionListener.ts +++ b/src/listeners/interactionListener.ts @@ -20,7 +20,7 @@ export default (client: Client) => { } else if (interaction.isButton()) { const customId = parseCustomId(interaction.customId); await buttons[customId].execute(interaction); - } else if (interaction.isSelectMenu()) { + } else if (interaction.isStringSelectMenu()) { const customId = parseCustomId(interaction.customId); await selects[customId].execute(interaction); } else if (interaction.isModalSubmit()) { diff --git a/src/selects/channelSelect.ts b/src/selects/channelSelect.ts index 2e67f7b..8c622b7 100644 --- a/src/selects/channelSelect.ts +++ b/src/selects/channelSelect.ts @@ -1,7 +1,7 @@ import { GuildMember, ActionRowBuilder, - SelectMenuBuilder, + StringSelectMenuBuilder, PermissionsBitField, SelectMenuInteraction, TextChannel, @@ -10,7 +10,7 @@ import { export type SelectID = { id: string; - data: Array>; + data: Array>; }; /** diff --git a/src/utils/setupSubjectChannels.ts b/src/utils/setupSubjectChannels.ts index 4895e2b..dcf12b6 100644 --- a/src/utils/setupSubjectChannels.ts +++ b/src/utils/setupSubjectChannels.ts @@ -3,7 +3,7 @@ import { ButtonBuilder, ButtonStyle, Guild, - SelectMenuBuilder, + StringSelectMenuBuilder, } from 'discord.js'; import { addChannel } from '../buttons'; import { channelSelect } from '../selects'; @@ -26,7 +26,7 @@ export class SubjectChannels { } private static setupPlaceholder( - select: ActionRowBuilder, + select: ActionRowBuilder, lastItemIndex: number ) { const firstLabel = select.components[0].options[0].data.label; @@ -90,8 +90,8 @@ export class SubjectChannels { data: [], }; let selectRow = - new ActionRowBuilder().addComponents( - new SelectMenuBuilder() + new ActionRowBuilder().addComponents( + new StringSelectMenuBuilder() .setCustomId( `channelSelect-${selectIndex}-${subjectGroup.id}` ) @@ -118,8 +118,8 @@ export class SubjectChannels { this.setupPlaceholder(selectRow, maxItemIndex); ++selectIndex; selectRow = - new ActionRowBuilder().addComponents( - new SelectMenuBuilder() + new ActionRowBuilder().addComponents( + new StringSelectMenuBuilder() .setCustomId( `channelSelect-${selectIndex}-${subjectGroup.id}` )