mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 23:36:35 +02:00
kakakaka
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
@@ -1,2 +1,59 @@
|
||||
# gestion
|
||||
Bot by Tutur & Valou
|
||||
# Nom du Bot Discord
|
||||
|
||||

|
||||
|
||||
## Description
|
||||
|
||||
Le Bot Discord Gestion est un bot multifonction développé en JavaScript utilisant la bibliothèque Discord.js. Il est conçu pour offrir diverses fonctionnalités utiles pour les serveurs Discord.
|
||||
|
||||
## Fonctionnalités
|
||||
|
||||
- **Commandes de base :** Commandes telles que !help, !ping, etc.
|
||||
- **Modération :** Commandes de modération pour gérer les utilisateurs et les messages.
|
||||
- **Fun :** Commandes amusantes pour divertir les membres du serveur.
|
||||
- **Musique :** Lecture de musique depuis YouTube et autres plateformes.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Cloner le référentiel :
|
||||
|
||||
```bash
|
||||
git clone https://github.com/votre_utilisateur/nom-du-bot.git
|
||||
```
|
||||
|
||||
2. Installer les dépendances :
|
||||
|
||||
```
|
||||
cd nom-du-bot
|
||||
npm install
|
||||
```
|
||||
|
||||
3. Ajouter le fichier .env avec votre token bot.
|
||||
|
||||
```
|
||||
TOKEN=votre_token_ici
|
||||
```
|
||||
|
||||
4. Lancer le bot :
|
||||
|
||||
```js
|
||||
node main.js
|
||||
```
|
||||
|
||||
## Contribuer
|
||||
|
||||
Si vous souhaitez contribuer à ce projet, suivez ces étapes :
|
||||
|
||||
1. Fork du projet
|
||||
2. Créer une branche pour votre fonctionnalité (git checkout -b fonctionnalite/ma-fonctionnalite)
|
||||
3. Commit de vos modifications (git commit -am 'Ajout de la fonctionnalité ma-fonctionnalite')
|
||||
4. Push vers la branche (git push origin fonctionnalite/ma-fonctionnalite)
|
||||
5. Ouvrir une Pull Request
|
||||
|
||||
## Auteurs
|
||||
tutur33 - Développeur principal
|
||||
valou336 - Développeur principal
|
||||
|
||||
## Licence
|
||||
|
||||
Ce projet est sous licence Apache 2.0. Consultez le fichier LICENSE pour plus de détails.
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
const { Events, InteractionType } = require("discord.js")
|
||||
const { Events, InteractionType } = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
|
||||
name :Events.InteractionCreate,
|
||||
async run(client, interaction) {
|
||||
|
||||
if(interaction.type === InteractionType.ApplicationCommand) {
|
||||
|
||||
const command = client.commands.get(interaction.commandName);
|
||||
await command.execute(interaction, client);
|
||||
};
|
||||
name: Events.InteractionCreate,
|
||||
async run(client, interaction) {
|
||||
if (interaction.type === InteractionType.ApplicationCommand) {
|
||||
const command = client.commands.get(interaction.commandName);
|
||||
await command.execute(interaction, client);
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'messageCreate',
|
||||
async execute(client, message) {
|
||||
const prefix = '!'; // Assurez-vous que le préfixe est défini ici aussi
|
||||
|
||||
if (!message.content.startsWith(prefix) || message.author.bot) return;
|
||||
|
||||
const args = message.content.slice(prefix.length).trim().split(/ +/);
|
||||
const commandName = args.shift().toLowerCase();
|
||||
|
||||
// Si la commande n'existe pas, ne faites rien
|
||||
if (!client.commands.has(commandName)) return;
|
||||
|
||||
const command = client.commands.get(commandName);
|
||||
|
||||
try {
|
||||
command.execute(client, message, args);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
message.reply('Il y a eu une erreur lors de l\'exécution de cette commande.');
|
||||
}
|
||||
},
|
||||
};
|
||||
+6
-13
@@ -1,15 +1,8 @@
|
||||
const { Events, ActivityType } = require("discord.js")
|
||||
const { Events, ActivityType } = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
|
||||
name : Events.ClientReady,
|
||||
async execute(client) {
|
||||
|
||||
//if (client.commands && Array.isArray(client.commands)) {
|
||||
// client.application.commands.set(client.commands.map(command => command.data));
|
||||
//} else {
|
||||
//console.error('Les commandes du client sont manquantes ou mal formatées');
|
||||
//}
|
||||
console.log(`${client.user.username} est en ligne`);
|
||||
|
||||
},
|
||||
name: Events.ClientReady,
|
||||
async run(client) {
|
||||
|
||||
}
|
||||
};
|
||||
@@ -1,18 +1,20 @@
|
||||
require('dotenv').config();
|
||||
const { Client, IntentsBitField, Collection } = require("discord.js");
|
||||
const loadCommands = require("./loaders/loadCommands")
|
||||
const loadCommands = require("./loaders/loadCommands");
|
||||
const loadEvents = require("./loaders/loadEvents");
|
||||
|
||||
const client = new Client({intents: new IntentsBitField(3276799)});
|
||||
|
||||
|
||||
client.on('ready', () => {
|
||||
console.log(`Logged in as ${client.user.tag}!`);
|
||||
});
|
||||
client.events = new Collection();
|
||||
client.commands = new Collection();
|
||||
client.snipes = new Collection();
|
||||
|
||||
(async () => {
|
||||
await loadCommands(client);
|
||||
await loadEvents(client);
|
||||
loadCommands(client);
|
||||
loadEvents(client);
|
||||
await client.login(process.env.TOKEN);
|
||||
})();
|
||||
client.login(process.env.TOKEN);
|
||||
})();
|
||||
Reference in New Issue
Block a user