Files
custom_discordjs/tests/interactionTests.js
T

26 lines
994 B
JavaScript
Raw Normal View History

2023-04-14 16:52:56 -04:00
import { interactionTypes } from '../structures/interactions/interactionTypes.js';
import { Interaction } from '../structures/types.js';
2023-03-20 12:45:20 -04:00
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
/** @param {Interaction} interaction */
export default async (interaction) => {
2023-04-14 16:52:56 -04:00
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();
// interaction.client.commands.set({
// name: 'none',
// description: 'eheheheheh'
// });
// const delResp = await interaction.client.commands.delete('none');
// console.log(delResp);
2023-04-14 16:52:56 -04:00
} else {
console.log(interaction);
}
2023-03-20 12:45:20 -04:00
}