Skip to content

Commit

Permalink
fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
brokiem committed Nov 12, 2022
1 parent 5976c41 commit ac396d8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions commands/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ export async function run(dsclient, interaction) {
const port = interaction.options.get("port")['value']
const version = interaction.options.get("version")

if (version === null) version['value'] = null

if (!sup_versions.includes(version['value'])) {
interaction.reply({
embeds: [makeEmbed(settings + " Supported versions: " + sup_versions.join(", "))],
allowedMentions: {repliedUser: false}
})
return
if (version !== null) {
if (!sup_versions.includes(version['value'])) {
interaction.reply({
embeds: [makeEmbed(settings + " Supported versions: " + sup_versions.join(", "))],
allowedMentions: {repliedUser: false}
})
return
}
}

connect(interaction, address, isNaN(port) ? 19132 : port, version['value'] ?? "auto")
connect(interaction, address, isNaN(port) ? 19132 : port, version === null ? "auto" : version['value'])
}

export function getName() {
Expand Down

0 comments on commit ac396d8

Please sign in to comment.