Skip to content

Commit

Permalink
Update whois.js
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewstech authored Dec 7, 2023
1 parent a5d1fdd commit be5fd17
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions commands/whois.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const { SlashCommandBuilder, EmbedBuilder, ButtonBuilder, ButtonStyle, ActionRowBuilder } = require("discord.js");
const fetch = require("node-fetch");
const staff = require("../models/staff");
const Loading = require("../components/loading");
Expand Down Expand Up @@ -50,6 +50,8 @@ module.exports = {
},
);

let web = `https://manage.is-a.dev/maintainers/${domain}`

if (response.status === 404) {
const sadEmbed = new EmbedBuilder()
.setDescription(
Expand Down Expand Up @@ -133,7 +135,15 @@ module.exports = {
},
};

await interaction.editReply({ embeds: [embed], ephemeral: ephemeral });

const webButton = new ButtonBuilder()
.setStyle(ButtonStyle.LINK)
.setLabel("Manage")
.setURL(web);

const row = new ActionRowBuilder().addComponents(webButton);

await interaction.editReply({ embeds: [embed], ephemeral: ephemeral, components: [row] });
}
} catch (error) {
console.error("Error performing whois lookup:", error);
Expand Down

0 comments on commit be5fd17

Please sign in to comment.