AthenaRebel
AthenaRebel
DIAdiscord.js - Imagine an app
Created by AthenaRebel on 2/1/2024 in #djs-questions
Thread Question
Hmm ok thank you 5praydge
4 replies
DIAdiscord.js - Imagine an app
Created by AthenaRebel on 2/1/2024 in #djs-questions
How would I go about getting the currently applied tags in a Forums channel?
Oh ok
5 replies
DIAdiscord.js - Imagine an app
Created by AthenaRebel on 12/29/2023 in #djs-questions
Modal not responding
Am I able to add tags to a forum channel via the bot? I am not seeing it anywhere in Discord API or DJS docs but I could just be blind
12 replies
DIAdiscord.js - Imagine an app
Created by AthenaRebel on 12/29/2023 in #djs-questions
Modal not responding
I havent touched djs since 12 so I am slowly learning
12 replies
DIAdiscord.js - Imagine an app
Created by AthenaRebel on 12/29/2023 in #djs-questions
Modal not responding
Ok using collectors fixed this 😭 thanks
12 replies
DIAdiscord.js - Imagine an app
Created by AthenaRebel on 12/29/2023 in #djs-questions
Modal not responding
const { SlashCommandBuilder, ModalBuilder, TextInputBuilder, TextInputStyle, ActionRowBuilder} = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('modaltest')
.setDescription('Displays a modal and replies with the modal input'),
async execute(interaction) {
console.log(`The /modaltest command was used by ${interaction.user.tag}.`);
const modal = new ModalBuilder()
.setCustomId('testModal')
.setTitle('Test Modal');
const textInput = new TextInputBuilder()
.setCustomId('textInput')
.setLabel('Enter some text')
.setStyle(TextInputStyle.Short)
.setPlaceholder('Type here...')
.setRequired(true);
modal.addComponents(new ActionRowBuilder().addComponents(textInput));
await interaction.showModal(modal);
},
async handleModalSubmit(interaction) {
console.log(`Modal submitted by ${interaction.user.tag}.`);
const userInput = interaction.fields.getTextInputValue('textInput');
await interaction.reply({ content: `You entered: ${userInput}`, ephemeral: true });
}
};
const { SlashCommandBuilder, ModalBuilder, TextInputBuilder, TextInputStyle, ActionRowBuilder} = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('modaltest')
.setDescription('Displays a modal and replies with the modal input'),
async execute(interaction) {
console.log(`The /modaltest command was used by ${interaction.user.tag}.`);
const modal = new ModalBuilder()
.setCustomId('testModal')
.setTitle('Test Modal');
const textInput = new TextInputBuilder()
.setCustomId('textInput')
.setLabel('Enter some text')
.setStyle(TextInputStyle.Short)
.setPlaceholder('Type here...')
.setRequired(true);
modal.addComponents(new ActionRowBuilder().addComponents(textInput));
await interaction.showModal(modal);
},
async handleModalSubmit(interaction) {
console.log(`Modal submitted by ${interaction.user.tag}.`);
const userInput = interaction.fields.getTextInputValue('textInput');
await interaction.reply({ content: `You entered: ${userInput}`, ephemeral: true });
}
};
12 replies
DIAdiscord.js - Imagine an app
Created by AthenaRebel on 12/29/2023 in #djs-questions
Modal not responding
I have it set to log when it runs at all and its detecting the command running but its not detecting a submission because everytime I try it returns that error in discord
12 replies
DIAdiscord.js - Imagine an app
Created by AthenaRebel on 12/28/2023 in #djs-questions
TypeError: Modal is not a constructor
5praydge
6 replies
DIAdiscord.js - Imagine an app
Created by AthenaRebel on 12/28/2023 in #djs-questions
TypeError: Modal is not a constructor
Oh ok
6 replies