Skip to content

Commit

Permalink
Merge pull request #18 from CuteDog5695/main
Browse files Browse the repository at this point in the history
Modifying a couple stuff to the bot since we now support 1 letter subdomains
  • Loading branch information
wdhdev authored Jul 29, 2024
2 parents f36105d + 85c01b6 commit a4b8e6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions commands/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ module.exports = {
.toLowerCase();
// get the guild id from the interaction


if (subdomain.length < 2 || subdomain.length > 64) {
if (subdomain.length < 1 || subdomain.length > 100) {
const sadEmbed = new EmbedBuilder()
.setDescription("The subdomain length must be between 2 and 64 characters.")
.setDescription("The subdomain length must be between 1 and 100 characters.")
.setColor("#0096ff");
return await interaction.reply({ embeds: [sadEmbed] });
}
}

try {
const response = await fetch(
`https://api.github.com/repos/is-a-dev/register/contents/domains/${subdomain}.json`,
Expand Down
4 changes: 2 additions & 2 deletions events/buttons/registerDomain.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module.exports = async function (interaction) {
const domainCheck = new TextInputBuilder()
.setCustomId('DomainCheck')
.setPlaceholder('Enter a subdomain')
.setMinLength(2)
.setMaxLength(64)
.setMinLength(1)
.setMaxLength(100)
.setRequired(true)
.setLabel('Enter the subdomain you want to register')
.setStyle("Short");
Expand Down

0 comments on commit a4b8e6b

Please sign in to comment.