first commit

This commit is contained in:
ALC-ProduXion 2022-04-18 15:32:07 +02:00
parent f34b9f78a6
commit 68718fc865
4121 changed files with 555248 additions and 0 deletions

19
commands/del.js Normal file
View file

@ -0,0 +1,19 @@
module.exports = {
name: 'del',
description: 'Delete message',
execute(message, args) {
if (args[0]) {
const amount = parseInt(args[0]) + 1;
if (isNaN(amount)) {
return message.reply('Ce n\'est pas un nombre valide !');
}
else if (amount <= 1 || amount > 100) {
return message.reply('Ce n\'est pas un nombre valide ! (entre 1 et 99)');
}
message.channel.bulkDelete(amount)
.then(messages => {
console.log(`${messages.size - 1} messages supprimés par ${message.author.username} sur ${message.guild.name} dans ${message.channel.name}`);
});
} else { message.reply("Merci d'indiquer le nombre de messages à supprimer"); }
}
}

11
commands/help.js Normal file
View file

@ -0,0 +1,11 @@
module.exports = {
name: 'help',
description: 'Obtenir la liste des commandes disponibles',
execute(message) {
if (message.member.hasPermission("BAN_MEMBERS")) {
message.channel.send(`Voici les commandes disponibles en tant qu'administrateur :
> \`.message\` - permet de gérer les messages classiques envoyés par le bot
> \`.del n\` - permet de supprimer les n derniers messages envoyés`)
}
}
}

219
commands/message.js Normal file
View file

@ -0,0 +1,219 @@
const fs = require('fs');
const path = require('path');
const { client, logch } = require("../index.js");
module.exports = {
name: 'message',
description: "Permet d'envoyer des messages avec le bot",
execute(message, args) {
// Prompt help
if (!args[0] || args[0] == "help" || args[0] == "h") {
message.channel.send(`
Aide à propos de \`.message\` :
Pour utiliser la commande il vous suffit d'utiliser un des arguments suivants :
> list *liste l'ensemble des messages envoyés par le bot en indiquant l'ID du message*
> send ChannelID/nomDuChannel le message que vous souhaitez envoyer
> edit MessageID (trouvable grâce à l'argument list) nouveau contenu du message
> add MessageID 🙂 @Role *ajoute la réaction 🙂 en dessous du message et donne le @Role à ceux qui cliquent dessus*
> rem MessageID 🙂 *supprime la réaction 🙂 en dessous du message*
> delete MessageID *supprime le message choisi (IRREVERSIBLE)*`);
}
// list messages
else if (args[0] == "list") {
const listMsg = fs.readdirSync(`./data/messages/`).filter(file => file.endsWith('.json'));
console.log(listMsg);
if (listMsg.length == 0) {
console.log("pas de messages envoyés");
return message.channel.send("Aucun message n'a été envoyé via le bot");
}
nbMessages = 0;
messagetosend = "Liste des messages envoyés via le bot :\n";
for (const msg of listMsg) {
if (messagetosend.length >= 1400) {
message.channel.send(messagetosend);
messagetosend = "";
}
msgFileContent = JSON.parse(fs.readFileSync(path.resolve(`./data/messages/${msg}`)));
if (!msgFileContent.deleted) {
nbMessages += 1;
messagetosend += ` - ${msgFileContent.id} dans <#${msgFileContent.channelid}> : *"${msgFileContent.content.slice(0, 30)}..."*\n`
}
}
messagetosend += `${nbMessages} message(s) ont été envoyés via le bot`
message.channel.send(messagetosend)
}
// send message
else if (args[0] == "send") {
if (!args[2]) return message.channel.send("Merci de vérifier d'entrer un channel et un message à envoyer (.message help)")
// Check if this channel exists
channeltosendname = message.guild.channels.cache.find(channel => channel.name.toLowerCase() == args[1])
channeltosendid = client.channels.cache.get(args[1]);
if (channeltosendname) {
channeltosend = channeltosendname;
}
else if (channeltosendid) {
channeltosend = channeltosendid;
}
else return message.channel.send("Merci de vérifier d'avoir entré un nom de channel (ou ID) valide")
actualtimestamp = + new Date();
args.splice(0, 2);
messagecontent = args.join(" ");
channeltosend.send(messagecontent).then(sent => {
messageinfo = {
id: `${sent.channel.id}o${sent.id}`,
deleted: false,
channelid: sent.channel.id,
content: messagecontent,
created: actualtimestamp,
lastChange: actualtimestamp,
reactnumber: 0
}
const jsonStringmsg = JSON.stringify(messageinfo);
fs.writeFile(`./data/messages/${sent.channel.id}o${sent.id}.json`, jsonStringmsg, err => {
if (err) {
console.log(`Error writing message`, err)
} else {
console.log(`Successfully wrote message`)
}
});
message.react("✅");
message.channel.send("Message envoyé.")
});
}
// edit message
else if (args[0] == "edit") {
if (!args[2]) return message.channel.send("Merci de vérifier d'entrer un id de message correct et un nouveau message(.message help)");
try {
idChMsg = args[1].split(/\o+/);
argsmessage = args.slice(0);
argsmessage.splice(0, 2);
newcontent = argsmessage.join(" ");
client.channels.cache.get(idChMsg[0]).messages.fetch(idChMsg[1]).then(msg => msg.edit(newcontent));
// update message file
updatemsg = JSON.parse(fs.readFileSync(path.resolve(`./data/messages/${args[1]}.json`)));
actualtimestamp = + new Date();
updatemsg.content = newcontent;
updatemsg.lastChange = actualtimestamp;
const jsonStringmsg = JSON.stringify(updatemsg);
fs.writeFile(`./data/messages/${args[1]}.json`, jsonStringmsg, err => {
if (err) {
console.log(`Error writing message`, err)
} else {
console.log(`Successfully wrote message`)
}
})
message.react("✅");
message.channel.send("Message modifié.")
} catch (err) {
console.error(err);
return message.channel.send("Merci de vérifier d'entrer un id de message correct (.message list)");
}
}
// delete message
else if (args[0] == "delete" || args[0] == "del") {
if (!args[1]) return message.channel.send("Merci de vérifier d'entrer un id de message correct (.message help)");
try {
idChMsg = args[1].split(/\o+/);
client.channels.cache.get(idChMsg[0]).messages.fetch(idChMsg[1]).then(msg => msg.delete());
// update message file
updatemsg = JSON.parse(fs.readFileSync(path.resolve(`./data/messages/${args[1]}.json`)));
updatemsg.deleted = true;
actualtimestamp = + new Date();
updatemsg.lastChange = actualtimestamp;
const jsonStringmsg = JSON.stringify(updatemsg);
fs.writeFile(`./data/messages/${args[1]}.json`, jsonStringmsg, err => {
if (err) {
console.log(`Error writing message`, err)
} else {
console.log(`Successfully wrote message`)
}
})
message.react("✅");
message.channel.send("Message supprimé.")
} catch (err) {
console.error(err);
return message.channel.send("Merci de vérifier d'entrer un id de message correct (.message list)");
}
}
// add reaction
else if (args[0] == "add") {
if (!args[2]) return message.channel.send("Merci de mettre une emote valide");
try {
idChMsg = args[1].split(/\o+/);
client.channels.cache.get(idChMsg[0]).messages.fetch(idChMsg[1]).then(msg => msg.react(args[2]));
// update message file
updatemsg = JSON.parse(fs.readFileSync(path.resolve(`./data/messages/${args[1]}.json`)));
updatemsg.reactnumber += 1;
eval(`updatemsg.emoj${updatemsg.reactnumber} = args[2];`);
if (args[3] && args[3].length > 0) {
roleID = args[3].replace('<@&', '').replace('>', '');
rolefound = message.guild.roles.cache.find(r => r.id == roleID);
if (rolefound) {
eval(`updatemsg.action${updatemsg.reactnumber} = roleID;`);
}
else {
message.channel.send("Ceci n'est pas un rôle, l'emoj n'a donc été associé à aucun rôle");
eval(`updatemsg.action${updatemsg.reactnumber} = "none";`);
}
}
else {
message.channel.send("Vous n'avez pas précisé de rôle, l'emoj n'a donc été associé à aucun rôle");
eval(`updatemsg.action${updatemsg.reactnumber} = "none";`);
}
actualtimestamp = + new Date();
updatemsg.lastChange = actualtimestamp;
const jsonStringmsg = JSON.stringify(updatemsg);
fs.writeFile(`./data/messages/${args[1]}.json`, jsonStringmsg, err => {
if (err) {
console.log(`Error writing message`, err)
} else {
console.log(`Successfully wrote message`)
}
})
message.react("✅");
message.channel.send("Réaction ajoutée.")
} catch (err) {
console.error(err);
return message.channel.send("Merci de vérifier d'entrer un id de message correct (.message list) et/ou une emote valide");
}
}
// remove reaction
else if (args[0] == "rem") {
if (!args[2]) return message.channel.send("Merci de mettre une emote valide");
try {
idChMsg = args[1].split(/\o+/);
client.channels.cache.get(idChMsg[0]).messages.fetch(idChMsg[1]).then(msg => msg.reactions.cache.find(reaction => reaction.emoji.name == args[2]).remove());
// update message file
updatemsg = JSON.parse(fs.readFileSync(path.resolve(`./data/messages/${args[1]}.json`)));
for (let index = 1; index < updatemsg.reactnumber + 1; index++) {
eval(`if (updatemsg.emoj${index} == args[2]) updatemsg.emoj${index} = "Deleted"`);
}
actualtimestamp = + new Date();
updatemsg.lastChange = actualtimestamp;
const jsonStringmsg = JSON.stringify(updatemsg);
fs.writeFile(`./data/messages/${args[1]}.json`, jsonStringmsg, err => {
if (err) {
console.log(`Error writing message`, err)
} else {
console.log(`Successfully wrote message`)
}
})
message.react("✅");
message.channel.send("Réaction supprimée.")
} catch (err) {
console.error(err);
return message.channel.send("Merci de vérifier d'entrer un id de message correct (.message list) et/ou une emote valide");
}
}
}
}

13
config/badwords.json Normal file
View file

@ -0,0 +1,13 @@
[
"pute",
"pétasse",
"connard",
"couillon",
"fuck",
"fdp",
"free nitro",
"gift",
"enculé",
"fils de pute",
"teubé"
]

7
config/botinfo.json Normal file
View file

@ -0,0 +1,7 @@
{
"activity": "Agir ensemble",
"logChannelID": "963136429779734578",
"mpChannelID": "963136429779734578",
"presentationChannelID": "962010843451629618",
"memberRoleID": "964536803510059048"
}

6
config/credentials.json Normal file
View file

@ -0,0 +1,6 @@
{
"appID": "962013583074533496",
"publicKey": "f3b1f4961bb002f64e7cade37aa3a3e3ef453e43f32f84779dd4e0872cd97984",
"prefix": ".",
"token": "LoL t'as cru que je laisserais le token ?"
}

View file

@ -0,0 +1 @@
{"id":"348848036031758337","hasleft":false,"join":1650044362737,"left":0}

View file

@ -0,0 +1 @@
{"id":"444579657279602699","hasleft":false,"join":1650041746012,"firstMsgDate":1650041746012,"left":0}

View file

@ -0,0 +1 @@
{"id":"931995381590548501","hasleft":false,"join":1650043735089,"left":0}

22
functions/logger.js Normal file
View file

@ -0,0 +1,22 @@
const { client, logch } = require("../index.js")
module.exports = {
// log in discord channel & console
all: function (ttolog) {
console.log(ttolog);
try {
client.channels.cache.get(logch).send(ttolog);
} catch (error) {
console.error(error);
}
},
// log only in discord channel
channel: function (ttolog) {
try {
client.channels.cache.get(logch).send(ttolog);
} catch (error) {
console.error(error);
}
},
};

125
functions/messageCheck.js Normal file
View file

@ -0,0 +1,125 @@
const fs = require('fs');
const path = require('path');
const { client, logch } = require("../index.js");
const logger = require("./logger.js");
const botconfig = JSON.parse(fs.readFileSync(path.resolve(`./config/botinfo.json`)));
let memberRoleID = botconfig.memberRoleID
const badwords = JSON.parse(fs.readFileSync(path.resolve(`./config/badwords.json`)));
function checkBadwords(msg) {
badwordlist = badwords.filter(word => msg.content.includes(word));
return badwordlist;
}
module.exports = {
// Check general properties of message
general: function (message) {
fs.stat(`./data/users/${message.author.id}.json`, function (err, stat) {
if (err == null) {
// Check if the message is safe for community
suspiciousWords = checkBadwords(message);
if (suspiciousWords.length > 0) {
logger.all(`${message.author.tag} a dit ${suspiciousWords.toString()} dans ${message.channel.name}`);
}
} else if (err.code === 'ENOENT') {
// If it is the first message of the member we give him member role except if his messages contains suspicious words
suspiciousWords = checkBadwords(message);
if (suspiciousWords.length > 0) {
return logger.all(`${message.author.tag} a dit ${suspiciousWords.toString()} dans ${message.channel.name}`);
}
actualtimestamp = + new Date();
usrinfo = {
id: message.author.id,
hasleft: false,
join: actualtimestamp,
left: 0
}
const jsonStringusr = JSON.stringify(usrinfo);
fs.writeFile(`./data/users/${message.author.id}.json`, jsonStringusr, err => {
if (err) {
console.log(`Error writing user profile`, err)
} else {
console.log(`Successfully wrote user profile`)
}
});
memberRole = message.guild.roles.cache.find(role => role.id == memberRoleID);
message.member.roles.add(memberRole);
} else {
console.log('Error: ', err.code);
}
});
},
// Update profile
memberUpdate: function (member, event) {
fs.stat(`./data/users/${member.user.id}.json`, function (err, stat) {
actualtimestamp = + new Date();
if (err == null) {
oldusrinfo = JSON.parse(fs.readFileSync(path.resolve(`./data/users/${member.user.id}.json`)));
if (event == "join") {
joininfo = actualtimestamp;
leftinfo = oldusrinfo.left;
hasleftinfo = false;
memberRole = member.guild.roles.cache.find(role => role.id == memberRoleID);
member.roles.add(memberRole);
} else if (event == "left") {
leftinfo = actualtimestamp;
joininfo = oldusrinfo.join;
hasleftinfo = true;
}
usrinfo = {
id: member.user.id,
hasleft: hasleftinfo,
join: joininfo,
left: leftinfo,
}
const jsonStringusr = JSON.stringify(usrinfo);
fs.writeFile(`./data/users/${member.user.id}.json`, jsonStringusr, err => {
if (err) {
console.log(`Error writing user profile`, err)
} else {
console.log(`Successfully wrote user profile`)
}
});
} else if (err.code === 'ENOENT') {
if (event == "join") {
return logger.all("Il doit donc se présenter dans le channel 👋-présentation");
} else if (event == "left") {
leftinfo = actualtimestamp;
joininfo = 0;
hasleftinfo = true;
}
usrinfo = {
id: member.user.id,
hasleft: hasleftinfo,
join: joininfo,
left: leftinfo,
}
const jsonStringusr = JSON.stringify(usrinfo);
fs.writeFile(`./data/users/${member.user.id}.json`, jsonStringusr, err => {
if (err) {
console.log(`Error writing user profile`, err)
} else {
console.log(`Successfully wrote user profile`)
}
});
} else {
console.log('Error: ', err.code);
}
});
}
}

22
functions/random.js Normal file
View file

@ -0,0 +1,22 @@
const { client, logch } = require("../index.js")
module.exports = {
// log in discord channel & console
string: function (myLength) {
const chars =
"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";
const randomArray = Array.from(
{ length: myLength },
(v, k) => chars[Math.floor(Math.random() * chars.length)]
);
const randomString = randomArray.join("");
return randomString;
},
// log only in discord channel
int: function (min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min)) + min;
},
};

83
functions/rolereaction.js Normal file
View file

@ -0,0 +1,83 @@
const fs = require('fs');
const path = require('path');
const { client, logch } = require("../index.js");
const logger = require("./logger.js");
module.exports = {
// cache messages
cache: function () {
console.log("Caching messages...");
const msgFiles = fs.readdirSync('./data/messages/').filter(file => file.endsWith('.json'));
for (const file of msgFiles) {
idChMsg = file.replace('.json', '').split(/\o+/);
console.log(idChMsg);
try {
client.channels.cache.get(idChMsg[0]).messages.fetch(idChMsg[1])
} catch (error) {
console.error(error);
}
}
},
// give a role
give: function (reaction, user) {
fileMessage = `${reaction.message.channel.id}o${reaction.message.id}`;
fs.stat(`./data/messages/${fileMessage}.json`, function (err, stat) {
if (err == null) {
try {
member = reaction.message.guild.members.cache.find(mem => mem.user.id == user.id);
msginfo = JSON.parse(fs.readFileSync(path.resolve(`./data/messages/${fileMessage}.json`)));
for (let index = 1; index < msginfo.reactnumber + 1; index++) {
eval(`
if (msginfo.action${index} && msginfo.emoj${index} == reaction.emoji.name && msginfo.action${index} != "none") {
roleactionID = msginfo.action${index};
console.log(roleactionID);
memberRole = reaction.message.guild.roles.cache.find(role => role.id == roleactionID);
member.roles.add(memberRole);
logger.all(user.tag + " a obtenu le rôle par réaction : " + memberRole.name);
}`);
}
} catch (err) {
console.error(err);
}
} else {
null;
//console.log('Error: ', err.code);
}
});
},
// give a role
remove: function (reaction, user) {
fileMessage = `${reaction.message.channel.id}o${reaction.message.id}`;
fs.stat(`./data/messages/${fileMessage}.json`, function (err, stat) {
if (err == null) {
try {
member = reaction.message.guild.members.cache.find(mem => mem.user.id == user.id);
msginfo = JSON.parse(fs.readFileSync(path.resolve(`./data/messages/${fileMessage}.json`)));
for (let index = 1; index < msginfo.reactnumber + 1; index++) {
eval(`
if (msginfo.action${index} && msginfo.emoj${index} == reaction.emoji.name && msginfo.action${index} != "none") {
roleactionID = msginfo.action${index};
console.log(roleactionID);
memberRole = reaction.message.guild.roles.cache.find(role => role.id == roleactionID);
member.roles.remove(memberRole);
logger.all(user.tag + " a enlevé son rôle par réaction : " + memberRole.name);
}`);
}
} catch (err) {
console.error(err);
}
} else {
null;
//console.log('Error: ', err.code);
}
});
},
}

102
index.js Normal file
View file

@ -0,0 +1,102 @@
/*
Bot Ingénieurs pour demain
Developped by Valentin SERVIERES, if you have any question, you can contact me by Discord MagicTINTIN#4389
- Discord.js version v12 (depreciated)
*/
console.log("Starting...");
const { appID, publicKey, token, prefix } = require('./config/credentials.json');
const fs = require('fs');
const path = require('path');
const Discord = require('discord.js');
const { Client, Intents, MessageEmbed } = require('discord.js');
// Only mandatory for Discord.js v13
const client = new Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_BANS, Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS, Intents.FLAGS.GUILD_INTEGRATIONS, Intents.FLAGS.GUILD_WEBHOOKS, Intents.FLAGS.GUILD_INVITES, Intents.FLAGS.GUILD_VOICE_STATES, Intents.FLAGS.GUILD_PRESENCES, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.GUILD_MESSAGE_TYPING, Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.DIRECT_MESSAGE_REACTIONS, Intents.FLAGS.DIRECT_MESSAGE_TYPING],
});
exports.client = client;
// --- INITIALIZING BOT ---
config = JSON.parse(fs.readFileSync(path.resolve(`./config/botinfo.json`)));
console.log("config found\ngetting log channel id");
const logch = config.logChannelID
exports.logch = logch;
// Import functions
const random = require("./functions/random.js");
const logger = require("./functions/logger.js");
const msgcheck = require("./functions/messageCheck.js");
const rolereact = require("./functions/rolereaction.js");
// Import commands
client.commands = new Discord.Collection();
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const command = require(`./commands/${file}`);
client.commands.set(command.name, command);
}
client.once('ready', () => {
// cache message that could be used for reactions
rolereact.cache();
console.log('Ready to act !')
client.user.setActivity(config.activity, { type: 'PLAYING' });
client.channels.cache.get(logch).send("**❕ BOT ONLINE** - ready to act");
});
// --- END INITIALIZATION ---
client.on('message', async message => {
if (message.author.bot) return
if (!message.channel.guild) {
return logger.all(message.author.tag + " a envoyé un mp : " + message.content)
}
// For more details see /functions/messageCheck.js
msgcheck.general(message);
// Command trigger
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLocaleLowerCase();
if (!client.commands.has(command)) return;
try {
client.commands.get(command).execute(message, args);
logger.all(`🔨 ${message.author.tag} - \`${message}\``)
} catch (error) {
console.error(error);
}
});
client.on('guildMemberAdd', async member => {
try {
logger.all(`🆕 ${member.user.tag} vient d'arriver sur le serveur`);
// update user file
msgcheck.memberUpdate(member, "join");
} catch (err) { console.error(err); }
});
client.on('guildMemberRemove', async member => {
try {
logger.all(`${member.user.tag} vient de quitter le serveur`);
// update user file
msgcheck.memberUpdate(member, "left");
} catch (error) {
}
});
client.on('messageReactionAdd', (reaction, user) => {
rolereact.give(reaction, user);
});
client.on('messageReactionRemove', (reaction, user) => {
rolereact.remove(reaction, user);
});
client.login(token);

1
node_modules/.bin/color-support generated vendored Symbolic link
View file

@ -0,0 +1 @@
../color-support/bin.js

1
node_modules/.bin/detect-libc generated vendored Symbolic link
View file

@ -0,0 +1 @@
../detect-libc/bin/detect-libc.js

17
node_modules/.bin/detect-libc.cmd generated vendored Normal file
View file

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\detect-libc\bin\detect-libc.js" %*

28
node_modules/.bin/detect-libc.ps1 generated vendored Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args
} else {
& "$basedir/node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args
} else {
& "node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

1
node_modules/.bin/mkdirp generated vendored Symbolic link
View file

@ -0,0 +1 @@
../mkdirp/bin/cmd.js

17
node_modules/.bin/mkdirp.cmd generated vendored Normal file
View file

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*

28
node_modules/.bin/mkdirp.ps1 generated vendored Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
} else {
& "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
} else {
& "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

17
node_modules/.bin/needle.cmd generated vendored Normal file
View file

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\needle\bin\needle" %*

28
node_modules/.bin/needle.ps1 generated vendored Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../needle/bin/needle" $args
} else {
& "$basedir/node$exe" "$basedir/../needle/bin/needle" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../needle/bin/needle" $args
} else {
& "node$exe" "$basedir/../needle/bin/needle" $args
}
$ret=$LASTEXITCODE
}
exit $ret

1
node_modules/.bin/node-pre-gyp generated vendored Symbolic link
View file

@ -0,0 +1 @@
../@mapbox/node-pre-gyp/bin/node-pre-gyp

17
node_modules/.bin/node-pre-gyp.cmd generated vendored Normal file
View file

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\node-pre-gyp\bin\node-pre-gyp" %*

28
node_modules/.bin/node-pre-gyp.ps1 generated vendored Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../node-pre-gyp/bin/node-pre-gyp" $args
} else {
& "$basedir/node$exe" "$basedir/../node-pre-gyp/bin/node-pre-gyp" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../node-pre-gyp/bin/node-pre-gyp" $args
} else {
& "node$exe" "$basedir/../node-pre-gyp/bin/node-pre-gyp" $args
}
$ret=$LASTEXITCODE
}
exit $ret

1
node_modules/.bin/nopt generated vendored Symbolic link
View file

@ -0,0 +1 @@
../nopt/bin/nopt.js

17
node_modules/.bin/nopt.cmd generated vendored Normal file
View file

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nopt\bin\nopt.js" %*

28
node_modules/.bin/nopt.ps1 generated vendored Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
} else {
& "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../nopt/bin/nopt.js" $args
} else {
& "node$exe" "$basedir/../nopt/bin/nopt.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

1
node_modules/.bin/npm generated vendored Symbolic link
View file

@ -0,0 +1 @@
../npm/bin/npm-cli.js

17
node_modules/.bin/npm.cmd generated vendored Normal file
View file

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\npm\bin\npm-cli.js" %*

28
node_modules/.bin/npm.ps1 generated vendored Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../npm/bin/npm-cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../npm/bin/npm-cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../npm/bin/npm-cli.js" $args
} else {
& "node$exe" "$basedir/../npm/bin/npm-cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

1
node_modules/.bin/npx generated vendored Symbolic link
View file

@ -0,0 +1 @@
../npm/bin/npx-cli.js

17
node_modules/.bin/npx.cmd generated vendored Normal file
View file

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\npm\bin\npx-cli.js" %*

28
node_modules/.bin/npx.ps1 generated vendored Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../npm/bin/npx-cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../npm/bin/npx-cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../npm/bin/npx-cli.js" $args
} else {
& "node$exe" "$basedir/../npm/bin/npx-cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

17
node_modules/.bin/rc.cmd generated vendored Normal file
View file

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rc\cli.js" %*

28
node_modules/.bin/rc.ps1 generated vendored Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../rc/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../rc/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../rc/cli.js" $args
} else {
& "node$exe" "$basedir/../rc/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

1
node_modules/.bin/rimraf generated vendored Symbolic link
View file

@ -0,0 +1 @@
../rimraf/bin.js

17
node_modules/.bin/rimraf.cmd generated vendored Normal file
View file

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\bin.js" %*

28
node_modules/.bin/rimraf.ps1 generated vendored Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
} else {
& "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../rimraf/bin.js" $args
} else {
& "node$exe" "$basedir/../rimraf/bin.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

1
node_modules/.bin/semver generated vendored Symbolic link
View file

@ -0,0 +1 @@
../semver/bin/semver.js

17
node_modules/.bin/semver.cmd generated vendored Normal file
View file

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver" %*

28
node_modules/.bin/semver.ps1 generated vendored Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args
} else {
& "$basedir/node$exe" "$basedir/../semver/bin/semver" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../semver/bin/semver" $args
} else {
& "node$exe" "$basedir/../semver/bin/semver" $args
}
$ret=$LASTEXITCODE
}
exit $ret

3334
node_modules/.package-lock.json generated vendored Normal file

File diff suppressed because it is too large Load diff

190
node_modules/@discordjs/collection/LICENSE generated vendored Normal file
View file

@ -0,0 +1,190 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each