Last 2023 Spring RCOS push

This commit is contained in:
ION606
2023-04-25 17:34:01 -04:00
parent 04af684e13
commit 75f263f88c
6 changed files with 125 additions and 4 deletions
+17
View File
@@ -1,11 +1,28 @@
import { interactionTypes } from '../structures/interactions/interactionTypes.js';
import { Interaction } from '../structures/types.js';
import { Modal, ModalComponent } from '../structures/interactions/Modal.js';
import { MessageActionRow } from '../structures/messages/MessageActionRow.js';
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
/** @param {Interaction} interaction */
export default async (interaction) => {
if (interaction.type == interactionTypes.ApplicationCommand) {
console.log(interaction.data);
const m = new Modal(null, interaction.client);
const c = new ModalComponent();
c.custom_id = 'nonononononono';
c.label = "hi";
c.style = 1;
m.custom_id = "temp";
m.title = "TITLE HERE";
const a = new MessageActionRow();
a.addComponent(c);
m.addComponent(a);
interaction.reply(m);
return;
interaction.reply({content: "HELLO WORLD", ephemeral: true});
await delay(3000);
interaction.update({content: "NOOOOOOOOOOOOOOOOOO"});