Push du programme

This commit is contained in:
2022-03-04 14:26:14 +01:00
parent bf2efcc1ed
commit e49f26cbf5
13 changed files with 1453 additions and 3 deletions

15
events/messageCreate.js Normal file
View File

@@ -0,0 +1,15 @@
module.exports = (client, message) => {
if (message.author.bot || message.channel.type === 'dm') return;
const prefix = client.config.app.prefix;
if (message.content.indexOf(prefix) !== 0) return;
const args = message.content.slice(prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
const cmd = client.commands.get(command) || client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(command));
if (cmd) cmd.execute(client, message, args);
};

13
events/ready.js Normal file
View File

@@ -0,0 +1,13 @@
module.exports = async (client) => {
console.log(`${client.user.tag} oberve les ${client.guilds.cache.map(g => g.memberCount).reduce((a,b) => a + b)} utilisateur du serveur !`)
let activites = ['Créer par Lantium#9402 !',`Downloader prêt !` ], i = 0;
setInterval(() => client.user.setPresence({
activities: [{
name: `${activites [i++ % activites.length]}`,
type: 'PLAYING'
}],
status: 'online' }),
5000);
};