src/events/interactionCreate.js
/**
     * @memberof Events
     * @alias interactionCreate
     * @description Executed when the Event was triggerd. 
     * <br>See DiscordJs: {@Link https://discord.js.org/#/docs/discord.js/stable/class/Client?scrollTo=e-interactionCreate interactionCreate}
     * @param {Interaction} interaction Represents an interaction.
     */
@memberof Events
@alias interactionCreate
@description Executed when the Event was triggerd.
@memberof Events @alias interactionCreate @description Executed when the Event was triggerd .
async execute(interaction) {
		console.log(`[interactionCreate][${interaction.guildId}][${interaction.channelId}][${interaction.user.id}][${interaction.id}] Triggerd!`);
        if (!interaction.isCommand()) return;
        const command = interaction.client.slashCommands.get(interaction.commandName);
        if (!command) return;
        try {
            await command.execute(interaction);
            console.log(`[interactionCreate][${interaction.guildId}][${interaction.channelId}][${interaction.user.id}][${interaction.id}] Successfully Executed Command!`);
        } catch (error) {
            console.error(`[interactionCreate][${interaction.guildId}][${interaction.channelId}][${interaction.user.id}][${interaction.id}] ${error}`);
            await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
        }
	}
async execute ( interaction ) { console . log ( ` ${ interaction . guildId } ${ interaction . channelId } ${ interaction . user . id } ${ interaction . id } ` ) ; if ( ! interaction . isCommand ( ) ) return ; const command = interaction . client . slashCommands . get ( interaction . commandName ) ; if ( ! command ) return ; try { await command . execute ( interaction ) ; console . log ( ` ${ interaction . guildId } ${ interaction . channelId } ${ interaction . user . id } ${ interaction . id } ` ) ; } catch ( error ) { console . error ( ` ${ interaction . guildId } ${ interaction . channelId } ${ interaction . user . id } ${ interaction . id } ${ error } ` ) ; await interaction . reply ( { content : 'There was an error while executing this command!' , ephemeral : true } ) ; } }
@memberof Events
 @alias interactionCreate
 @description Executed when the Event was triggerd.
@memberof Events @alias interactionCreate @description Executed when the Event was triggerd .
//Log //Check ifnot SlashCommand //Search in SlashCommands Collection for SlashCommand //Check ifnot Valid SlashCommand //Execute SlashCommand