Added base modals and 'finished' menus

This commit is contained in:
ION606
2023-04-14 16:52:56 -04:00
parent 410473ecf8
commit ed16d4aeca
8 changed files with 67 additions and 12 deletions
+6 -2
View File
@@ -3,7 +3,7 @@ import { Channel } from "../structures/guilds/Channel.js";
import { message } from "../structures/messages/message.js";
import { MessageButtonStyles } from "../structures/interactions/ButtonStyles.js";
import { MessageActionRow } from "../structures/messages/MessageActionRow.js";
import { ChannelSelectMenu, StringMenuComponent, StringSelectMenu } from "../structures/interactions/StringSelectMenu.js";
import { ChannelSelectMenu, StringMenuComponent, StringSelectMenu, userSelectMenu } from "../structures/interactions/MessageSelectMenu.js";
/**
* @param {message} mog
@@ -21,10 +21,14 @@ export async function buttonTests(mog) {
comp2.label = 'llllll';
c.options.push(comp2);
c.custom_id = "temp";
const comp3 = new userSelectMenu();
comp3.custom_id = "userMenu";
const row = new MessageActionRow();
// row.addComponent(comp);
row.addComponent(c);
// row.addComponent(c);
row.addComponent(comp3);
m.addComponents(row);
m.content = "OOGA BOOGA";
+13 -8
View File
@@ -1,14 +1,19 @@
import { interactionTypes } from '../structures/interactions/interactionTypes.js';
import { Interaction } from '../structures/types.js';
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
/** @param {Interaction} interaction */
export default async (interaction) => {
console.log(interaction.data);
interaction.reply({content: "HELLO WORLD", ephemeral: true});
await delay(3000);
interaction.update({content: "NOOOOOOOOOOOOOOOOOO"});
await delay(2000);
const response = await interaction.followUp("followup!");
await delay(2000);
response.delete();
if (interaction.type == interactionTypes.ApplicationCommand) {
console.log(interaction.data);
interaction.reply({content: "HELLO WORLD", ephemeral: true});
await delay(3000);
interaction.update({content: "NOOOOOOOOOOOOOOOOOO"});
await delay(2000);
const response = await interaction.followUp("followup!");
await delay(2000);
response.delete();
} else {
console.log(interaction);
}
}