Skip to content

Commit

Permalink
Bump -Structures
Browse files Browse the repository at this point in the history
  • Loading branch information
larsdekooter committed Nov 29, 2022
1 parent 5d7150d commit eab882e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 45 deletions.
16 changes: 8 additions & 8 deletions dc.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ rest
),
new SlashCommandBuilder()
.setName("ping")
.setDescription("Replies with Pong!")
.addStringOption((o) =>
o
.setName("string")
.setDescription("string")
.setRequired(true)
.setAutocomplete(true)
),
.setDescription("Replies with Pong!"),
// .addStringOption((o) =>
// o
// .setName("string")
// .setDescription("string")
// .setRequired(true)
// .setAutocomplete(true)
// ),
],
}
)
Expand Down
33 changes: 2 additions & 31 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,37 +266,8 @@ client.on("interactionCreate", async (interaction) => {
await interaction.reply(`Banned ${user}`);
interaction.end();
} else if (interaction.commandName === "ping") {
// Create the modal
const modal = new ModalBuilder()
.setCustomId("myModal")
.setTitle("My Modal");

// Create the text components
const animalInput = new TextInputBuilder()
.setCustomId("favoriteAnimalInput")
// The label is what the user sees for this input
.setLabel("What is your favorite animal?")
// Short means only a single line of text
.setStyle(TextInputStyle.Short);

const hobbiesInput = new TextInputBuilder()
.setCustomId("hobbiesInput")
.setLabel("What are some of your favorite hobbies?")
// Paragraph means multiple lines of text
.setStyle(TextInputStyle.Paragraph);

// An action row can only hold one input, so you need one action row per input
const firstActionRow = new ActionRowBuilder().addComponents(animalInput);
const secondActionRow = new ActionRowBuilder().addComponents(
hobbiesInput
);

// Add the inputs to the modal
modal.addComponents(firstActionRow, secondActionRow);

// Show the modal to the user
await interaction.showModal(modal);
return interaction.end();
const user = await client.users.fetch(interaction.user.id);
await interaction.reply(`${user.flags}`);
}
}
if (interaction.isAutocomplete()) {
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit eab882e

@vercel
Copy link

@vercel vercel bot commented on eab882e Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

utilbot – ./

utilbot.vercel.app
utilbot-git-master-larsdekooter.vercel.app
utilbot-larsdekooter.vercel.app

Please sign in to comment.