Polish processising of interactions
This commit is contained in:
parent
4c853ae503
commit
8fee5df53e
4 changed files with 25 additions and 10 deletions
7
index.js
7
index.js
|
@ -13,11 +13,16 @@ client.once('ready', () => {
|
|||
|
||||
client.on('interactionCreate', async interaction => {
|
||||
if (!interaction.isCommand()) return;
|
||||
console.log(interaction.commandName);
|
||||
|
||||
let commandName = interaction.commandName;
|
||||
|
||||
if (commandName === "generate") {
|
||||
await interaction.reply(`Generating ${interaction.options.getString('type')}`);
|
||||
if (interaction.options.getSubcommand() === "host") {
|
||||
let rating = interaction.options.getNumber("rating");
|
||||
let type = interaction.options.getString("type") ?? "foundation";
|
||||
await interaction.reply({files: ["./france-in-pictures-beautiful-places-to-photograph-eiffel-tower.jpg"]});
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue