mirror of
https://github.com/ION606/custom_discordjs.git
synced 2026-05-14 22:26:54 +00:00
Last 2023 Spring RCOS push
This commit is contained in:
@@ -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"});
|
||||
|
||||
Reference in New Issue
Block a user