Skip to content

Commit

Permalink
chore: fix deprecation issues and CI restart
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Drla <michal.drla@outlook.com>
  • Loading branch information
mimotej committed Aug 26, 2023
1 parent 4346237 commit 93370af
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy-app/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion src/listeners/interactionListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
4 changes: 2 additions & 2 deletions src/selects/channelSelect.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
GuildMember,
ActionRowBuilder,
SelectMenuBuilder,
StringSelectMenuBuilder,
PermissionsBitField,
SelectMenuInteraction,
TextChannel,
Expand All @@ -10,7 +10,7 @@ import {

export type SelectID = {
id: string;
data: Array<ActionRowBuilder<SelectMenuBuilder>>;
data: Array<ActionRowBuilder<StringSelectMenuBuilder>>;
};

/**
Expand Down
12 changes: 6 additions & 6 deletions src/utils/setupSubjectChannels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ButtonBuilder,
ButtonStyle,
Guild,
SelectMenuBuilder,
StringSelectMenuBuilder,
} from 'discord.js';
import { addChannel } from '../buttons';
import { channelSelect } from '../selects';
Expand All @@ -26,7 +26,7 @@ export class SubjectChannels {
}

private static setupPlaceholder(
select: ActionRowBuilder<SelectMenuBuilder>,
select: ActionRowBuilder<StringSelectMenuBuilder>,
lastItemIndex: number
) {
const firstLabel = select.components[0].options[0].data.label;
Expand Down Expand Up @@ -90,8 +90,8 @@ export class SubjectChannels {
data: [],
};
let selectRow =
new ActionRowBuilder<SelectMenuBuilder>().addComponents(
new SelectMenuBuilder()
new ActionRowBuilder<StringSelectMenuBuilder>().addComponents(
new StringSelectMenuBuilder()
.setCustomId(
`channelSelect-${selectIndex}-${subjectGroup.id}`
)
Expand All @@ -118,8 +118,8 @@ export class SubjectChannels {
this.setupPlaceholder(selectRow, maxItemIndex);
++selectIndex;
selectRow =
new ActionRowBuilder<SelectMenuBuilder>().addComponents(
new SelectMenuBuilder()
new ActionRowBuilder<StringSelectMenuBuilder>().addComponents(
new StringSelectMenuBuilder()
.setCustomId(
`channelSelect-${selectIndex}-${subjectGroup.id}`
)
Expand Down

0 comments on commit 93370af

Please sign in to comment.