mirror of
https://github.com/ION606/custom_discordjs.git
synced 2026-05-14 22:26:54 +00:00
Added base modals and 'finished' menus
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user