Skip to content

Commit

Permalink
fix: allow 2 letter subdomains
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev authored Oct 15, 2023
1 parent 5e646fd commit 42e73c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/activate.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
}


if (subdomain.length <= 2 || subdomain.length > 64) return await interaction.reply("The subdomain length must be between 3 and 64 characters.");
if (subdomain.length < 2 || subdomain.length > 64) return await interaction.reply("The subdomain length must be between 2 and 64 characters.");

try {
const response = await fetch(`https://hosts.is-a.dev/api/activate?domain=${subdomain}&NOTIFY_TOKEN=${process.env.WEBHOST_TOKEN}`, {
Expand Down
2 changes: 1 addition & 1 deletion commands/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
if (!guild) return await interaction.reply({ content: "This guild is not registered with Domain Register Bot. Please contact the guild owner to register.", ephemeral: true });


if (subdomain.length <= 2 || subdomain.length > 64) return await interaction.reply("The subdomain length must be between 3 and 64 characters.");
if (subdomain.length < 2 || subdomain.length > 64) return await interaction.reply("The subdomain length must be between 2 and 64 characters.");

try {
const response = await fetch(`https://api.github.com/repos/is-a-dev/register/contents/domains/${subdomain}.json`, {
Expand Down

0 comments on commit 42e73c9

Please sign in to comment.