From bd2093b55a5b731d995dd0a7b64c1f89444420b1 Mon Sep 17 00:00:00 2001 From: Prince527 Date: Sat, 27 Jan 2024 09:18:24 -0400 Subject: [PATCH] Removed 4 packages - Replaced figlet and sourcebin_js with a local version - Updated many pacakges to their latest - Fixed all GuildCreate events - Fixed guild logs - Switched twemoji package - Updated slash commands descriptions --- SlashCommands/context/Ascii.js | 13 +- SlashCommands/extra/anime.js | 2 +- SlashCommands/extra/codebin.js | 109 ++-- SlashCommands/game/tictactoe.js | 2 +- SlashCommands/music/loop.js | 2 +- SlashCommands/music/play.js | 2 +- SlashCommands/music/queue.js | 2 +- SlashCommands/music/shuffle.js | 2 +- SlashCommands/music/volume.js | 2 +- SlashCommands/utils/customCommands.js | 10 +- SlashCommands/utils/poll.js | 24 +- SlashCommands/utils/role-color.js | 22 +- SlashCommands/utils/suggest.js | 2 +- assets/api/ascii/index.js | 672 ++++++++++++++++++++++++ assets/api/mee6/index.js | 2 + assets/api/sourcebin/languages.json | 714 ++++++++++++++++++++++++++ commands/extra/ascii.js | 4 +- commands/extra/emoji-img.js | 2 +- events/botLogs.js | 25 - events/botmessage.js | 48 -- events/guildCreate.js | 9 + events/guildCreate/guildlog.js | 22 + events/guildCreate/message.js | 22 + events/guildCreate/xp.js | 28 + events/guildDelete/blacklistWords.js | 8 - events/guildDelete/guildLogs.js | 3 +- events/messageCreate.js | 2 +- package-lock.json | 567 ++++++++++---------- package.json | 16 +- 29 files changed, 1892 insertions(+), 446 deletions(-) create mode 100644 assets/api/ascii/index.js create mode 100644 assets/api/sourcebin/languages.json delete mode 100644 events/botLogs.js delete mode 100644 events/botmessage.js create mode 100644 events/guildCreate.js create mode 100644 events/guildCreate/guildlog.js create mode 100644 events/guildCreate/message.js create mode 100644 events/guildCreate/xp.js delete mode 100644 events/guildDelete/blacklistWords.js diff --git a/SlashCommands/context/Ascii.js b/SlashCommands/context/Ascii.js index 67bd84f..cf43434 100644 --- a/SlashCommands/context/Ascii.js +++ b/SlashCommands/context/Ascii.js @@ -1,5 +1,5 @@ const { Client, CommandInteraction, ApplicationCommandType } = require("discord.js"); -const figlet = require("figlet"); +const { stringToAscii } = require("../../assets/api/ascii"); module.exports = { name: "Ascii", @@ -13,15 +13,8 @@ module.exports = { run: async (client, interaction, args) => { const msg = await interaction.channel.messages.fetch(interaction.targetId); - figlet.text( - `${msg.content}`, - { - font: "Standard" - }, - async (err, data) => { - interaction.followUp({ content: `\`\`\`${data.slice(0, 1975)}\`\`\`` }); - } - ); + const ascii = stringToAscii(msg.content); + interaction.followUp({ content: `\`\`\`${ascii.slice(0, 1975)}\`\`\`` }); }, }; diff --git a/SlashCommands/extra/anime.js b/SlashCommands/extra/anime.js index 6bafbc5..2c5814c 100644 --- a/SlashCommands/extra/anime.js +++ b/SlashCommands/extra/anime.js @@ -7,7 +7,7 @@ module.exports = { options: [ { name: 'category', - description: "which action do you want", + description: "Specify the action you want to perform.", required: true, type: ApplicationCommandOptionType.String, choices: [ diff --git a/SlashCommands/extra/codebin.js b/SlashCommands/extra/codebin.js index f06500e..02735a2 100644 --- a/SlashCommands/extra/codebin.js +++ b/SlashCommands/extra/codebin.js @@ -1,5 +1,5 @@ const { Client, CommandInteraction, EmbedBuilder, ApplicationCommandType, ApplicationCommandOptionType } = require("discord.js"); -const sourcebin = require("sourcebin_js"); +const languages = require("../../assets/api/sourcebin/languages.json"); module.exports = { name: "codebin", @@ -8,56 +8,56 @@ module.exports = { options: [{ type: ApplicationCommandOptionType.String, name: "title", - description: "What is the name of the source?", + description: "Enter the name of the source.", required: true }, { type: ApplicationCommandOptionType.String, name: "language", - description: "What is the language in the source?", + description: "Specify the language used in the source.", required: true, choices: [{ name: "None", - value: "NONE" + value: "text" }, { name: "JavaScript", - value: "JavaScript" + value: "javascript" }, { name: "HTML", - value: "HTML" + value: "html" }, { name: "Python", - value: "Python" + value: "python" }, { name: "Java", - value: "Java" + value: "java" }, { name: "CSS", - value: "CSS" + value: "css" }, { name: "SVG", - value: "SVG" + value: "svg" }, { name: "C#", - value: "C#" + value: "c#" }, { name: "XML", - value: "XML" + value: "xml" } ] }, { type: ApplicationCommandOptionType.String, name: "code", - description: "What's the source?", + description: "Provide the source code or text to be stored and shared.", required: true } ], @@ -73,33 +73,62 @@ module.exports = { const content = interaction.options.getString("code"); const title = interaction.options.getString("title"); - sourcebin - .create( - [{ - name: `Made By ${interaction.user.username}`, - content: content, - languageId: language - }], { - title: title - } - ) - .then((src) => { - interaction.followUp({ - content: src.url, - embeds: [ - new EmbedBuilder() - .setTitle("Sourcebin") - .setColor("Random") - .setDescription(`Code:\n\`\`\`js\n${Content}\n\`\`\``) - ], - ephemeral: true - }); - }) - .catch((e) => { - interaction.followUp({ - content: "Error, try again later", - ephemeral: true - }); + try { + const codebin = await (await fetch("https://sourceb.in/api/bins", { + method: "POST", + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + title: `Made By ${interaction.user.username}`, + description: "", + files: [ + { + languageId: languages[language], + name: title, + content, + } + ] + }) + })).json(); + + interaction.followUp({ + content: `https://sourceb.in/${codebin.key}`, + embeds: [ + new EmbedBuilder() + .setTitle("Sourcebin") + .setColor("Random") + .setDescription(`Code:\n\`\`\`js\n${content}\n\`\`\``) + ], + ephemeral: true + }); + } catch(err) { + console.log(err) + + interaction.followUp({ + content: "Error, try again later", + ephemeral: true }); + } + + // sourcebin + // .create( + // [{ + // name: `Made By ${interaction.user.username}`, + // content: content, + // languageId: language + // }], { + // title: title + // } + // ) + // .then((src) => { + + // }) + // .catch((e) => { + // interaction.followUp({ + // content: "Error, try again later", + // ephemeral: true + // }); + // }); }, }; diff --git a/SlashCommands/game/tictactoe.js b/SlashCommands/game/tictactoe.js index b5629bc..8fd259d 100644 --- a/SlashCommands/game/tictactoe.js +++ b/SlashCommands/game/tictactoe.js @@ -8,7 +8,7 @@ module.exports = { options: [ { name: 'opponent', - description: 'Who you want to play with', + description: 'Specify who you want to play with.', type: ApplicationCommandOptionType.User, required: true } diff --git a/SlashCommands/music/loop.js b/SlashCommands/music/loop.js index 3659c24..3f6fc13 100644 --- a/SlashCommands/music/loop.js +++ b/SlashCommands/music/loop.js @@ -7,7 +7,7 @@ module.exports = { options: [{ name: "mode", type: ApplicationCommandOptionType.Integer, - description: "Loop type", + description: "Select the loop mode.", required: true, choices: [{ name: "Off", diff --git a/SlashCommands/music/play.js b/SlashCommands/music/play.js index 8f7b300..794ac88 100644 --- a/SlashCommands/music/play.js +++ b/SlashCommands/music/play.js @@ -7,7 +7,7 @@ module.exports = { options: [ { name: "songtitle", - description: "title of the song", + description: "Title of the song.", type: ApplicationCommandOptionType.String, required: true, } diff --git a/SlashCommands/music/queue.js b/SlashCommands/music/queue.js index 7c39a74..f2d3d64 100644 --- a/SlashCommands/music/queue.js +++ b/SlashCommands/music/queue.js @@ -6,7 +6,7 @@ module.exports = { type: ApplicationCommandType.ChatInput, options: [{ name: "page", - description: "the page of the queue to display", + description: "The page of the queue to display.", type: ApplicationCommandOptionType.Integer, required: false, }], diff --git a/SlashCommands/music/shuffle.js b/SlashCommands/music/shuffle.js index d0a29f3..654290c 100644 --- a/SlashCommands/music/shuffle.js +++ b/SlashCommands/music/shuffle.js @@ -7,7 +7,7 @@ module.exports = { type: ApplicationCommandType.ChatInput, options: [{ name: "mode", - description: "Shuffle type", + description: "Specify the shuffle mode.", type: ApplicationCommandOptionType.Boolean, required: true }], diff --git a/SlashCommands/music/volume.js b/SlashCommands/music/volume.js index 48a9ba1..dfc26fe 100644 --- a/SlashCommands/music/volume.js +++ b/SlashCommands/music/volume.js @@ -7,7 +7,7 @@ module.exports = { type: ApplicationCommandType.ChatInput, options: [{ name: "percentage", - description: "percentage to change the volume to", + description: "Specify the percentage to which you want to change the volume.", type: ApplicationCommandOptionType.Integer, required: false, }], diff --git a/SlashCommands/utils/customCommands.js b/SlashCommands/utils/customCommands.js index 069cff8..e225aa8 100644 --- a/SlashCommands/utils/customCommands.js +++ b/SlashCommands/utils/customCommands.js @@ -9,18 +9,18 @@ module.exports = { options: [ { name: "create", - description: "create a custom command", + description: "Create a custom command.", type: ApplicationCommandOptionType.Subcommand, options: [ { name: "command", - description: "name of the custom command", + description: "Specify the name of the custom command.", type: ApplicationCommandOptionType.String, required: true }, { name: "response", - description: "response for this custom command", + description: "Provide the response for this custom command.", type: ApplicationCommandOptionType.String, required: true }, @@ -28,12 +28,12 @@ module.exports = { }, { name: "delete", - description: "remove a custom command", + description: "Remove a custom command.", type: ApplicationCommandOptionType.Subcommand, options: [ { name: "command", - description: "name of the custom command", + description: "Specify the name of the custom command to be removed.", type: ApplicationCommandOptionType.String, required: true }, diff --git a/SlashCommands/utils/poll.js b/SlashCommands/utils/poll.js index 0bcbf8a..00224e1 100644 --- a/SlashCommands/utils/poll.js +++ b/SlashCommands/utils/poll.js @@ -8,73 +8,73 @@ module.exports = { options: [ { name: 'title', - description: 'The title of poll', + description: 'The title of the poll.', type: ApplicationCommandOptionType.String, required: true, }, { name: 'choice1', - description: 'A choice', + description: 'Choices for the poll.', type: ApplicationCommandOptionType.String, required: true, }, { name: 'choice2', - description: 'A choice', + description: 'Choices for the poll.', type: ApplicationCommandOptionType.String, required: true, }, { name: 'choice3', - description: 'A choice', + description: 'Choices for the poll.', type: ApplicationCommandOptionType.String, required: false, }, { name: 'choice4', - description: 'A choice', + description: 'Choices for the poll.', type: ApplicationCommandOptionType.String, required: false, }, { name: 'choice5', - description: 'A choice', + description: 'Choices for the poll.', type: ApplicationCommandOptionType.String, required: false, }, { name: 'choice6', - description: 'A choice', + description: 'Choices for the poll.', type: ApplicationCommandOptionType.String, required: false, }, { name: 'choice7', - description: 'A choice', + description: 'Choices for the poll.', type: ApplicationCommandOptionType.String, required: false, }, { name: 'choice8', - description: 'A choice', + description: 'Choices for the poll.', type: ApplicationCommandOptionType.String, required: false, }, { name: 'choice9', - description: 'A choice', + description: 'Choices for the poll.', type: ApplicationCommandOptionType.String, required: false, }, { name: 'choice10', - description: 'A choice', + description: 'Choices for the poll.', type: ApplicationCommandOptionType.String, required: false, }, { name: 'destination', - description: 'The channel for the poll', + description: 'The channel where the poll will be created.', type: ApplicationCommandOptionType.Channel, required: false, channelTypes: [ChannelType.GuildText], diff --git a/SlashCommands/utils/role-color.js b/SlashCommands/utils/role-color.js index 7f1e708..fecc25c 100644 --- a/SlashCommands/utils/role-color.js +++ b/SlashCommands/utils/role-color.js @@ -4,59 +4,59 @@ const roleSchema = require("../../models/server/roles-colors"); module.exports = { name: "role-color", - description: "Create cool role colors.", + description: "Create and manage custom role colors.", type: ApplicationCommandType.ChatInput, options: [{ name: "create", - description: "create role color", + description: "Create a new custom role color.", type: ApplicationCommandOptionType.Subcommand, options: [{ name: "name", - description: "name of color", + description: "Name of the new custom role color.", type: ApplicationCommandOptionType.String, required: true }, { name: "color", - description: "color of role in hex", + description: "Hexadecimal color code for the new custom role color.", type: ApplicationCommandOptionType.String, required: true }], }, { name: "delete", - description: "remove role color", + description: "Delete an existing custom role color.", type: ApplicationCommandOptionType.Subcommand, options: [{ name: "name", - description: "name of color", + description: "Name of the custom role color to delete.", type: ApplicationCommandOptionType.String, required: true }], }, { name: "list", - description: "remove role color", + description: "List all available custom role colors.", type: ApplicationCommandOptionType.Subcommand, }, { name: "add", - description: "add a role color", + description: "Add a role color to yourself.", type: ApplicationCommandOptionType.Subcommand, options: [{ name: "name", - description: "name of color", + description: "Name of the custom role color to add.", type: ApplicationCommandOptionType.String, required: true }], }, { name: "remove", - description: "remove a role color", + description: "Remove a role color from yourself.", type: ApplicationCommandOptionType.Subcommand, options: [{ name: "name", - description: "name of color", + description: "Name of the custom role color to remove.", type: ApplicationCommandOptionType.String, required: true }], diff --git a/SlashCommands/utils/suggest.js b/SlashCommands/utils/suggest.js index 54f97cd..f2406c1 100644 --- a/SlashCommands/utils/suggest.js +++ b/SlashCommands/utils/suggest.js @@ -6,7 +6,7 @@ module.exports = { type: ApplicationCommandType.ChatInput, options: [{ name: "idea", - description: "What you want to suggest?", + description: "What do you want to suggest?", type: ApplicationCommandOptionType.String, required: true }], diff --git a/assets/api/ascii/index.js b/assets/api/ascii/index.js new file mode 100644 index 0000000..36413a6 --- /dev/null +++ b/assets/api/ascii/index.js @@ -0,0 +1,672 @@ +const font = { + 'A': [ + ' A ', + ' A A ', + 'AAAAA', + 'A A', + 'A A' + ], + 'B': [ + 'BBBB ', + 'B B', + 'BBBB ', + 'B B', + 'BBBB ' + ], + 'C': [ + ' CCC ', + 'C C', + 'C ', + 'C C', + ' CCC ' + ], + 'D': [ + 'DDD ', + 'D D ', + 'D D', + 'D D ', + 'DDD ' + ], + 'E': [ + 'EEEE ', + 'E ', + 'EEE ', + 'E ', + 'EEEE ' + ], + 'F': [ + 'FFFF ', + 'F ', + 'FFF ', + 'F ', + 'F ' + ], + 'G': [ + ' GGG ', + 'G G', + 'G GG', + 'G G', + ' GGG ' + ], + 'H': [ + 'H H', + 'H H', + 'HHHHH', + 'H H', + 'H H' + ], + 'I': [ + ' III ', + ' I ', + ' I ', + ' I ', + ' III ' + ], + 'J': [ + ' JJ', + ' J ', + ' J ', + 'J J ', + ' JJ ' + ], + 'K': [ + 'K K', + 'K K ', + 'KK ', + 'K K ', + 'K K' + ], + 'L': [ + 'L ', + 'L ', + 'L ', + 'L ', + 'LLLL ' + ], + 'M': [ + 'M M', + 'MM MM', + 'M M M', + 'M M', + 'M M' + ], + 'N': [ + 'N N', + 'NN N', + 'N N N', + 'N NN', + 'N N' + ], + 'O': [ + ' OOO ', + 'O O', + 'O O', + 'O O', + ' OOO ' + ], + 'P': [ + 'PPP ', + 'P P', + 'PPP ', + 'P ', + 'P ' + ], + 'Q': [ + ' QQQ ', + 'Q Q', + 'Q Q Q', + 'Q QQ', + ' QQQQ' + ], + 'R': [ + 'RRR ', + 'R R', + 'RRR ', + 'R R ', + 'R RR' + ], + 'S': [ + ' SSS ', + 'S ', + ' SSS ', + ' S', + 'SSS ' + ], + 'T': [ + 'TTTTT', + ' T ', + ' T ', + ' T ', + ' T ' + ], + 'U': [ + 'U U', + 'U U', + 'U U', + 'U U', + ' UUU ' + ], + 'V': [ + 'V V', + 'V V', + 'V V', + ' V V ', + ' V ' + ], + 'W': [ + 'W W', + 'W W W', + 'W W W', + 'W W W', + ' W W ' + ], + 'X': [ + 'X X', + ' X X ', + ' X ', + ' X X ', + 'X X' + ], + 'Y': [ + 'Y Y', + ' Y Y ', + ' Y ', + ' Y ', + ' Y ' + ], + 'Z': [ + 'ZZZZZ', + ' Z ', + ' Z ', + ' Z ', + 'ZZZZZ' + ], + 'a': [ + ' ', + ' ', + ' aaa ', + 'a a', + ' aaa ' + ], + 'b': [ + 'b ', + 'b ', + 'bbbb ', + 'b b', + 'bbbb ' + ], + 'c': [ + ' ', + ' ', + ' ccc ', + 'c ', + ' ccc ' + ], + 'd': [ + ' d', + ' d', + ' ddd ', + 'd d', + ' ddd ' + ], + 'e': [ + ' ', + ' ', + ' eee ', + 'eeee ', + ' eee ' + ], + 'f': [ + ' ff ', + ' f ', + 'fff ', + ' f ', + ' f ' + ], + 'g': [ + ' ', + ' ', + ' ggg ', + ' g', + ' ggg ' + ], + 'h': [ + 'h ', + 'h ', + 'hhhh ', + 'h h', + 'h h' + ], + 'i': [ + ' i ', + ' ', + ' ii ', + ' ii ', + ' iii ' + ], + 'j': [ + ' j ', + ' ', + ' jj ', + 'j j ', + ' jj ' + ], + 'k': [ + 'k ', + 'k k', + 'kkk ', + 'k k ', + 'k k' + ], + 'l': [ + ' ll ', + ' l ', + ' l ', + ' l ', + ' ll ' + ], + 'm': [ + ' ', + ' ', + 'mmmm ', + 'm m m', + 'm m' + ], + 'n': [ + ' ', + ' ', + 'nnnn ', + 'n n', + 'n n' + ], + 'o': [ + ' ', + ' ', + ' ooo ', + 'o o', + ' ooo ' + ], + 'p': [ + ' ', + ' ', + 'pppp ', + 'p p', + 'pppp ' + ], + 'q': [ + ' ', + ' ', + ' qqq ', + ' q ', + ' qqq' + ], + 'r': [ + ' ', + ' ', + ' rrr ', + ' r ', + ' r ' + ], + 's': [ + ' ', + ' ', + ' sss ', + ' s', + ' sss ' + ], + 't': [ + ' t ', + ' t ', + 'tttt ', + ' t ', + ' tt ' + ], + 'u': [ + ' ', + ' ', + 'uuuu ', + 'u u', + ' uuu ' + ], + 'v': [ + ' ', + ' ', + 'v v', + 'v v', + ' v v ' + ], + 'w': [ + ' ', + ' ', + 'w w', + 'w w w', + 'w w' + ], + 'x': [ + ' ', + ' ', + 'x x', + ' x x ', + 'x x' + ], + 'y': [ + ' ', + ' ', + 'yyyy ', + ' y ', + ' yyy ' + ], + 'z': [ + ' ', + ' ', + 'zzzzz', + ' z ', + 'zzzzz' + ], + ' ': [ + ' ', + ' ', + ' ', + ' ', + ' ' + ], + '0': [ + ' 000 ', + '0 0', + '0 0', + '0 0', + ' 000 ' + ], + '1': [ + ' 11 ', + ' 1 ', + ' 1 ', + ' 1 ', + '1111 ' + ], + '2': [ + ' 222 ', + '2 2', + ' 2 ', + ' 2 ', + '22222' + ], + '3': [ + '3333 ', + ' 3', + ' 333 ', + ' 3', + '3333 ' + ], + '4': [ + '4 4', + '4 4', + '44444', + ' 4', + ' 4' + ], + '5': [ + '55555', + '5 ', + '5555 ', + ' 5', + '5555 ' + ], + '6': [ + ' 666 ', + '6 ', + '6666 ', + '6 6', + ' 666 ' + ], + '7': [ + '77777', + ' 7 ', + ' 7 ', + ' 7 ', + '7 ' + ], + '8': [ + ' 888 ', + '8 8', + ' 888 ', + '8 8', + ' 888 ' + ], + '9': [ + ' 999 ', + '9 9', + ' 9999', + ' 9', + ' 999 ' + ], + '!': [ + ' ! ', + ' ! ', + ' ! ', + ' ', + ' ! ', + ], + '@': [ + ' @@@ ', + '@ @', + '@ @@@', + '@@ @ ', + ' @@@@', + ], + '#': [ + ' # # ', + '#####', + ' # # ', + '#####', + ' # # ', + ], + '$': [ + ' $$$ ', + '$ $ ', + ' $$$ ', + ' $ $', + '$$$ ', + ], + '%': [ + '% %', + ' % ', + ' % ', + ' % ', + '% %', + ], + '^': [ + ' ^ ', + ' ^ ^ ', + '^ ^', + ' ', + ' ', + ], + '&': [ + ' && ', + '& & ', + ' &&& ', + '& & ', + ' && &', + ], + '*': [ + ' * * ', + ' * ', + '*****', + ' * ', + ' * * ', + ], + '(': [ + ' ( ', + ' ( ', + ' ( ', + ' ( ', + ' ( ', + ], + ')': [ + ' ) ', + ' ) ', + ' ) ', + ' ) ', + ' ) ', + ], + '-': [ + ' ', + ' ', + ' --- ', + ' ', + ' ', + ], + '_': [ + ' ', + ' ', + ' ', + ' ', + '____ ', + ], + '+': [ + ' ', + ' + ', + ' +++ ', + ' + ', + ' ', + ], + '=': [ + ' ', + '==== ', + ' ', + '==== ', + ' ', + ], + '[': [ + ' [[ ', + ' [ ', + ' [ ', + ' [ ', + ' [[ ', + ], + ']': [ + ' ]] ', + ' ] ', + ' ] ', + ' ] ', + ' ]] ', + ], + '{': [ + ' {{ ', + ' { ', + ' {{{ ', + ' { ', + ' {{ ', + ], + '}': [ + ' }} ', + ' } ', + ' }}}', + ' } ', + ' }} ', + ], + ';': [ + ' ', + ' ; ', + ' ', + ' ; ', + ' ; ', + ], + ':': [ + ' ', + ' : ', + ' ', + ' : ', + ' ', + ], + '\'': [ + ' \' ', + ' \' ', + ' ', + ' ', + ' ', + ], + '"': [ + ' " " ', + ' " " ', + ' ', + ' ', + ' ', + ], + ',': [ + ' ', + ' ', + ' ', + ' , ', + ' , ', + ], + '.': [ + ' ', + ' ', + ' ', + ' . ', + ' ', + ], + '/': [ + ' /', + ' / ', + ' / ', + ' / ', + '/ ', + ], + '<': [ + ' < ', + ' < ', + ' < ', + ' < ', + ' < ', + ], + '>': [ + ' > ', + ' > ', + ' > ', + ' > ', + ' > ', + ], + '?': [ + ' ??? ', + ' ?', + ' ?? ', + ' ', + ' ? ', + ], + '|': [ + ' | ', + ' | ', + ' | ', + ' | ', + ' | ', + ], + '\\': [ + '\\ ', + ' \\ ', + ' \\ ', + ' \\ ', + ' \\', + ] +}; + +function stringToAscii(message) { + let result = ''; + + for (let row = 0; row < 5; row++) { + for (let char of message) { + const charRepresentation = font[char] ? font[char][row] : '-'.repeat(6); + + result += charRepresentation + ' '; + } + result += '\n'; + } + + return result; +} + +module.exports = { + stringToAscii +} \ No newline at end of file diff --git a/assets/api/mee6/index.js b/assets/api/mee6/index.js index 807555b..79efa9d 100644 --- a/assets/api/mee6/index.js +++ b/assets/api/mee6/index.js @@ -1,6 +1,8 @@ module.exports = async(guild, limit = 1000, page = 0) => { const { players } = await (await fetch(`https://mee6.xyz/api/plugins/levels/leaderboard/${guild}?limit=${limit}&page=${page}`)).json(); + if (!players) return; + return players.map((user, index) => { const { id, level } = user; const [levelXp] = user.detailed_xp; diff --git a/assets/api/sourcebin/languages.json b/assets/api/sourcebin/languages.json new file mode 100644 index 0000000..1f42042 --- /dev/null +++ b/assets/api/sourcebin/languages.json @@ -0,0 +1,714 @@ +{ + "1c enterprise": 0, + "abap": 1, + "ags script": 2, + "ampl": 3, + "antlr": 4, + "api blueprint": 5, + "apl": 6, + "asn.1": 7, + "classic asp": 8, + "ats": 9, + "actionscript": 10, + "ada": 11, + "agda": 12, + "alloy": 13, + "alpine abuild": 14, + "ant build system": 15, + "apacheconf": 16, + "apex": 17, + "apollo guidance computer": 18, + "applescript": 19, + "arc": 20, + "asciidoc": 22, + "aspectj": 23, + "assembly": 24, + "augeas": 25, + "autohotkey": 26, + "autoit": 27, + "awk": 28, + "batchfile": 29, + "befunge": 30, + "bison": 31, + "bitbake": 32, + "blade": 33, + "blitzbasic": 34, + "blitzmax": 35, + "bluespec": 36, + "boo": 37, + "brainfuck": 38, + "brightscript": 39, + "zeek": 40, + "c": 41, + "c#": 42, + "c++": 43, + "c-objdump": 44, + "c2hs haskell": 45, + "clips": 46, + "cmake": 47, + "cobol": 48, + "collada": 49, + "css": 50, + "csv": 51, + "cap'n proto": 52, + "cartocss": 53, + "ceylon": 54, + "chapel": 55, + "charity": 56, + "chuck": 57, + "cirru": 58, + "clarion": 59, + "clean": 60, + "click": 61, + "clojure": 62, + "coffeescript": 63, + "coldfusion": 64, + "coldfusion cfc": 65, + "common lisp": 66, + "component pascal": 67, + "cool": 68, + "coq": 69, + "cpp-objdump": 70, + "creole": 71, + "crystal": 72, + "csound": 73, + "csound document": 74, + "csound score": 75, + "gherkin": 76, + "cuda": 77, + "cycript": 78, + "cython": 79, + "d": 80, + "d-objdump": 81, + "digital command language": 82, + "dm": 83, + "dns zone": 84, + "dtrace": 85, + "darcs patch": 86, + "dart": 87, + "diff": 88, + "dockerfile": 89, + "dogescript": 90, + "dylan": 91, + "e": 92, + "ecl": 93, + "eclipse": 94, + "ejs": 95, + "eq": 96, + "eagle": 97, + "ecere projects": 98, + "eiffel": 99, + "elixir": 100, + "elm": 101, + "emacs lisp": 102, + "emberscript": 103, + "erlang": 104, + "f#": 105, + "flux": 106, + "fortran": 107, + "factor": 108, + "fancy": 109, + "fantom": 110, + "filebench wml": 111, + "filterscript": 112, + "formatted": 113, + "forth": 114, + "freemarker": 115, + "frege": 116, + "g-code": 117, + "gams": 118, + "gap": 119, + "unix assembly": 120, + "gcc machine description": 121, + "gdb": 122, + "gdscript": 123, + "glsl": 124, + "game maker language": 125, + "genshi": 126, + "gentoo ebuild": 127, + "gentoo eclass": 128, + "gettext catalog": 129, + "glyph": 130, + "gnuplot": 131, + "go": 132, + "golo": 133, + "gosu": 134, + "grace": 135, + "gradle": 136, + "grammatical framework": 137, + "graph modeling language": 138, + "graphql": 139, + "graphviz (dot)": 140, + "roff": 141, + "groovy": 142, + "groovy server pages": 143, + "hcl": 144, + "hlsl": 145, + "html": 146, + "jinja": 147, + "html+ecr": 148, + "html+eex": 149, + "html+erb": 150, + "html+php": 151, + "http": 152, + "hack": 153, + "haml": 154, + "handlebars": 155, + "harbour": 156, + "haskell": 157, + "haxe": 158, + "hy": 159, + "hyphy": 160, + "idl": 161, + "igor pro": 162, + "ini": 163, + "irc log": 164, + "idris": 165, + "inform 7": 166, + "inno setup": 167, + "io": 168, + "ioke": 169, + "isabelle": 170, + "isabelle root": 171, + "j": 172, + "jflex": 173, + "json": 174, + "json5": 175, + "jsonld": 176, + "jsoniq": 177, + "pug": 179, + "jasmin": 180, + "java": 181, + "java server pages": 182, + "javascript": 183, + "julia": 184, + "jupyter notebook": 185, + "krl": 186, + "kicad layout": 187, + "kit": 188, + "kotlin": 189, + "lfe": 190, + "llvm": 191, + "lolcode": 192, + "lsl": 193, + "labview": 194, + "lasso": 195, + "latte": 196, + "lean": 197, + "less": 198, + "lex": 199, + "lilypond": 200, + "limbo": 201, + "linker script": 202, + "linux kernel module": 203, + "liquid": 204, + "literate agda": 205, + "literate coffeescript": 206, + "literate haskell": 207, + "livescript": 208, + "logos": 209, + "logtalk": 210, + "lookml": 211, + "loomscript": 212, + "lua": 213, + "m": 214, + "m4": 215, + "m4sugar": 216, + "maxscript": 217, + "mtml": 218, + "muf": 219, + "makefile": 220, + "mako": 221, + "markdown": 222, + "mask": 223, + "mathematica": 224, + "matlab": 225, + "maven pom": 226, + "max": 227, + "wikitext": 228, + "mercury": 229, + "metal": 230, + "minid": 231, + "mirah": 232, + "modelica": 233, + "modula-2": 234, + "module management system": 235, + "monkey": 236, + "moocode": 237, + "moonscript": 238, + "myghty": 239, + "ncl": 240, + "nl": 241, + "nsis": 242, + "nemerle": 243, + "netlinx": 244, + "netlinx+erb": 245, + "netlogo": 246, + "newlisp": 247, + "nginx": 248, + "nim": 249, + "ninja": 250, + "nit": 251, + "nix": 252, + "nu": 253, + "numpy": 254, + "ocaml": 255, + "objdump": 256, + "objective-c": 257, + "objective-c++": 258, + "objective-j": 259, + "omgrofl": 260, + "opa": 261, + "opal": 262, + "opencl": 263, + "openedge abl": 264, + "openrc runscript": 265, + "openscad": 266, + "org": 267, + "ox": 268, + "oxygene": 269, + "oz": 270, + "pawn": 271, + "php": 272, + "plsql": 273, + "plpgsql": 274, + "pov-ray sdl": 275, + "pan": 276, + "papyrus": 277, + "parrot": 278, + "parrot assembly": 279, + "parrot internal representation": 280, + "pascal": 281, + "perl": 282, + "raku": 283, + "pickle": 284, + "picolisp": 285, + "piglatin": 286, + "pike": 287, + "pod": 288, + "pogoscript": 289, + "pony": 290, + "postscript": 291, + "powerbuilder": 292, + "powershell": 293, + "processing": 294, + "prolog": 295, + "propeller spin": 296, + "protocol buffer": 297, + "public key": 298, + "puppet": 299, + "pure data": 300, + "purebasic": 301, + "purescript": 302, + "python": 303, + "python traceback": 304, + "qml": 305, + "qmake": 306, + "r": 307, + "raml": 308, + "rdoc": 309, + "realbasic": 310, + "rexx": 311, + "rmarkdown": 313, + "rpm spec": 314, + "runoff": 315, + "racket": 316, + "ragel": 317, + "raw token data": 318, + "rebol": 319, + "red": 320, + "redcode": 321, + "ren'py": 322, + "renderscript": 323, + "robotframework": 324, + "rouge": 325, + "ruby": 326, + "rust": 327, + "sas": 328, + "scss": 329, + "smt": 330, + "sparql": 331, + "sqf": 332, + "sql": 333, + "sqlpl": 334, + "srecode template": 335, + "ston": 336, + "svg": 337, + "sage": 338, + "saltstack": 339, + "sass": 340, + "scala": 341, + "scaml": 342, + "scheme": 343, + "scilab": 344, + "self": 345, + "shell": 346, + "shellsession": 347, + "shen": 348, + "slash": 349, + "slim": 350, + "smali": 351, + "smalltalk": 352, + "smarty": 353, + "sourcepawn": 354, + "squirrel": 355, + "stan": 356, + "standard ml": 357, + "stata": 358, + "stylus": 359, + "subrip text": 360, + "supercollider": 361, + "swift": 362, + "systemverilog": 363, + "tla": 364, + "toml": 365, + "txl": 366, + "tcl": 367, + "tcsh": 368, + "tex": 369, + "tea": 370, + "terra": 371, + "text": 372, + "textile": 373, + "thrift": 374, + "turing": 375, + "turtle": 376, + "twig": 377, + "typescript": 378, + "unified parallel c": 379, + "unity3d asset": 380, + "uno": 381, + "unrealscript": 382, + "urweb": 383, + "vcl": 384, + "vhdl": 385, + "vala": 386, + "verilog": 387, + "vim script": 388, + "visual basic .net": 389, + "volt": 390, + "vue": 391, + "wavefront material": 392, + "wavefront object": 393, + "web ontology language": 394, + "webidl": 395, + "world of warcraft addon data": 396, + "x10": 397, + "xc": 398, + "xml": 399, + "xpages": 400, + "xproc": 401, + "xquery": 402, + "xs": 403, + "xslt": 404, + "xojo": 405, + "xtend": 406, + "yaml": 407, + "yang": 408, + "yacc": 409, + "zephir": 410, + "zimpl": 411, + "desktop": 412, + "ec": 413, + "edn": 414, + "fish": 415, + "mupad": 416, + "nesc": 417, + "ooc": 418, + "restructuredtext": 419, + "wisp": 420, + "xbase": 421, + "ti program": 422, + "json with comments": 423, + "cson": 424, + "pic": 425, + "mql4": 426, + "mql5": 427, + "python console": 428, + "abnf": 429, + "ebnf": 430, + "ring": 431, + "miniyaml": 4896465, + "glimmer js": 5523150, + "basic": 28923963, + "cil": 29176339, + "macaulay2": 34167825, + "d2": 37531557, + "oasv3-yaml": 51239111, + "rich text format": 51601661, + "kerboscript": 59716426, + "ignore list": 74444240, + "xml property list": 75622871, + "vim snippet": 81265970, + "peg.js": 81442128, + "stringtemplate": 89855901, + "clarity": 91493841, + "tsx": 94901924, + "editorconfig": 96139566, + "futhark": 97358117, + "oasv2-yaml": 105187618, + "praat": 106029007, + "dotenv": 111148035, + "tl-verilog": 118656070, + "berry": 121855308, + "asl": 124996147, + "just": 128447695, + "webassembly interface type": 134534086, + "kicad legacy layout": 140848857, + "adobe font metrics": 147198098, + "snakemake": 151241392, + "browserslist": 153503348, + "openqasm": 153739399, + "pod 6": 155357471, + "smpl": 164123055, + "nasl": 171666519, + "rascal": 173616037, + "nasal": 178322513, + "altium designer": 187772328, + "directx 3d file": 201049282, + "objectscript": 202735509, + "motoko": 202937027, + "fluent": 206353404, + "x font directory index": 208700028, + "sieve": 208976687, + "soong": 222900098, + "xcompose": 225167241, + "kusto": 225697190, + "hosts file": 231021894, + "monkey c": 231751931, + "solidity": 237469032, + "yul": 237469033, + "fennel": 239946126, + "pyret": 252961827, + "gsc": 257856279, + "postcss": 262764437, + "cadence": 270184138, + "sway": 271471144, + "jison": 284531423, + "gaml": 290345951, + "velocity template language": 292377326, + "gn": 302957008, + "procfile": 305313959, + "gemini": 310828396, + "jcl": 316620079, + "reasonligo": 319002153, + "bicep": 321200902, + "codeowners": 321684729, + "f*": 336943375, + "easybuild": 342840477, + "edje data collection": 342840478, + "p4": 348895984, + "cue": 356063509, + "toit": 356554395, + "closure templates": 357046146, + "regular expression": 363378884, + "haproxy": 366607477, + "checksums": 372063053, + "opentype feature file": 374317347, + "wdl": 374521672, + "quake": 375265331, + "yasnippet": 378760102, + "mermaid": 385992043, + "2-dimensional array": 387204628, + "angelscript": 389477596, + "cap cds": 390788699, + "vba": 399230729, + "gerber image": 404627610, + "jison lex": 406395330, + "cloud firestore security rules": 407996372, + "vbscript": 408016005, + "conll-u": 421026389, + "codeql": 424259634, + "star": 424510560, + "gradle kotlin dsl": 432600901, + "denizenscript": 435000929, + "protocol buffer text format": 436568854, + "curry": 439829048, + "promela": 441858312, + "nushell": 446573572, + "jar manifest": 447261135, + "mlir": 448253929, + "aidl": 451700185, + "elvish transcript": 452025714, + "abap cds": 452681853, + "lean 4": 455147478, + "stl": 455361735, + "gedcom": 459577965, + "nunjucks": 461856962, + "git revision list": 461881235, + "mcfunction": 462488745, + "jetbrains mps": 465165328, + "freebasic": 472896659, + "muse": 474864066, + "motorola 68k assembly": 477582706, + "html+razor": 479039817, + "neon": 481192983, + "zenscript": 494938890, + "rez": 498022874, + "prisma": 499933428, + "rescript": 501875647, + "nextflow": 506780613, + "vim help file": 508563686, + "mdx": 512838272, + "mirc script": 517654727, + "java properties": 519377561, + "nearley": 521429430, + "debian package control file": 527438264, + "e-mail": 529653389, + "readline config": 538732839, + "valve data format": 544060961, + "beef": 545626333, + "ssh config": 554920715, + "openapi specification v3": 557959099, + "qt script": 558193693, + "sweave": 558779190, + "hoon": 560883276, + "asp.net": 564186416, + "modula-3": 564743864, + "elvish": 570996448, + "imagej macro": 575143428, + "4d": 577529595, + "astro": 578209015, + "asymptote": 591605007, + "routeros script": 592853203, + "openstep property list": 598917541, + "kakounescript": 603336474, + "v": 603371597, + "rpgle": 609977990, + "roff manpage": 612669833, + "xonsh": 614078284, + "scenic": 619814037, + "cairo": 620599567, + "kicad schematic": 622447435, + "faust": 622529198, + "wollok": 632745969, + "type language": 632765617, + "mustache": 638334590, + "move": 638334599, + "bluespec bh": 641580358, + "zig": 646424281, + "cweb": 657332628, + "webvtt": 658679714, + "al": 658971832, + "shaderlab": 664257356, + "jsonnet": 664885656, + "wget config": 668457123, + "robots.txt": 674736065, + "cabal config": 677095381, + "visual basic 6.0": 679594952, + "hocon": 679725279, + "npm config": 685022663, + "figlet font": 686129783, + "witcher script": 686821385, + "shellcheck config": 687511714, + "dircolors": 691605112, + "kickstart": 692635484, + "q#": 697448245, + "typst": 704730682, + "wren": 713580619, + "proguard": 716513858, + "ballerina": 720859680, + "option list": 723589315, + "nwscript": 731233819, + "simple file verification": 735623761, + "pddl": 736235603, + "godot resource": 738107771, + "pact": 756774415, + "lark": 758480799, + "fortran free form": 761352333, + "spline font database": 767169629, + "jest snapshot": 774635084, + "nanorc": 775996197, + "x pixmap": 781846279, + "x bitmap": 782911107, + "avro idl": 785497837, + "hxml": 786683730, + "genie": 792408528, + "dhall": 793969321, + "meson": 799141244, + "microsoft developer studio project": 800983837, + "yara": 805122868, + "git config": 807968997, + "kaitai struct": 818804755, + "sugarss": 826404698, + "cameligo": 829207807, + "portugol": 832391833, + "plantuml": 833504686, + "oasv2-json": 834374816, + "wgsl": 836605993, + "ink": 838252715, + "polar": 839112914, + "pep8": 840372442, + "open policy agent": 840483232, + "ecmarkup": 844766630, + "sed": 847830017, + "openapi specification v2": 848295328, + "microsoft visual studio solution": 849523096, + "cypher": 850806976, + "terraform template": 856832701, + "record jar": 865765202, + "reason": 869538413, + "riot": 878396783, + "selinux policy": 880010326, + "euphoria": 880693982, + "adblock filter list": 884614762, + "whiley": 888779559, + "odin": 889244082, + "slice": 894641667, + "rbs": 899227493, + "genero per": 902995658, + "jq": 905371884, + "gemfile.lock": 907065713, + "javascript+erb": 914318960, + "tsql": 918334941, + "edgeql": 925235833, + "holyc": 928121743, + "svelte": 928734530, + "hiveql": 931814087, + "marko": 932782397, + "go workspace": 934546256, + "cue sheet": 942714150, + "brighterscript": 943571030, + "go module": 947461016, + "win32 message file": 950967261, + "zap": 952972794, + "boogie": 955017407, + "git attributes": 956324166, + "webassembly": 956556503, + "talon": 959889508, + "starlark": 960266174, + "earthly": 963512632, + "mint": 968740319, + "dafny": 969323346, + "windows registry entries": 969674868, + "q": 970539067, + "kvlang": 970675279, + "zil": 973483626, + "dataweave": 974514097, + "oasv3-json": 980062566, + "textmate properties": 981795023, + "bibtex": 982188347, + "object data instance notation": 985227236, + "genero 4gl": 986054050, + "singularity": 987024632, + "texinfo": 988020015, + "common workflow language": 988547172, + "curl config": 992375436, + "glyph bitmap distribution format": 997665271, + "jolie": 998078858, + "ltspice symbol": 1013566805, + "redirect rules": 1020148948, + "smithy": 1027892786, + "janet": 1028705371, + "rpc": 1031374237, + "tsv": 1035892117, + "ligolang": 1040646257, + "circom": 1042332086, + "gleam": 1054258749, + "go checksums": 1054391671, + "bikeshed": 1055528081, + "vyper": 1055641948, + "imba": 1057618448, + "swig": 1066250075, + "antlers": 1067292663 +} \ No newline at end of file diff --git a/commands/extra/ascii.js b/commands/extra/ascii.js index 9b4b228..e456e6d 100644 --- a/commands/extra/ascii.js +++ b/commands/extra/ascii.js @@ -1,5 +1,5 @@ +const { stringToAscii } = require('../../assets/api/ascii'); const { Message, Client } = require('discord.js'); -const figlet = require('figlet'); module.exports = { name: 'ascii', @@ -16,7 +16,7 @@ module.exports = { if (!args.length) return message.reply("Please specify some text to ascii.") try { - const text = await figlet.text(args.join(" "), { font: "" }); + const text = stringToAscii(args.join(" ")); message.channel.send(`\`\`\`${text.slice(0, 1980)}\`\`\``); } catch (err) { diff --git a/commands/extra/emoji-img.js b/commands/extra/emoji-img.js index 738f39a..c52a158 100644 --- a/commands/extra/emoji-img.js +++ b/commands/extra/emoji-img.js @@ -2,7 +2,7 @@ const { createCanvas, loadImage } = require("@napi-rs/canvas"); const { nearestColor } = require("../../assets/api/color"); const { isImageUrl } = require("../../assets/api/url"); const { Message, Client } = require("discord.js"); -const twemoji = require('twemoji'); +const twemoji = require('@twemoji/api'); module.exports = { name: 'emoji-img', diff --git a/events/botLogs.js b/events/botLogs.js deleted file mode 100644 index b2fa89e..0000000 --- a/events/botLogs.js +++ /dev/null @@ -1,25 +0,0 @@ -const { WebhookClient, EmbedBuilder, Events } = require('discord.js'); -const client = require('../index'); - -client.on(Events.GuildCreate, async(guild) => { - - const owner = await guild.fetchOwner(); - - new WebhookClient({ url: client.config.channel.webhooks.guildlogs }).send({ - embeds: [ - new EmbedBuilder() - .setColor("#39ff14") - .setTitle('New Server') - .addFields( - { name: 'Name', value: guild.name, inline: true }, - { name: 'Guild ID', value: guild.id, inline: true }, - { name: 'Owner', value: owner.user.username, inline: true }, - { name: 'Owner ID', value: owner.user.id, inline: true }, - { name: 'Users', value: guild.members.cache.size, inline: true }, - ) - .setFooter({ text: `Guilds: ${client.guilds.cache.size}` }) - .setThumbnail(guild.iconURL()) - ] - }) - -}) diff --git a/events/botmessage.js b/events/botmessage.js deleted file mode 100644 index 65a8e4c..0000000 --- a/events/botmessage.js +++ /dev/null @@ -1,48 +0,0 @@ -const { createUser, setLevel } = require("../assets/api/xp"); -const { EmbedBuilder, Events } = require('discord.js'); -const getLeaderboard = require("../assets/api/mee6"); -const xpSchema = require('../models/server/xp'); -const client = require('../index'); - -client.on(Events.GuildCreate, async(guild) => { - let channelToSend; - guild.channels.cache.forEach((channel) => channel.type === "GUILD_TEXT" && !channelToSend && channel.permissionsFor(guild.me).has("SEND_MESSAGES") ? channelToSend = channel : null); - if (!channelToSend) return; - - channelToSend.send({ - embeds: [ - new EmbedBuilder() - .setColor("Random") - .setAuthor({ name: guild.name, iconURL: guild.iconURL({ dynamic: true }) }) - .setDescription(`Thanks for inviting ${client.user.username} to your server!\nThe bot prefix is \`${client.config.bot.info.prefix}\` and for the list of commands do \`${client.config.bot.info.prefix}help\``) - .addFields([ - { name: "TERMS OF SERVICE", value: "By inviting this bot you accept that I can log all data in your server and users." }, - { name: "ALPHA", value: "This bot is in alpha so stuff will change." }, - ]) - .setTimestamp() - ] - }); - - const xpData = await xpSchema.findOne({ Guild: guild.id }); - if (xpData) return; - - await xpSchema.create({ - Guild: guild.id, - Channel: "false", - Ping: false, - WebUI: true, - Rate: 6, - }); - - const mee6Data = await getLeaderboard(guild.id); - if (mee6Data?.error || !mee6Data) return; - - for (let index = 0; index < mee6Data.length; index++) { - const element = mee6Data[index]; - - await createUser(element.id, message.guild.id); - if (element.level >= 1) await setLevel(element.id, message.guild.id, element.level); - // if (element.xp >= 1) await Levels.appendXp(element.id, message.guild.id, element.xp); - } - -}); diff --git a/events/guildCreate.js b/events/guildCreate.js new file mode 100644 index 0000000..a9c5152 --- /dev/null +++ b/events/guildCreate.js @@ -0,0 +1,9 @@ +const { Events } = require("discord.js"); +const client = require('../index'); + +const { getFileList } = require("../assets/api/file"); + +client.on(Events.GuildCreate, async(guild) => { + const eventFiles = await getFileList(`${process.cwd()}/events/guildCreate`, { type: ".js", recursively: false }); + eventFiles.map((value) => require(value)(guild)); +}); diff --git a/events/guildCreate/guildlog.js b/events/guildCreate/guildlog.js new file mode 100644 index 0000000..0016bde --- /dev/null +++ b/events/guildCreate/guildlog.js @@ -0,0 +1,22 @@ +const { WebhookClient, EmbedBuilder } = require('discord.js'); +const client = require("../../index"); + +module.exports = async(guild) => { + const owner = await guild.fetchOwner(); + + new WebhookClient({ url: client.config.channel.webhooks.guildlogs }).send({ + embeds: [ + new EmbedBuilder() + .setColor("#39ff14") + .setTitle('New Server') + .addFields( + { name: 'Name', value: guild.name, inline: true }, + { name: 'Guild ID', value: guild.id, inline: true }, + { name: 'Owner', value: owner.user.username, inline: true }, + { name: 'Owner ID', value: owner.user.id, inline: true }, + ) + .setFooter({ text: `Guilds: ${client.guilds.cache.size}` }) + .setThumbnail(guild.iconURL()) + ] + }); +} \ No newline at end of file diff --git a/events/guildCreate/message.js b/events/guildCreate/message.js new file mode 100644 index 0000000..3195a95 --- /dev/null +++ b/events/guildCreate/message.js @@ -0,0 +1,22 @@ +const { EmbedBuilder, ChannelType, PermissionFlagsBits } = require('discord.js'); +const client = require("../../index"); + +module.exports = async(guild) => { + let channelToSend; + guild.channels.cache.forEach((channel) => channel.type === ChannelType.GuildText && !channelToSend && channel.permissionsFor(guild.members.me).has(PermissionFlagsBits.SendMessages) ? channelToSend = channel : null); + if (!channelToSend) return; + + channelToSend.send({ + embeds: [ + new EmbedBuilder() + .setColor("Random") + .setAuthor({ name: guild.name, iconURL: guild.iconURL({ dynamic: true }) }) + .setDescription(`Thank you for inviting ${client.user.username} to your server!\n\`\`\`js\nPrefix: ${client.config.bot.info.prefix}\nHelp: ${client.config.bot.info.prefix}help\`\`\`\n`) + .addFields([ + { name: "TERMS OF SERVICE", value: "By inviting this bot, you accept that all data in your server and users may be logged." }, + { name: "ALPHA", value: "This bot is in alpha, so expect changes and updates." }, + ]) + .setTimestamp() + ] + }); +} \ No newline at end of file diff --git a/events/guildCreate/xp.js b/events/guildCreate/xp.js new file mode 100644 index 0000000..9110762 --- /dev/null +++ b/events/guildCreate/xp.js @@ -0,0 +1,28 @@ +const { createUser, setLevel } = require("../../assets/api/xp"); +const getLeaderboard = require("../../assets/api/mee6"); +const xpSchema = require('../../models/server/xp'); +const client = require("../../index"); + +module.exports = async(guild) => { + const xpData = await xpSchema.findOne({ Guild: guild.id }); + if (xpData) return; + + await xpSchema.create({ + Guild: guild.id, + Channel: "false", + Ping: false, + WebUI: true, + Rate: 6, + }); + + const mee6Data = await getLeaderboard(guild.id); + if (mee6Data?.error || !mee6Data) return; + + for (let index = 0; index < mee6Data.length; index++) { + const element = mee6Data[index]; + + await createUser(element.id, message.guild.id); + if (element.level >= 1) await setLevel(element.id, message.guild.id, element.level); + // if (element.xp >= 1) await Levels.appendXp(element.id, message.guild.id, element.xp); + } +} \ No newline at end of file diff --git a/events/guildDelete/blacklistWords.js b/events/guildDelete/blacklistWords.js deleted file mode 100644 index f3c9d86..0000000 --- a/events/guildDelete/blacklistWords.js +++ /dev/null @@ -1,8 +0,0 @@ -const blackWordsSchema = require('../../models/moderator/blackwords'); -const client = require("../../index"); - -module.exports = async(guild) => { - const blackWordsData = await blackWordsSchema.findOne({ Guild: guild.id }); - - if (blackWordsData) await blackWordsData.deleteOne(); -} \ No newline at end of file diff --git a/events/guildDelete/guildLogs.js b/events/guildDelete/guildLogs.js index 3789ebf..b673c5d 100644 --- a/events/guildDelete/guildLogs.js +++ b/events/guildDelete/guildLogs.js @@ -14,10 +14,9 @@ module.exports = async(guild) => { { name: 'Guild ID', value: guild.id, inline: true }, { name: 'Owner', value: owner.user.username, inline: true }, { name: 'Owner ID', value: owner.user.id, inline: true }, - { name: 'Users', value: guild.members.cache.size, inline: true }, ) .setFooter({ text: `Guilds: ${client.guilds.cache.size}` }) .setThumbnail(guild.iconURL()) ] - }) + }); } \ No newline at end of file diff --git a/events/messageCreate.js b/events/messageCreate.js index 60e3675..52a25f9 100644 --- a/events/messageCreate.js +++ b/events/messageCreate.js @@ -31,7 +31,7 @@ client.on(Events.MessageCreate, async (message) => { const userData = await userSchema.findOne({ User: message.author.id }).exec(); if (userData) { userData.CmdUsed = `${Number(userData.CmdUsed) + 1}`; - + await userData.save(); } else userSchema.create({ User: message.author.id, diff --git a/package-lock.json b/package-lock.json index 64d5312..dd5c15f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,25 +10,21 @@ "license": "ISC", "dependencies": { "@iamtraction/google-translate": "2.0.1", - "@napi-rs/canvas": "0.1.43", + "@napi-rs/canvas": "^0.1.44", + "@twemoji/api": "^15.0.3", "aki-api": "^6.0.9", - "connect-mongo": "^5.0.0", + "connect-mongo": "^5.1.0", "discord-gamecord": "2.1.0", - "discord.js": "14.12.1", + "discord.js": "^14.14.1", "ejs": "^3.1.9", "express": "4.18.2", "express-session": "^1.17.3", - "figlet": "^1.6.0", - "json-bigint": "^1.0.0", - "mongodb": "^5.4.0", - "mongoose": "7.4.3", - "passport": "^0.6.0", + "mongoose": "^8.1.1", + "passport": "^0.7.0", "passport-discord": "^0.1.4", "poru": "^4.2.1", - "sourcebin_js": "^0.0.3-ignore", "table": "6.8.1", "tinyld": "^1.3.4", - "twemoji": "^14.0.2", "typescript": "4.9.4", "ytdl-core": "4.11.5" }, @@ -37,27 +33,22 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.5.tgz", - "integrity": "sha512-SdweyCs/+mHj+PNhGLLle7RrRFX9ZAhzynHahMCLqp5Zeq7np7XC6/mgzHc79QoVlQ1zZtOkTTiJpOZu5V8Ufg==", - "dependencies": { - "@discordjs/formatters": "^0.3.2", - "@discordjs/util": "^1.0.1", - "@sapphire/shapeshift": "^3.9.2", - "discord-api-types": "0.37.50", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.7.0.tgz", + "integrity": "sha512-GDtbKMkg433cOZur8Dv6c25EHxduNIBsxeHrsRoIM8+AwmEZ8r0tEpckx/sHwTLwQPOF3e2JWloZh9ofCaMfAw==", + "dependencies": { + "@discordjs/formatters": "^0.3.3", + "@discordjs/util": "^1.0.2", + "@sapphire/shapeshift": "^3.9.3", + "discord-api-types": "0.37.61", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.3", - "tslib": "^2.6.1" + "tslib": "^2.6.2" }, "engines": { "node": ">=16.11.0" } }, - "node_modules/@discordjs/builders/node_modules/discord-api-types": { - "version": "0.37.50", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz", - "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==" - }, "node_modules/@discordjs/collection": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", @@ -67,76 +58,85 @@ } }, "node_modules/@discordjs/formatters": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.2.tgz", - "integrity": "sha512-lE++JZK8LSSDRM5nLjhuvWhGuKiXqu+JZ/DsOR89DVVia3z9fdCJVcHF2W/1Zxgq0re7kCzmAJlCMMX3tetKpA==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.3.tgz", + "integrity": "sha512-wTcI1Q5cps1eSGhl6+6AzzZkBBlVrBdc9IUhJbijRgVjCNIIIZPgqnUj3ntFODsHrdbGU8BEG9XmDQmgEEYn3w==", "dependencies": { - "discord-api-types": "0.37.50" + "discord-api-types": "0.37.61" }, "engines": { "node": ">=16.11.0" } }, - "node_modules/@discordjs/formatters/node_modules/discord-api-types": { - "version": "0.37.50", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz", - "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==" - }, "node_modules/@discordjs/rest": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.0.1.tgz", - "integrity": "sha512-/eWAdDRvwX/rIE2tuQUmKaxmWeHmGealttIzGzlYfI4+a7y9b6ZoMp8BG/jaohs8D8iEnCNYaZiOFLVFLQb8Zg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.2.0.tgz", + "integrity": "sha512-nXm9wT8oqrYFRMEqTXQx9DUTeEtXUDMmnUKIhZn6O2EeDY9VCdwj23XCPq7fkqMPKdF7ldAfeVKyxxFdbZl59A==", "dependencies": { - "@discordjs/collection": "^1.5.3", - "@discordjs/util": "^1.0.1", + "@discordjs/collection": "^2.0.0", + "@discordjs/util": "^1.0.2", "@sapphire/async-queue": "^1.5.0", "@sapphire/snowflake": "^3.5.1", "@vladfrangu/async_event_emitter": "^2.2.2", - "discord-api-types": "0.37.50", - "magic-bytes.js": "^1.0.15", - "tslib": "^2.6.1", - "undici": "5.22.1" + "discord-api-types": "0.37.61", + "magic-bytes.js": "^1.5.0", + "tslib": "^2.6.2", + "undici": "5.27.2" }, "engines": { "node": ">=16.11.0" } }, - "node_modules/@discordjs/rest/node_modules/discord-api-types": { - "version": "0.37.50", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz", - "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==" + "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz", + "integrity": "sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==", + "engines": { + "node": ">=18" + } }, "node_modules/@discordjs/util": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.1.tgz", - "integrity": "sha512-d0N2yCxB8r4bn00/hvFZwM7goDcUhtViC5un4hPj73Ba4yrChLSJD8fy7Ps5jpTLg1fE9n4K0xBLc1y9WGwSsA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.2.tgz", + "integrity": "sha512-IRNbimrmfb75GMNEjyznqM1tkI7HrZOf14njX7tCAAUetyZM1Pr8hX/EK2lxBCOgWDRmigbp24fD1hdMfQK5lw==", "engines": { "node": ">=16.11.0" } }, "node_modules/@discordjs/ws": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.1.tgz", - "integrity": "sha512-avvAolBqN3yrSvdBPcJ/0j2g42ABzrv3PEL76e3YTp2WYMGH7cuspkjfSyNWaqYl1J+669dlLp+YFMxSVQyS5g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.2.tgz", + "integrity": "sha512-+XI82Rm2hKnFwAySXEep4A7Kfoowt6weO6381jgW+wVdTpMS/56qCvoXyFRY0slcv7c/U8My2PwIB2/wEaAh7Q==", "dependencies": { - "@discordjs/collection": "^1.5.3", - "@discordjs/rest": "^2.0.1", - "@discordjs/util": "^1.0.1", + "@discordjs/collection": "^2.0.0", + "@discordjs/rest": "^2.1.0", + "@discordjs/util": "^1.0.2", "@sapphire/async-queue": "^1.5.0", - "@types/ws": "^8.5.5", + "@types/ws": "^8.5.9", "@vladfrangu/async_event_emitter": "^2.2.2", - "discord-api-types": "0.37.50", - "tslib": "^2.6.1", - "ws": "^8.13.0" + "discord-api-types": "0.37.61", + "tslib": "^2.6.2", + "ws": "^8.14.2" }, "engines": { "node": ">=16.11.0" } }, - "node_modules/@discordjs/ws/node_modules/discord-api-types": { - "version": "0.37.50", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz", - "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==" + "node_modules/@discordjs/ws/node_modules/@discordjs/collection": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz", + "integrity": "sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==", + "engines": { + "node": ">=18" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", + "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", + "engines": { + "node": ">=14" + } }, "node_modules/@iamtraction/google-translate": { "version": "2.0.1", @@ -149,29 +149,37 @@ "node": ">=16.0.0" } }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz", + "integrity": "sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw==", + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, "node_modules/@napi-rs/canvas": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas/-/canvas-0.1.43.tgz", - "integrity": "sha512-+lIzB2Safp8pBBpWST6HwB6eezAOFfuajpEK601ce4zUB6CjDw62Sr7d44mjJvKqe6Ig0S6YBh5iOedNmUzXHQ==", + "version": "0.1.44", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas/-/canvas-0.1.44.tgz", + "integrity": "sha512-IyhSndjw29LR1WqkUZvTJI4j8Ve1QGbZYtpdQjJjcFvsvJS4/WHzOWV8ZciLPJBhrYvSQf/JbZJy5LHmFV+plg==", "engines": { "node": ">= 10" }, "optionalDependencies": { - "@napi-rs/canvas-android-arm64": "0.1.43", - "@napi-rs/canvas-darwin-arm64": "0.1.43", - "@napi-rs/canvas-darwin-x64": "0.1.43", - "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.43", - "@napi-rs/canvas-linux-arm64-gnu": "0.1.43", - "@napi-rs/canvas-linux-arm64-musl": "0.1.43", - "@napi-rs/canvas-linux-x64-gnu": "0.1.43", - "@napi-rs/canvas-linux-x64-musl": "0.1.43", - "@napi-rs/canvas-win32-x64-msvc": "0.1.43" + "@napi-rs/canvas-android-arm64": "0.1.44", + "@napi-rs/canvas-darwin-arm64": "0.1.44", + "@napi-rs/canvas-darwin-x64": "0.1.44", + "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.44", + "@napi-rs/canvas-linux-arm64-gnu": "0.1.44", + "@napi-rs/canvas-linux-arm64-musl": "0.1.44", + "@napi-rs/canvas-linux-x64-gnu": "0.1.44", + "@napi-rs/canvas-linux-x64-musl": "0.1.44", + "@napi-rs/canvas-win32-x64-msvc": "0.1.44" } }, "node_modules/@napi-rs/canvas-android-arm64": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-android-arm64/-/canvas-android-arm64-0.1.43.tgz", - "integrity": "sha512-5ZWSWvmarPjeftm7i3xFUllS/UMgHxUuMJpE89kK0E7rcSxUq2Sup8qxyKMqbQ6f06KvjSCxrHCZ3tqiC0eKew==", + "version": "0.1.44", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-android-arm64/-/canvas-android-arm64-0.1.44.tgz", + "integrity": "sha512-3UDlVf1CnibdUcM0+0xPH4L4/d/tCI895or0y7mr/Xlaa1tDmvcQCvBYl9G54IpXsm+e4T1XkVrGGJD4k1NfSg==", "cpu": [ "arm64" ], @@ -184,9 +192,9 @@ } }, "node_modules/@napi-rs/canvas-darwin-arm64": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-arm64/-/canvas-darwin-arm64-0.1.43.tgz", - "integrity": "sha512-t3y0n4l5vv9NR7Um3QoMKOvxwu/3YNNwjwa6gpanHvrK2yn4rsd05KgJAb7p13rkbFZzqEl91y2i9PBHSjDKqg==", + "version": "0.1.44", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-arm64/-/canvas-darwin-arm64-0.1.44.tgz", + "integrity": "sha512-Y1Yx0H45Iicx2b6pcrlICjlwgylLtqi0t5OJgeUXnxLcJ1+aEpmjLr16tddqHkmGUw/nBRAwfPJrf3GaOwWowQ==", "cpu": [ "arm64" ], @@ -199,9 +207,9 @@ } }, "node_modules/@napi-rs/canvas-darwin-x64": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-x64/-/canvas-darwin-x64-0.1.43.tgz", - "integrity": "sha512-AlCPjdkuTCLoIqrOvj80pDQtUu8V9v8rQ5tv7jyipplU5Ofc5rff7vSlMv3EZd35++RDIEDaUTIJbMC9utaiBg==", + "version": "0.1.44", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-x64/-/canvas-darwin-x64-0.1.44.tgz", + "integrity": "sha512-gbzeNz13DFH0Ak5ENyQ5ZEuSuCjNDxA/OV9P5f19lywbOVL5Ol+qgKX0BXBcP3O3IXWahruOvmmLUBn9h1MHpA==", "cpu": [ "x64" ], @@ -214,9 +222,9 @@ } }, "node_modules/@napi-rs/canvas-linux-arm-gnueabihf": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm-gnueabihf/-/canvas-linux-arm-gnueabihf-0.1.43.tgz", - "integrity": "sha512-apylXQgAdLqYJYXwe6F0Uz0jN30HQ/pF2UXN0mlpPwLZH4b++7WziCh/uHXSPx7i68GrmLFit0VqHUVPxs/EAg==", + "version": "0.1.44", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm-gnueabihf/-/canvas-linux-arm-gnueabihf-0.1.44.tgz", + "integrity": "sha512-Sad3/eGyzTZiyJFeFrmX1M3aRp0n3qTAXeCm6EeAjCFGk8TWd4cINCGT3IRY4wmCvNnpe6C4fM03K07cU5YYwA==", "cpu": [ "arm" ], @@ -229,9 +237,9 @@ } }, "node_modules/@napi-rs/canvas-linux-arm64-gnu": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-gnu/-/canvas-linux-arm64-gnu-0.1.43.tgz", - "integrity": "sha512-PkNbVEliHsoDIY/K1eQNMDyMPB4hb8NfJgBlXX+nTlr5o0m2tdUDBKi7Q/EXHB2D/alAUzK1esSxNH7Y7/H3/g==", + "version": "0.1.44", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-gnu/-/canvas-linux-arm64-gnu-0.1.44.tgz", + "integrity": "sha512-bCrI9naYGPRFHePMGN+wlrWzC+Swi6uc1YzFg4/wOYzHKSte8FXHrGspHOPPr12BCEmgg3yXK8nnLjxGdlAWtg==", "cpu": [ "arm64" ], @@ -245,9 +253,9 @@ } }, "node_modules/@napi-rs/canvas-linux-arm64-musl": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-musl/-/canvas-linux-arm64-musl-0.1.43.tgz", - "integrity": "sha512-hNq61YKCDvbQbCDwNYIh4vySiJ0qD9ZzvKi/hOFFrG0NW4nFfi1JaJISp1EzHpUiFkPIDfqWSOMu0dWJYWNApA==", + "version": "0.1.44", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-musl/-/canvas-linux-arm64-musl-0.1.44.tgz", + "integrity": "sha512-gB/ao9zBQaOJik4arOKJisZaG+v7DuyBW7UdG+0L80msAuJTTH2UgWOnmXfZwPxzxNbFKzOa8r48uVzfTaAHGQ==", "cpu": [ "arm64" ], @@ -261,9 +269,9 @@ } }, "node_modules/@napi-rs/canvas-linux-x64-gnu": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-gnu/-/canvas-linux-x64-gnu-0.1.43.tgz", - "integrity": "sha512-tzUzx75cHIKZZY3zauD+grMxuCaMVPkShfWAt3hqCpN3axNWnzo5ZdpmEBmHrZfLu4SdPvFYIQQSC09DhIf6/A==", + "version": "0.1.44", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-gnu/-/canvas-linux-x64-gnu-0.1.44.tgz", + "integrity": "sha512-pvHy1bJ0DDD4Bsx6yuFnqpIyBW7+2iIK5BpvmL36zXE+7w2MEeaYzLUWTBhrXj8rzHys6MwLmHNlkw65R80YbQ==", "cpu": [ "x64" ], @@ -277,9 +285,9 @@ } }, "node_modules/@napi-rs/canvas-linux-x64-musl": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-musl/-/canvas-linux-x64-musl-0.1.43.tgz", - "integrity": "sha512-kmzMM8dgXCq52mGjsjmwwvoOe3pHfPu3sbbPP2MzuddauUm0k6TkCvgTUmCeetnV8kLZbyrnfMYuArFtKM2chw==", + "version": "0.1.44", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-musl/-/canvas-linux-x64-musl-0.1.44.tgz", + "integrity": "sha512-5QaeYqNZ/u1QI2E/UqvnmuORT6cI1qTtLosPp/y4awaK+/LXQEzotHNv0nan0z4EV/0mXsJswY9JpISRJzx+Kw==", "cpu": [ "x64" ], @@ -293,9 +301,9 @@ } }, "node_modules/@napi-rs/canvas-win32-x64-msvc": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-win32-x64-msvc/-/canvas-win32-x64-msvc-0.1.43.tgz", - "integrity": "sha512-UjOErvinzZc3oBaF6cDePmIkX5JG0SaczDRUOCkFgVGe0EIQBsJtxaBImR/cwli9GjA5wSmjiR0HxnMoge3/zg==", + "version": "0.1.44", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-win32-x64-msvc/-/canvas-win32-x64-msvc-0.1.44.tgz", + "integrity": "sha512-pbeTGLox+I+sMVl/FFO21Xvp0PhijsuEr9gaynmN2X7FPTg+CCuuBDhfSU5iMAtcCCYFCk8ridZIWy5jkcf72w==", "cpu": [ "x64" ], @@ -317,16 +325,15 @@ } }, "node_modules/@sapphire/shapeshift": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.2.tgz", - "integrity": "sha512-YRbCXWy969oGIdqR/wha62eX8GNHsvyYi0Rfd4rNW6tSVVa8p0ELiMEuOH/k8rgtvRoM+EMV7Csqz77YdwiDpA==", + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.6.tgz", + "integrity": "sha512-4+Na/fxu2SEepZRb9z0dbsVh59QtwPuBg/UVaDib3av7ZY14b14+z09z6QVn0P6Dv6eOU2NDTsjIi0mbtgP56g==", "dependencies": { "fast-deep-equal": "^3.1.3", "lodash": "^4.17.21" }, "engines": { - "node": ">=v14.0.0", - "npm": ">=7.0.0" + "node": ">=v18" } }, "node_modules/@sapphire/snowflake": { @@ -338,10 +345,21 @@ "npm": ">=7.0.0" } }, - "node_modules/@sourcebin/linguist": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@sourcebin/linguist/-/linguist-0.0.3.tgz", - "integrity": "sha512-VVkb/34pISdK+1tyqmwBac6crn8UhviKCRV5w/wc8iZyTCOoTrOu0Cgbqfh0bfMGxNlQuhaRy6cMmEmHxa5R3g==" + "node_modules/@twemoji/api": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@twemoji/api/-/api-15.0.3.tgz", + "integrity": "sha512-BI+4nY1o3NAtsMpSTXW2nNjlpanYZ3ndVhslxmGplahO7fgxqWrtAezBs5Yze7vbT98BVx8krJSpr6qJMgYCWw==", + "dependencies": { + "@twemoji/parser": "15.0.0", + "fs-extra": "^8.0.1", + "jsonfile": "^5.0.0", + "universalify": "^0.1.2" + } + }, + "node_modules/@twemoji/parser": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@twemoji/parser/-/parser-15.0.0.tgz", + "integrity": "sha512-lh9515BNsvKSNvyUqbj5yFu83iIDQ77SwVcsN/SnEGawczhsKU6qWuogewN1GweTi5Imo5ToQ9s+nNTf97IXvg==" }, "node_modules/@types/node": { "version": "20.3.1", @@ -379,23 +397,24 @@ "version": "8.2.2", "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "peer": true, "dependencies": { "@types/node": "*", "@types/webidl-conversions": "*" } }, "node_modules/@types/ws": { - "version": "8.5.5", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz", - "integrity": "sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==", + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz", + "integrity": "sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==", "dependencies": { "@types/node": "*" } }, "node_modules/@vladfrangu/async_event_emitter": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz", - "integrity": "sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.4.tgz", + "integrity": "sha512-ButUPz9E9cXMLgvAW8aLAKKJJsPu1dY1/l/E8xzLFuysowXygs6GBcyunK9rnGC4zTsnIc2mQo71rGw9U+Ykug==", "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" @@ -515,11 +534,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -537,14 +556,6 @@ "node": ">=6.0.0" } }, - "node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", - "engines": { - "node": "*" - } - }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -604,21 +615,11 @@ "version": "5.4.0", "resolved": "https://registry.npmjs.org/bson/-/bson-5.4.0.tgz", "integrity": "sha512-WRZ5SQI5GfUuKnPTNmAYPiKIof3ORXAF4IRU5UcgmivNIon01rWQlw5RUH954dpu8yGL8T59YShVddIPaU/gFA==", + "peer": true, "engines": { "node": ">=14.20.1" } }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -687,9 +688,9 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/connect-mongo": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-5.0.0.tgz", - "integrity": "sha512-s93jiP6GkRApn5duComx6RLwtP23YrulPxShz+8peX7svd6Q+MS8nKLhKCCazbP92C13eTVaIOxgeLt0ezIiCg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-5.1.0.tgz", + "integrity": "sha512-xT0vxQLqyqoUTxPLzlP9a/u+vir0zNkhiy9uAdHjSCcUUf7TS5b55Icw8lVyYFxfemP3Mf9gdwUOgeF3cxCAhw==", "dependencies": { "debug": "^4.3.1", "kruptein": "^3.0.0" @@ -699,7 +700,7 @@ }, "peerDependencies": { "express-session": "^1.17.1", - "mongodb": "^5.1.0" + "mongodb": ">= 5.1.0 < 7" } }, "node_modules/content-disposition": { @@ -735,18 +736,20 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/cross-env": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz", - "integrity": "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", "dependencies": { - "cross-spawn": "^7.0.0" + "cross-spawn": "^7.0.1" }, "bin": { "cross-env": "src/bin/cross-env.js", "cross-env-shell": "src/bin/cross-env-shell.js" }, "engines": { - "node": ">=8.0" + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" } }, "node_modules/cross-spawn": { @@ -820,9 +823,9 @@ } }, "node_modules/discord-api-types": { - "version": "0.37.56", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.56.tgz", - "integrity": "sha512-Ih3wj0ZTaQxaJRqUEXHMIXfXB86bwMGC0wc2nNsyCJqeo3lC4qnxXtFIsC+IGI46+dSIinuayCAZ6sLEEM02Bw==" + "version": "0.37.61", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz", + "integrity": "sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==" }, "node_modules/discord-gamecord": { "version": "2.1.0", @@ -890,27 +893,27 @@ } }, "node_modules/discord.js": { - "version": "14.12.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.12.1.tgz", - "integrity": "sha512-gGjhTkauIPgFXxpBl0UZgyehrKhDe90cIS8Hn1xFBYQ63EuUAkKoUqRNmc/pcla6DD16s4cUz5tAbdSpXivnxw==", - "dependencies": { - "@discordjs/builders": "^1.6.4", - "@discordjs/collection": "^1.5.2", - "@discordjs/formatters": "^0.3.1", - "@discordjs/rest": "^2.0.0", - "@discordjs/util": "^1.0.0", - "@discordjs/ws": "^1.0.0", - "@sapphire/snowflake": "^3.5.1", - "@types/ws": "^8.5.5", - "discord-api-types": "^0.37.50", - "fast-deep-equal": "^3.1.3", - "lodash.snakecase": "^4.1.1", - "tslib": "^2.6.1", - "undici": "^5.22.1", - "ws": "^8.13.0" + "version": "14.14.1", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.14.1.tgz", + "integrity": "sha512-/hUVzkIerxKHyRKopJy5xejp4MYKDPTszAnpYxzVVv4qJYf+Tkt+jnT2N29PIPschicaEEpXwF2ARrTYHYwQ5w==", + "dependencies": { + "@discordjs/builders": "^1.7.0", + "@discordjs/collection": "1.5.3", + "@discordjs/formatters": "^0.3.3", + "@discordjs/rest": "^2.1.0", + "@discordjs/util": "^1.0.2", + "@discordjs/ws": "^1.0.2", + "@sapphire/snowflake": "3.5.1", + "@types/ws": "8.5.9", + "discord-api-types": "0.37.61", + "fast-deep-equal": "3.1.3", + "lodash.snakecase": "4.1.1", + "tslib": "2.6.2", + "undici": "5.27.2", + "ws": "8.14.2" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/ee-first": { @@ -1056,17 +1059,6 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, - "node_modules/figlet": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.6.0.tgz", - "integrity": "sha512-31EQGhCEITv6+hi2ORRPyn3bulaV9Fl4xOdR169cBzH/n1UqcxsiSB/noo6SJdD7Kfb1Ljit+IgR1USvF/XbdA==", - "bin": { - "figlet": "bin/index.js" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -1125,9 +1117,9 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "funding": [ { "type": "individual", @@ -1330,7 +1322,8 @@ "node_modules/ip": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", + "peer": true }, "node_modules/ipaddr.js": { "version": "1.9.1", @@ -1383,14 +1376,6 @@ "node": ">=10" } }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -1454,9 +1439,9 @@ } }, "node_modules/magic-bytes.js": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.0.15.tgz", - "integrity": "sha512-bpRmwbRHqongRhA+mXzbLWjVy7ylqmfMBYaQkSs6pac0z6hBTvsgrH0r4FBYd/UYVJBmS6Rp/O+oCCQVLzKV1g==" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.8.0.tgz", + "integrity": "sha512-lyWpfvNGVb5lu8YUAbER0+UMBTdR63w2mcSUlhhBTyVbxJvjgqwyAf3AZD6MprgK0uHuBoWXSDAMWLupX83o3Q==" }, "node_modules/media-typer": { "version": "0.3.0", @@ -1469,8 +1454,7 @@ "node_modules/memory-pager": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" }, "node_modules/merge-descriptors": { "version": "1.0.1", @@ -1543,6 +1527,7 @@ "version": "5.7.0", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.7.0.tgz", "integrity": "sha512-zm82Bq33QbqtxDf58fLWBwTjARK3NSvKYjyz997KSy6hpat0prjeX/kxjbPVyZY60XYPDNETaHkHJI2UCzSLuw==", + "peer": true, "dependencies": { "bson": "^5.4.0", "mongodb-connection-string-url": "^2.6.0", @@ -1583,37 +1568,131 @@ "version": "2.6.0", "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", + "peer": true, "dependencies": { "@types/whatwg-url": "^8.2.1", "whatwg-url": "^11.0.0" } }, "node_modules/mongoose": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.4.3.tgz", - "integrity": "sha512-eok0lW6mZJHK2vVSWyJb9tUfPMUuRF3h7YC4pU2K2/YSZBlNDUwvKsHgftMOANbokP2Ry+4ylvzAdW4KjkRFjw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.1.1.tgz", + "integrity": "sha512-DbLb0NsiEXmaqLOpEz+AtAsgwhRw6f25gwa1dF5R7jj6lS1D8X6uTdhBSC8GDVtOwe5Tfw2EL7nTn6hiJT3Bgg==", "dependencies": { - "bson": "^5.4.0", + "bson": "^6.2.0", "kareem": "2.5.1", - "mongodb": "5.7.0", + "mongodb": "6.3.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", "sift": "16.0.1" }, "engines": { - "node": ">=14.20.1" + "node": ">=16.20.1" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mongoose" } }, + "node_modules/mongoose/node_modules/@types/whatwg-url": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.4.tgz", + "integrity": "sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==", + "dependencies": { + "@types/webidl-conversions": "*" + } + }, + "node_modules/mongoose/node_modules/bson": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz", + "integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==", + "engines": { + "node": ">=16.20.1" + } + }, + "node_modules/mongoose/node_modules/mongodb": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.3.0.tgz", + "integrity": "sha512-tt0KuGjGtLUhLoU263+xvQmPHEGTw5LbcNC73EoFRYgSHwZt5tsoJC110hDyO1kjQzpgNrpdcSza9PknWN4LrA==", + "dependencies": { + "@mongodb-js/saslprep": "^1.1.0", + "bson": "^6.2.0", + "mongodb-connection-string-url": "^3.0.0" + }, + "engines": { + "node": ">=16.20.1" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.1.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.2.2", + "socks": "^2.7.1" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "gcp-metadata": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + }, + "socks": { + "optional": true + } + } + }, + "node_modules/mongoose/node_modules/mongodb-connection-string-url": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz", + "integrity": "sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==", + "dependencies": { + "@types/whatwg-url": "^11.0.2", + "whatwg-url": "^13.0.0" + } + }, "node_modules/mongoose/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/mongoose/node_modules/tr46": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "dependencies": { + "punycode": "^2.3.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/mongoose/node_modules/whatwg-url": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz", + "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==", + "dependencies": { + "tr46": "^4.1.1", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/mpath": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", @@ -1647,25 +1726,16 @@ } }, "node_modules/node_extra_ca_certs_mozilla_bundle": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node_extra_ca_certs_mozilla_bundle/-/node_extra_ca_certs_mozilla_bundle-1.0.5.tgz", - "integrity": "sha512-Y+wek3qK8WYybCIxArGTmCEJCJ/6uGud/HCJECBZPIgagF9ba90nhnQMxBcMUAwQaR53iphGYp0JzlVPpUBsjg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node_extra_ca_certs_mozilla_bundle/-/node_extra_ca_certs_mozilla_bundle-1.0.6.tgz", + "integrity": "sha512-VUYE5onlfOXbiZ9KLC2q3HyKC/PqYawf55tIyp7g07RUuO3UmozeDtIKlyMpS5jTIn1rxGST12QLqfDAqkektw==", "hasInstallScript": true, "dependencies": { - "axios": "^0.27.2", - "cross-env": "^6.0.3", + "axios": "^1.6.5", + "cross-env": "^7.0.3", "csvtojson": "^2.0.10" } }, - "node_modules/node_extra_ca_certs_mozilla_bundle/node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, "node_modules/node-fetch": { "version": "2.6.11", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", @@ -1753,9 +1823,9 @@ } }, "node_modules/passport": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/passport/-/passport-0.6.0.tgz", - "integrity": "sha512-0fe+p3ZnrWRW74fe8+SvCyf4a3Pb2/h7gFkQ8yTJpAO50gDzlfjZUZTO1k5Eg9kUct22OxHLqDZoKUWRHOh9ug==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/passport/-/passport-0.7.0.tgz", + "integrity": "sha512-cPLl+qZpSc+ireUvt+IzqbED1cHHkDoVYMo30jbJIdOOjQ1MQYZBPiNvmi8UM6lJuOpTPXJGZQk0DtC4y61MYQ==", "dependencies": { "passport-strategy": "1.x.x", "pause": "0.0.1", @@ -1941,6 +2011,7 @@ "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", "optional": true, + "peer": true, "dependencies": { "sparse-bitfield": "^3.0.3" }, @@ -2070,6 +2141,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "peer": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -2079,6 +2151,7 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "peer": true, "dependencies": { "ip": "^2.0.0", "smart-buffer": "^4.2.0" @@ -2088,20 +2161,10 @@ "npm": ">= 3.0.0" } }, - "node_modules/sourcebin_js": { - "version": "0.0.3-ignore", - "resolved": "https://registry.npmjs.org/sourcebin_js/-/sourcebin_js-0.0.3-ignore.tgz", - "integrity": "sha512-/W6zJeV13IRw4nZ7ByjmjqmQ3UpRqBafJrxLjSUUH8goG60T/1ze2hu87iP2ca5RXEqoTKr7057SJTXqrov3lA==", - "dependencies": { - "@sourcebin/linguist": "0.0.3", - "node-fetch": "^2.6.0" - } - }, "node_modules/sparse-bitfield": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", - "optional": true, "dependencies": { "memory-pager": "^1.0.2" } @@ -2114,14 +2177,6 @@ "node": ">= 0.8" } }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -2210,6 +2265,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "peer": true, "dependencies": { "punycode": "^2.1.1" }, @@ -2227,22 +2283,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, - "node_modules/twemoji": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/twemoji/-/twemoji-14.0.2.tgz", - "integrity": "sha512-BzOoXIe1QVdmsUmZ54xbEH+8AgtOKUiG53zO5vVP2iUu6h5u9lN15NcuS6te4OY96qx0H7JK9vjjl9WQbkTRuA==", - "dependencies": { - "fs-extra": "^8.0.1", - "jsonfile": "^5.0.0", - "twemoji-parser": "14.0.0", - "universalify": "^0.1.2" - } - }, - "node_modules/twemoji-parser": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-14.0.0.tgz", - "integrity": "sha512-9DUOTGLOWs0pFWnh1p6NF+C3CkQ96PWmEFwhOVmT3WbecRC+68AIqpsnJXygfkFcp4aXbOp8Dwbhh/HQgvoRxA==" - }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -2284,11 +2324,11 @@ "integrity": "sha512-IevTus0SbGwQzYh3+fRsAMTVVPOoIVufzacXcHPmdlle1jUpq7BRL+mw3dgeLanvGZdwwbWhRV6XrcFNdBmjWA==" }, "node_modules/undici": { - "version": "5.22.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz", - "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==", + "version": "5.27.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz", + "integrity": "sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==", "dependencies": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" }, "engines": { "node": ">=14.0" @@ -2359,6 +2399,7 @@ "version": "11.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "peer": true, "dependencies": { "tr46": "^3.0.0", "webidl-conversions": "^7.0.0" @@ -2382,9 +2423,9 @@ } }, "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index 2fe30ad..0b06f6d 100644 --- a/package.json +++ b/package.json @@ -22,25 +22,21 @@ "homepage": "https://github.com/ServerSMP-Github/BOT#readme", "dependencies": { "@iamtraction/google-translate": "2.0.1", - "@napi-rs/canvas": "0.1.43", + "@napi-rs/canvas": "^0.1.44", + "@twemoji/api": "^15.0.3", "aki-api": "^6.0.9", - "connect-mongo": "^5.0.0", + "connect-mongo": "^5.1.0", "discord-gamecord": "2.1.0", - "discord.js": "14.12.1", + "discord.js": "^14.14.1", "ejs": "^3.1.9", "express": "4.18.2", "express-session": "^1.17.3", - "figlet": "^1.6.0", - "json-bigint": "^1.0.0", - "mongodb": "^5.4.0", - "mongoose": "7.4.3", - "passport": "^0.6.0", + "mongoose": "^8.1.1", + "passport": "^0.7.0", "passport-discord": "^0.1.4", "poru": "^4.2.1", - "sourcebin_js": "^0.0.3-ignore", "table": "6.8.1", "tinyld": "^1.3.4", - "twemoji": "^14.0.2", "typescript": "4.9.4", "ytdl-core": "4.11.5" }