initial commit

This commit is contained in:
Aiden
2022-10-07 14:31:30 +02:00
parent b8b1aee4e6
commit f06f277329
18 changed files with 2606 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
// const { Chart } = require("chart.js");
const wait = require('util').promisify(setTimeout);
module.exports = {
name: "dbg",
slashcommand:
new SlashCommandBuilder()
.setName("dbg")
.setDescription("This command is for debugging purposes only, only the dev can issue the command"),
slashcommandGlobal:false,
async function(interactionObject) {
// interactionObject.deferReply()
var modal = new Modal()
.setCustomId("testModal")
.setTitle("Fill me uwu")
var testInput1 = new TextInputComponent()
.setCustomId("testInput")
.setLabel("Input some data into me uwu")
.setStyle("SHORT")
const firstActionRow = new MessageActionRow().addComponents(testInput1)
const secondActionRow = new MessageActionRow().addComponents(textMenu)
modal.addComponents(firstActionRow, secondActionRow)
await interactionObject.showModal(modal).then(res => {
console.log(res);
})
// Collect a modal submit interaction
const filter = (b) => b.customId === 'testModal' && b.user.id == interactionObject.user.id && b.channelid == interactionObject.channelid;
interactionObject.awaitModalSubmit({ filter, time: 30000 })
.then(i => {
// console.log(interactionObject.id)
// console.log(i.id);
i.reply(`${i.fields.getTextInputValue('testInput')}`)
})
.catch(console.error);
}
}