initial commit'

This commit is contained in:
Nemo
2021-11-09 09:34:55 +01:00
parent 6f0c524a0b
commit e685700791
15 changed files with 2569 additions and 0 deletions

7
events/ ready.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
name: 'ready',
once: true,
execute(client) {
console.log(`Ready! Logged in as ${client.user.tag}`);
},
};

18
events/guildMemberAdd.js Normal file
View File

@ -0,0 +1,18 @@
const { WelcomeChannel } = require("discord.js");
const { userMention } = require("@discordjs/builders");
module.exports = {
name: 'guildMemberAdd',
async execute(member, guild) {
await guild.fetchWelcomeScreen()
.then(() => {
const channel = this.welcomeChannels;
channel.forEach(element => {
const nickname = memberNicknameMention(member.id);
await interaction.reply('Bienvenue ' + nickname + ' ! Mets toi à l\'aise, il y a des bières dans le frigo.');
})
})
.catch(console.error);
},
};

View File

@ -0,0 +1,17 @@
module.exports = {
name: 'interactionCreate',
async execute(interaction) {
if (!interaction.isCommand()) return;
const command = interaction.client.commands.get(interaction.commandName);
if (!command) return;
try {
await command.execute(interaction);
} catch (error) {
console.error(error);
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
} console.log(`${interaction.user.tag} in #${interaction.channel.name} triggered an interaction.`);
},
};