commit 0b6ed92a61e8f45f59b484f617ed95c9b7de720d Author: Lantium Date: Sun Apr 3 04:34:37 2022 +0200 Initial commit diff --git a/assets/choose.gif b/assets/choose.gif new file mode 100755 index 0000000..baef72d Binary files /dev/null and b/assets/choose.gif differ diff --git a/commands/Developpeur/lan.js b/commands/Developpeur/lan.js new file mode 100644 index 0000000..4321d53 --- /dev/null +++ b/commands/Developpeur/lan.js @@ -0,0 +1,28 @@ +module.exports = { + name: 'lan', + aliases: [], + utilisation: '{prefix}lan', + + async execute(client, message) { + + const destinataire = message.guild.members.cache.get("873717324035809291"); +//302917031840186369 + + const msg = "Va te faire Braire !!!" + + if (message.author.id != "327193195085824001") return; + + + var i; + + for (i = 0; i < 50; i++) { + setTimeout(() => { + destinataire.send(msg); + }, 1 * 1) + } + + + + } + +} diff --git a/commands/Developpeur/reboot.js b/commands/Developpeur/reboot.js new file mode 100644 index 0000000..8dbd6e4 --- /dev/null +++ b/commands/Developpeur/reboot.js @@ -0,0 +1,37 @@ +module.exports = { + name: 'reboot', + aliases: [], + utilisation: '{prefix}reboot', + + async execute(client, message) { + + // Lantium = "327193195085824001"; + // Cecile = "321032586455547915"; + // Antho = "304970614739828746"; + // Leethium = "241299910488621066"; + // Nico = "182412174138933249"; + // Lumikkode = "191117029606948864"; + // Second = "906122784999096350"; + // Hunter = "206881400333402112"; + // Manyx = "302808060617818113"; + + let Members = [ + "327193195085824001", + "321032586455547915", + "304970614739828746", + "241299910488621066", + "182412174138933249", + "191117029606948864", + "906122784999096350", + "206881400333402112", + "302808060617818113", + ] + + if (!Members.includes(message.author.id)) + return message.channel.send("Cette commande est réservé au développeur de LanBot"); + await message.channel.send("Reboot en cours..."); + + await process.exit(); + + }, +}; \ No newline at end of file diff --git a/commands/Developpeur/res.txt b/commands/Developpeur/res.txt new file mode 100644 index 0000000..25ba94f --- /dev/null +++ b/commands/Developpeur/res.txt @@ -0,0 +1,29 @@ +module.exports = { + name: 'res', + aliases: [], + utilisation: '{prefix}res', + + async execute(client, message) { + + const { exec } = require("child_process"); + + // if (!args[0]) return message.channel.send("Il faut mettre le lien de la musique ! "); + + message.channel.send(`Ta demande a été pris en compte ! `); + + +const doExec = (cmd, opts = {}) => { + return new Promise((resolve, reject) => { + exec(cmd, opts, (err, stdout, stderr) => { + if (err) return reject({ stdout, stderr }); + resolve(stdout); + }); + }); +}; + +//::doExec(`deemix -b flac -p /home/Plex/Musiques/ ${args}`) //Ici rentre la commande que tu veux executer + + doExec(`touch /storage/Lantium/test.txt`) + + }, +}; diff --git a/commands/core/choose.js b/commands/core/choose.js new file mode 100644 index 0000000..c1e9cc4 --- /dev/null +++ b/commands/core/choose.js @@ -0,0 +1,28 @@ +const { MessageEmbed, MessageAttachment } = require("discord.js"); + +module.exports = { + name: 'choose', + aliases: [], + utilisation: '{prefix}choose ,', + + execute(client, message) { + + const arguments = message.content.split(/,+/g); + + arguments.shift().toLowerCase(); + + const Response = Math.floor(Math.random() * arguments.length); + //const attachment = new MessageAttachment("./assets/choose.gif"); + + const embed = new MessageEmbed() + embed.setColor('RANDOM') + embed.setTitle("Commande Choose") + embed.addField('Par les pouvoirs qui me sont conférés.', `Je choisi : **${arguments[Response]}**`) + embed.setTimestamp(); + embed.setImage("https://media.discordapp.net/attachments/924807447372247050/951251866010931301/choose.gif"); + + + message.channel.send({ embeds: [embed] }); + + }, +}; \ No newline at end of file diff --git a/commands/core/help.js b/commands/core/help.js new file mode 100644 index 0000000..7950664 --- /dev/null +++ b/commands/core/help.js @@ -0,0 +1,22 @@ +const { MessageEmbed } = require('discord.js'); + +module.exports = { + name: 'help', + aliases: ['h'], + showHelp: false, + utilisation: '{prefix}help', + + execute(client, message, args) { + const embed = new MessageEmbed(); + + embed.setColor('RED'); + embed.setAuthor(client.user.username, client.user.displayAvatarURL({ size: 1024, dynamic: true })); + + const commands = client.commands.filter(x => x.showHelp !== false); + embed.addField(`Enabled - ${commands.size}`, commands.map(x => `\`${x.name}${x.aliases[0] ? ` (${x.aliases.map(y => y).join(', ')})\`` : '\`'}`).join(' | ')); + + embed.setTimestamp(); + + message.channel.send({ embeds: [embed] }); + }, +}; \ No newline at end of file diff --git a/commands/core/ping.js b/commands/core/ping.js new file mode 100644 index 0000000..91b60ee --- /dev/null +++ b/commands/core/ping.js @@ -0,0 +1,17 @@ +const ms = require('ms'); + +module.exports = { + name: 'ping', + aliases: [], + utilisation: '{prefix}ping', + + async execute(client, message) { + const msg = await message.channel.send("Pong ! "); + msg.edit(` + Pong ! + Latence du bot: ${msg.createdTimestamp - message.createdTimestamp}ms + Latence de l'API: ${Math.round(client.ws.ping)}ms + `); + + }, +}; \ No newline at end of file diff --git a/commands/core/todo.js b/commands/core/todo.js new file mode 100644 index 0000000..f7eba02 --- /dev/null +++ b/commands/core/todo.js @@ -0,0 +1,96 @@ +const ms = require("ms"); +const fs = require("fs"); +const path = require("path"); +const uuid = require("uuid").v4; + +const dbFileName = path.resolve(".", "utils", "todo.json"); +let database = []; + +module.exports = { + name: "todo", + aliases: ["todo"], + utilisation: "{prefix}todo