diff --git a/commands/configuration/autorole.js b/commands/configuration/autorole.js new file mode 100644 index 0000000..251212a --- /dev/null +++ b/commands/configuration/autorole.js @@ -0,0 +1,44 @@ +// commands/moderation/autorole.js + +const fs = require('fs'); +const path = require('path'); +const { PermissionsBitField } = require('discord.js'); +const configPath = path.join(__dirname, '../../config.json'); + +module.exports = { + name: 'autorole', + description: 'Configure un rôle à attribuer automatiquement aux nouveaux membres.', + async execute(message, args) { + // Vérifier si l'utilisateur a les permissions nécessaires + if (!message.member.permissions.has(PermissionsBitField.Flags.Administrator)) { + return message.reply({ content: 'Tu n\'as pas la permission de configurer l\'autorole.', ephemeral: true }); + } + + // Vérifier si un rôle est mentionné + const role = message.mentions.roles.first(); + if (!role) { + return message.reply({ content: 'Tu dois mentionner le rôle à attribuer.', ephemeral: true }); + } + + // Mettre à jour la configuration + let config; + try { + config = JSON.parse(fs.readFileSync(configPath, 'utf-8')); + } catch (error) { + console.error('Erreur lors de la lecture de la configuration:', error); + return message.reply({ content: 'Erreur lors de la lecture de la configuration.', ephemeral: true }); + } + + config.autoRole = role.id; + + try { + fs.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf-8'); + } catch (error) { + console.error('Erreur lors de la sauvegarde de la configuration:', error); + return message.reply({ content: 'Erreur lors de la sauvegarde de la configuration.', ephemeral: true }); + } + + // Envoyer un message de confirmation + return message.reply({ content: `Le rôle ${role.name} sera attribué automatiquement aux nouveaux membres.`, ephemeral: true }); + }, +}; diff --git a/commands/configuration/config_bienvenue.js b/commands/configuration/config_bienvenue.js new file mode 100644 index 0000000..91a7c07 --- /dev/null +++ b/commands/configuration/config_bienvenue.js @@ -0,0 +1,56 @@ +// commands/moderation/config_bienvenue.js + +const { EmbedBuilder, PermissionsBitField } = require('discord.js'); +const fs = require('fs'); +const path = require('path'); +const configPath = path.join(__dirname, '../../config.json'); // Assurez-vous que le chemin est correct + +module.exports = { + name: 'config_bienvenue', + description: 'Configure le salon pour envoyer un message de bienvenue.', + async execute(message, args) { + // Vérifier si l'utilisateur a les permissions nécessaires + if (!message.member.permissions.has(PermissionsBitField.Flags.ManageChannels)) { + return message.reply({ content: 'Vous n\'avez pas la permission de gérer les salons.', ephemeral: true }); + } + + // Vérifier si un ID de salon est fourni + if (args.length === 0) { + return message.reply({ content: 'Veuillez fournir l\'ID du salon où le message de bienvenue sera envoyé.', ephemeral: true }); + } + + const channelId = args[0]; + const channel = message.guild.channels.cache.get(channelId); + + if (!channel || !channel.isTextBased()) { + return message.reply({ content: 'ID de salon invalide ou le salon n\'est pas un salon textuel.', ephemeral: true }); + } + + // Mettre à jour la configuration + let config; + try { + config = JSON.parse(fs.readFileSync(configPath, 'utf-8')); + } catch (error) { + console.error('Erreur lors de la lecture de la configuration:', error); + return message.reply({ content: 'Erreur lors de la lecture de la configuration.', ephemeral: true }); + } + + config.welcomeChannel = channelId; + + try { + fs.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf-8'); + } catch (error) { + console.error('Erreur lors de la sauvegarde de la configuration:', error); + return message.reply({ content: 'Erreur lors de la sauvegarde de la configuration.', ephemeral: true }); + } + + // Envoyer un message de confirmation + const confirmationEmbed = new EmbedBuilder() + .setColor('#0099ff') + .setTitle('Configuration du Salon de Bienvenue') + .setDescription(`Le salon de bienvenue a été configuré avec succès : <#${channelId}>`) + .setTimestamp(); + + await message.reply({ embeds: [confirmationEmbed], ephemeral: true }); + }, +}; diff --git a/commands/information/help.js b/commands/information/help.js new file mode 100644 index 0000000..9ef3787 --- /dev/null +++ b/commands/information/help.js @@ -0,0 +1,44 @@ +const { EmbedBuilder } = require('discord.js'); + +module.exports = { + name: 'help', + description: 'Affiche une liste des commandes disponibles ou des détails sur une commande spécifique.', + async execute(message, args) { + const { commands } = message.client; + + // Si un argument est fourni, affiche les détails de cette commande + const commandName = args[0]; + if (commandName) { + const command = commands.get(commandName); + if (!command) { + return message.reply('Cette commande n\'existe pas.'); + } + + const embed = new EmbedBuilder() + .setColor('#0099ff') + .setTitle(`Détails de la commande : ${command.name}`) + .setDescription(command.description || 'Pas de description disponible.') + .addFields( + { name: 'Usage', value: command.usage ? `\`${command.usage}\`` : 'Pas de format de commande disponible.' }, + { name: 'Exemple', value: command.example ? `\`${command.example}\`` : 'Pas d\'exemple disponible.' } + ); + + return message.reply({ embeds: [embed] }); + } + + // Sinon, affiche la liste des commandes disponibles + const commandList = Array.from(commands.values()); // Convertit la Map en tableau + const embed = new EmbedBuilder() + .setColor('#0099ff') + .setTitle('Liste des Commandes') + .setDescription('Voici la liste des commandes disponibles :') + .addFields( + commandList.map(command => ({ + name: `\`${command.name}\``, + value: command.description || 'Pas de description disponible.' + })) + ); + + return message.reply({ embeds: [embed] }); + }, +}; diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js new file mode 100644 index 0000000..7aa0df7 --- /dev/null +++ b/commands/moderation/ban.js @@ -0,0 +1,40 @@ +// commands/moderation/ban.js + +const { EmbedBuilder, PermissionsBitField } = require('discord.js'); + +module.exports = { + name: 'ban', + description: 'Bannit un utilisateur.', + async execute(message, args) { + // Vérifiez si l'utilisateur a la permission de bannir des membres + if (!message.member.permissions.has(PermissionsBitField.Flags.BanMembers)) { + return message.reply({ content: 'Tu n\'as pas la permission de bannir des membres.', ephemeral: true }); + } + + // Récupérez l'utilisateur mentionné + const user = message.mentions.users.first(); + if (!user) { + return message.reply({ content: 'Tu dois mentionner un utilisateur à bannir.', ephemeral: true }); + } + + const member = message.guild.members.resolve(user); + if (member) { + try { + // Envoyer un message privé à l'utilisateur avant de le bannir + await user.send({ + content: 'Vous avez été banni de notre serveur Discord. Si vous pensez que cela est une erreur, veuillez contacter un administrateur.', + embeds: [new EmbedBuilder().setTitle('Bannissement').setDescription('Vous avez été banni du serveur.')] + }); + + // Bannir l'utilisateur + await member.ban(); + await message.reply({ content: `L'utilisateur ${user.tag} a été banni.`, ephemeral: true }); + } catch (err) { + console.error('Erreur lors du bannissement :', err); + await message.reply({ content: 'Je n\'ai pas pu bannir cet utilisateur ou envoyer un message privé.', ephemeral: true }); + } + } else { + await message.reply({ content: 'Cet utilisateur n\'est pas dans le serveur.', ephemeral: true }); + } + }, +}; diff --git a/commands/moderation/clear.js b/commands/moderation/clear.js new file mode 100644 index 0000000..7abd568 --- /dev/null +++ b/commands/moderation/clear.js @@ -0,0 +1,43 @@ +// commands/moderation/clear.js + +const { PermissionsBitField } = require('discord.js'); + +module.exports = { + name: 'clear', + description: 'Supprime un certain nombre de messages dans le salon.', + async execute(message, args) { + // Vérifiez si l'utilisateur a la permission de gérer les messages + if (!message.member.permissions.has(PermissionsBitField.Flags.ManageMessages)) { + return message.reply({ content: 'Tu n\'as pas la permission de gérer les messages.', ephemeral: true }); + } + + // Vérifiez si un nombre de messages est spécifié + const amount = parseInt(args[0]); + if (isNaN(amount) || amount <= 0) { + return message.reply({ content: 'Tu dois spécifier un nombre de messages à supprimer supérieur à 0.', ephemeral: true }); + } + + try { + // Récupérer les messages du salon + let messages = await message.channel.messages.fetch({ limit: Math.min(amount, 100) }); + + if (messages.size < amount) { + // Si le nombre de messages est inférieur au nombre demandé, vider le salon + let allMessages = messages; + while (messages.size === 100) { + const lastMessageId = messages.last().id; + messages = await message.channel.messages.fetch({ limit: 100, before: lastMessageId }); + allMessages = allMessages.concat(messages); + } + // Supprimer tous les messages récupérés + await message.channel.bulkDelete(allMessages, { filterOld: true }); + } else { + // Supprimer le nombre spécifié de messages + await message.channel.bulkDelete(messages, { filterOld: true }); + } + } catch (error) { + console.error('Erreur lors de la suppression des messages :', error); + // Ignorer les erreurs de suppression des messages, comme les messages trop vieux ou non accessibles + } + }, +}; diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js new file mode 100644 index 0000000..aeecdee --- /dev/null +++ b/commands/moderation/unban.js @@ -0,0 +1,46 @@ +// commands/moderation/unban.js + +const { EmbedBuilder, PermissionsBitField } = require('discord.js'); +const { handleUnbanCommand } = require('../../handlers/unbanHandler'); + +module.exports = { + name: 'unban', + description: 'Débannit un utilisateur en utilisant son ID.', + async execute(message, args) { + // Vérifiez si l'utilisateur a la permission de débannir des membres + if (!message.member.permissions.has(PermissionsBitField.Flags.BanMembers)) { + return message.reply({ content: 'Tu n\'as pas la permission de débannir des membres.', ephemeral: true }); + } + + if (args.length === 0) { + // Afficher les membres bannis si aucun ID n'est fourni + try { + await handleUnbanCommand(message); + } catch (error) { + console.error('Erreur lors de l\'exécution de la commande unban :', error); + await message.reply({ content: 'Il y a eu une erreur lors de la récupération des membres bannis.', ephemeral: true }); + } + } else { + // Débannir l'utilisateur avec l'ID fourni + const userId = args[0]; + if (!userId) { + return message.reply({ content: 'Tu dois fournir l\'ID de l\'utilisateur à débannir.', ephemeral: true }); + } + + try { + const bannedUsers = await message.guild.bans.fetch(); + const user = bannedUsers.get(userId); + + if (!user) { + return message.reply({ content: 'Cet utilisateur n\'est pas banni.', ephemeral: true }); + } + + await message.guild.bans.remove(userId); + await message.reply({ content: `L'utilisateur ${user.user.tag} a été débanni.`, ephemeral: true }); + } catch (error) { + console.error('Erreur lors du débannissement de l\'utilisateur :', error); + await message.reply({ content: 'Il y a eu une erreur lors du débannissement de cet utilisateur.', ephemeral: true }); + } + } + }, +}; diff --git a/commands/ping.js b/commands/ping.js new file mode 100644 index 0000000..6904e74 --- /dev/null +++ b/commands/ping.js @@ -0,0 +1,7 @@ +module.exports = { + name: 'ping', + description: 'Répond avec Pong!', + execute(message, args) { + message.channel.send('Pong!'); + }, +}; diff --git a/config.json b/config.json new file mode 100644 index 0000000..274a6cd --- /dev/null +++ b/config.json @@ -0,0 +1,6 @@ +{ + "token": "Your token", + "prefix": "+", + "autoRole": "LeaveBlank", + "welcomeChannel": "LeaveBlank" +} \ No newline at end of file diff --git a/events/guildMemberAdd.js b/events/guildMemberAdd.js new file mode 100644 index 0000000..bd92f5d --- /dev/null +++ b/events/guildMemberAdd.js @@ -0,0 +1,58 @@ +const fs = require('fs'); +const path = require('path'); +const { EmbedBuilder } = require('discord.js'); +const configPath = path.join(__dirname, '../config.json'); + +module.exports = { + name: 'guildMemberAdd', + async execute(member) { + let config; + try { + config = JSON.parse(fs.readFileSync(configPath)); + } catch (error) { + console.error('Erreur lors de la lecture de la configuration.', error); + return; + } + + // Attribution automatique du rôle + const roleID = config.autoRole; + if (roleID) { + const role = member.guild.roles.cache.get(roleID); + if (role) { + try { + await member.roles.add(role); + console.log(`Le rôle ${role.name} a été attribué à ${member.user.tag}.`); + } catch (error) { + console.error(`Impossible d'attribuer le rôle ${role.name} à ${member.user.tag}.`, error); + } + } else { + console.log(`Rôle avec l'ID ${roleID} non trouvé.`); + } + } else { + console.log('Aucun rôle automatique configuré.'); + } + + // Envoi du message de bienvenue dans le salon configuré + const welcomeChannelId = config.welcomeChannel; + if (welcomeChannelId) { + const channel = member.guild.channels.cache.get(welcomeChannelId); + if (channel && channel.isTextBased()) { + const embed = new EmbedBuilder() + .setColor('#0099ff') + .setTitle('Bienvenue !') + .setDescription(`Bienvenue ${member.user}! Sur ${member.guild.name}! Grâce à toi, nous sommes maintenant ${member.guild.memberCount} !`) + .setThumbnail(member.user.displayAvatarURL()) + .setTimestamp(); + + await channel.send({ + content: `<@${member.id}>`, + embeds: [embed], + }); + } else { + console.log(`Salon de bienvenue avec l'ID ${welcomeChannelId} non trouvé.`); + } + } else { + console.log('Aucun salon de bienvenue configuré.'); + } + }, +}; diff --git a/handlers/commandHandler.js b/handlers/commandHandler.js new file mode 100644 index 0000000..8ab5918 --- /dev/null +++ b/handlers/commandHandler.js @@ -0,0 +1,43 @@ +const fs = require('fs'); +const path = require('path'); +const config = require('../config.json'); + +const commandCategories = ['owner', 'configuration', 'moderation', 'information', 'giveaway', 'invitation', 'level', 'logs', 'protection', 'reactionrole', 'ticket']; + +module.exports.handleCommands = (client) => { + client.on('messageCreate', async (message) => { + if (!message.content.startsWith(config.prefix) || message.author.bot) return; + + const args = message.content.slice(config.prefix.length).trim().split(/ +/); + const commandName = args.shift().toLowerCase(); + + let commandFilePath = null; + for (const category of commandCategories) { + const filePath = path.join(__dirname, `../commands/${category}`, `${commandName}.js`); + if (fs.existsSync(filePath)) { + commandFilePath = filePath; + break; + } + } + + if (!commandFilePath) return; + + const command = require(commandFilePath); + + try { + await command.execute(message, args); + } catch (error) { + console.error(error); + message.reply('Il y a eu une erreur en exécutant cette commande.'); + } + }); + + client.commands = new Map(); + for (const category of commandCategories) { + const commandFiles = fs.readdirSync(path.join(__dirname, `../commands/${category}`)).filter(file => file.endsWith('.js')); + for (const file of commandFiles) { + const command = require(path.join(__dirname, `../commands/${category}`, file)); + client.commands.set(command.name, command); + } + } +}; diff --git a/handlers/eventHandler.js b/handlers/eventHandler.js new file mode 100644 index 0000000..be9db1d --- /dev/null +++ b/handlers/eventHandler.js @@ -0,0 +1,17 @@ +const fs = require('fs'); +const path = require('path'); + +module.exports.handleEvents = (client) => { + + const eventsPath = path.join(__dirname, '../events'); + const eventFiles = fs.readdirSync(eventsPath).filter(file => file.endsWith('.js')); + + for (const file of eventFiles) { + const event = require(path.join(eventsPath, file)); + if (event.name && event.execute) { + client.on(event.name, (...args) => event.execute(...args)); + } else { + console.warn(`L'événement dans le fichier ${file} ne comporte pas de nom ou de méthode execute.`); + } + } +}; diff --git a/handlers/interactionHandler.js b/handlers/interactionHandler.js new file mode 100644 index 0000000..07d8ae4 --- /dev/null +++ b/handlers/interactionHandler.js @@ -0,0 +1,33 @@ +// handlers/interactionHandler.js + +const { ButtonStyle } = require('discord.js'); +const { handleUnbanCommand } = require('./unbanHandler'); + +module.exports.handleInteractions = async (interaction) => { + if (interaction.isCommand()) { + const command = interaction.client.commands.get(interaction.commandName); + + if (command) { + try { + await command.execute(interaction); + } catch (error) { + console.error(error); + await interaction.reply({ content: 'Il y a eu une erreur lors de l\'exécution de cette commande.', ephemeral: true }); + } + } + } + + if (interaction.isButton()) { + if (interaction.customId.startsWith('unban_')) { + const userId = interaction.customId.split('_')[1]; + + try { + await interaction.guild.bans.remove(userId); + await interaction.reply({ content: `L'utilisateur avec l'ID ${userId} a été débanni.`, ephemeral: true }); + } catch (error) { + console.error('Erreur lors du débannissement via bouton :', error); + await interaction.reply({ content: 'Il y a eu une erreur lors du débannissement de cet utilisateur.', ephemeral: true }); + } + } + } +}; diff --git a/handlers/unbanHandler.js b/handlers/unbanHandler.js new file mode 100644 index 0000000..1d872ea --- /dev/null +++ b/handlers/unbanHandler.js @@ -0,0 +1,33 @@ +// handlers/unbanHandler.js + +const { EmbedBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle } = require('discord.js'); + +module.exports.handleUnbanCommand = async (message) => { + const bannedUsers = await message.guild.bans.fetch(); + const bannedUsersArray = Array.from(bannedUsers.values()); + + if (bannedUsersArray.length === 0) { + return message.reply('Aucun membre n\'est actuellement banni.'); + } + + const embed = new EmbedBuilder() + .setColor('#0099ff') + .setTitle('Liste des Membres Banniss') + .setDescription('Veuillez choisir un membre à débannir en utilisant son ID.'); + + bannedUsersArray.forEach((ban, index) => { + embed.addFields({ name: `ID ${index + 1}`, value: `${ban.user.tag} (ID: ${ban.user.id})` }); + }); + + // Création des boutons pour chaque utilisateur banni + const buttons = bannedUsersArray.map((ban, index) => + new ButtonBuilder() + .setCustomId(`unban_${ban.user.id}`) + .setLabel(`Débannir ${ban.user.tag}`) + .setStyle(ButtonStyle.Primary) + ); + + const row = new ActionRowBuilder().addComponents(buttons); + + await message.reply({ embeds: [embed], components: [row] }); +}; diff --git a/index.js b/index.js new file mode 100644 index 0000000..fe1335c --- /dev/null +++ b/index.js @@ -0,0 +1,18 @@ +const { Client, Events } = require('discord.js'); +const config = require('./config.json'); +const { handleCommands } = require('./handlers/commandHandler'); +const { handleEvents } = require('./handlers/eventHandler'); +const { handleInteractions } = require('./handlers/interactionHandler'); + +const client = new Client({intents: 3276799}) + +client.once('ready', () => { + console.log(`Connecté en tant que ${client.user.tag}`); + handleEvents(client); + handleCommands(client); +}); + +client.on(Events.InteractionCreate, async (interaction) => { + await handleInteractions(interaction); +}); +client.login(config.token); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..e02bf2a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,307 @@ +{ + "name": "bot-reiju", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bot-reiju", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "chalk": "^5.3.0", + "discord.js": "^14.15.3", + "dotenv": "^16.4.5" + } + }, + "node_modules/@discordjs/builders": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.8.2.tgz", + "integrity": "sha512-6wvG3QaCjtMu0xnle4SoOIeFB4y6fKMN6WZfy3BMKJdQQtPLik8KGzDwBVL/+wTtcE/ZlFjgEk74GublyEVZ7g==", + "dependencies": { + "@discordjs/formatters": "^0.4.0", + "@discordjs/util": "^1.1.0", + "@sapphire/shapeshift": "^3.9.7", + "discord-api-types": "0.37.83", + "fast-deep-equal": "^3.1.3", + "ts-mixer": "^6.0.4", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/collection": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", + "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/formatters": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.4.0.tgz", + "integrity": "sha512-fJ06TLC1NiruF35470q3Nr1bi95BdvKFAF+T5bNfZJ4bNdqZ3VZ+Ttg6SThqTxm6qumSG3choxLBHMC69WXNXQ==", + "dependencies": { + "discord-api-types": "0.37.83" + }, + "engines": { + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/rest": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.3.0.tgz", + "integrity": "sha512-C1kAJK8aSYRv3ZwMG8cvrrW4GN0g5eMdP8AuN8ODH5DyOCbHgJspze1my3xHOAgwLJdKUbWNVyAeJ9cEdduqIg==", + "dependencies": { + "@discordjs/collection": "^2.1.0", + "@discordjs/util": "^1.1.0", + "@sapphire/async-queue": "^1.5.2", + "@sapphire/snowflake": "^3.5.3", + "@vladfrangu/async_event_emitter": "^2.2.4", + "discord-api-types": "0.37.83", + "magic-bytes.js": "^1.10.0", + "tslib": "^2.6.2", + "undici": "6.13.0" + }, + "engines": { + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.0.tgz", + "integrity": "sha512-mLcTACtXUuVgutoznkh6hS3UFqYirDYAg5Dc1m8xn6OvPjetnUlf/xjtqnnc47OwWdaoCQnHmHh9KofhD6uRqw==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/util": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.0.tgz", + "integrity": "sha512-IndcI5hzlNZ7GS96RV3Xw1R2kaDuXEp7tRIy/KlhidpN/BQ1qh1NZt3377dMLTa44xDUNKT7hnXkA/oUAzD/lg==", + "engines": { + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/ws": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.1.1.tgz", + "integrity": "sha512-PZ+vLpxGCRtmr2RMkqh8Zp+BenUaJqlS6xhgWKEZcgC/vfHLEzpHtKkB0sl3nZWpwtcKk6YWy+pU3okL2I97FA==", + "dependencies": { + "@discordjs/collection": "^2.1.0", + "@discordjs/rest": "^2.3.0", + "@discordjs/util": "^1.1.0", + "@sapphire/async-queue": "^1.5.2", + "@types/ws": "^8.5.10", + "@vladfrangu/async_event_emitter": "^2.2.4", + "discord-api-types": "0.37.83", + "tslib": "^2.6.2", + "ws": "^8.16.0" + }, + "engines": { + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/ws/node_modules/@discordjs/collection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.0.tgz", + "integrity": "sha512-mLcTACtXUuVgutoznkh6hS3UFqYirDYAg5Dc1m8xn6OvPjetnUlf/xjtqnnc47OwWdaoCQnHmHh9KofhD6uRqw==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@sapphire/async-queue": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.3.tgz", + "integrity": "sha512-x7zadcfJGxFka1Q3f8gCts1F0xMwCKbZweM85xECGI0hBTeIZJGGCrHgLggihBoprlQ/hBmDR5LKfIPqnmHM3w==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@sapphire/shapeshift": { + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.7.tgz", + "integrity": "sha512-4It2mxPSr4OGn4HSQWGmhFMsNFGfFVhWeRPCRwbH972Ek2pzfGRZtb0pJ4Ze6oIzcyh2jw7nUDa6qGlWofgd9g==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v16" + } + }, + "node_modules/@sapphire/snowflake": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.3.tgz", + "integrity": "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@types/node": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "dependencies": { + "undici-types": "~6.13.0" + } + }, + "node_modules/@types/ws": { + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@vladfrangu/async_event_emitter": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.4.5.tgz", + "integrity": "sha512-J7T3gUr3Wz0l7Ni1f9upgBZ7+J22/Q1B7dl0X6fG+fTsD+H+31DIosMHj4Um1dWQwqbcQ3oQf+YS2foYkDc9cQ==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/discord-api-types": { + "version": "0.37.83", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.83.tgz", + "integrity": "sha512-urGGYeWtWNYMKnYlZnOnDHm8fVRffQs3U0SpE8RHeiuLKb/u92APS8HoQnPTFbnXmY1vVnXjXO4dOxcAn3J+DA==" + }, + "node_modules/discord.js": { + "version": "14.15.3", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.15.3.tgz", + "integrity": "sha512-/UJDQO10VuU6wQPglA4kz2bw2ngeeSbogiIPx/TsnctfzV/tNf+q+i1HlgtX1OGpeOBpJH9erZQNO5oRM2uAtQ==", + "dependencies": { + "@discordjs/builders": "^1.8.2", + "@discordjs/collection": "1.5.3", + "@discordjs/formatters": "^0.4.0", + "@discordjs/rest": "^2.3.0", + "@discordjs/util": "^1.1.0", + "@discordjs/ws": "^1.1.1", + "@sapphire/snowflake": "3.5.3", + "discord-api-types": "0.37.83", + "fast-deep-equal": "3.1.3", + "lodash.snakecase": "4.1.1", + "tslib": "2.6.2", + "undici": "6.13.0" + }, + "engines": { + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" + }, + "node_modules/magic-bytes.js": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.10.0.tgz", + "integrity": "sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==" + }, + "node_modules/ts-mixer": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", + "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==" + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/undici": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.13.0.tgz", + "integrity": "sha512-Q2rtqmZWrbP8nePMq7mOJIN98M0fYvSgV89vwl/BQRT4mDOeY2GXZngfGpcBBhtky3woM7G24wZV3Q304Bv6cw==", + "engines": { + "node": ">=18.0" + } + }, + "node_modules/undici-types": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==" + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..17e0cfd --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "bot-reiju", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "dependencies": { + "chalk": "^5.3.0", + "discord.js": "^14.15.3", + "dotenv": "^16.4.5" + } +}