From 79b88f54b8e656ba5d4b91ff07a624c62dd99ee2 Mon Sep 17 00:00:00 2001 From: James Moore Date: Tue, 21 Nov 2023 14:22:04 -0500 Subject: [PATCH] update workflow steps --- .github/workflows/publish.yml | 6 +- .gitignore | 1 + Dockerfile | 2 +- dist/configs/config.json | 4 -- dist/configs/roles.config.json | 15 ----- dist/configs/support.config.json | 32 --------- dist/src/autocomplete/help.js | 26 -------- dist/src/autocomplete/help.js.map | 1 - dist/src/autocomplete/wiki.js | 26 -------- dist/src/autocomplete/wiki.js.map | 1 - dist/src/commands/commands.js | 41 ------------ dist/src/commands/commands.js.map | 1 - dist/src/commands/embed.js | 27 -------- dist/src/commands/embed.js.map | 1 - dist/src/commands/paste.js | 9 --- dist/src/commands/paste.js.map | 1 - dist/src/commands/poll.js | 42 ------------ dist/src/commands/poll.js.map | 1 - dist/src/commands/roles.js | 44 ------------- dist/src/commands/roles.js.map | 1 - dist/src/events/crosspost.js | 12 ---- dist/src/events/crosspost.js.map | 1 - dist/src/events/interaction.js | 33 ---------- dist/src/events/interaction.js.map | 1 - dist/src/events/memberjoined.js | 12 ---- dist/src/events/memberjoined.js.map | 1 - dist/src/events/ready.js | 57 ---------------- dist/src/events/ready.js.map | 1 - dist/src/index.js | 48 -------------- dist/src/index.js.map | 1 - dist/src/menus/role_selection.js | 25 ------- dist/src/menus/role_selection.js.map | 1 - dist/src/menus/support.js | 27 -------- dist/src/menus/support.js.map | 1 - dist/src/utils/commands.js | 97 --------------------------- dist/src/utils/commands.js.map | 1 - dist/src/utils/database.js | 36 ---------- dist/src/utils/database.js.map | 1 - dist/src/utils/interactions.js | 98 ---------------------------- dist/src/utils/interactions.js.map | 1 - dist/src/utils/types.js | 3 - dist/src/utils/types.js.map | 1 - 42 files changed, 7 insertions(+), 734 deletions(-) delete mode 100644 dist/configs/config.json delete mode 100644 dist/configs/roles.config.json delete mode 100644 dist/configs/support.config.json delete mode 100644 dist/src/autocomplete/help.js delete mode 100644 dist/src/autocomplete/help.js.map delete mode 100644 dist/src/autocomplete/wiki.js delete mode 100644 dist/src/autocomplete/wiki.js.map delete mode 100644 dist/src/commands/commands.js delete mode 100644 dist/src/commands/commands.js.map delete mode 100644 dist/src/commands/embed.js delete mode 100644 dist/src/commands/embed.js.map delete mode 100644 dist/src/commands/paste.js delete mode 100644 dist/src/commands/paste.js.map delete mode 100644 dist/src/commands/poll.js delete mode 100644 dist/src/commands/poll.js.map delete mode 100644 dist/src/commands/roles.js delete mode 100644 dist/src/commands/roles.js.map delete mode 100644 dist/src/events/crosspost.js delete mode 100644 dist/src/events/crosspost.js.map delete mode 100644 dist/src/events/interaction.js delete mode 100644 dist/src/events/interaction.js.map delete mode 100644 dist/src/events/memberjoined.js delete mode 100644 dist/src/events/memberjoined.js.map delete mode 100644 dist/src/events/ready.js delete mode 100644 dist/src/events/ready.js.map delete mode 100644 dist/src/index.js delete mode 100644 dist/src/index.js.map delete mode 100644 dist/src/menus/role_selection.js delete mode 100644 dist/src/menus/role_selection.js.map delete mode 100644 dist/src/menus/support.js delete mode 100644 dist/src/menus/support.js.map delete mode 100644 dist/src/utils/commands.js delete mode 100644 dist/src/utils/commands.js.map delete mode 100644 dist/src/utils/database.js delete mode 100644 dist/src/utils/database.js.map delete mode 100644 dist/src/utils/interactions.js delete mode 100644 dist/src/utils/interactions.js.map delete mode 100644 dist/src/utils/types.js delete mode 100644 dist/src/utils/types.js.map diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8c999a6..0b5b0f1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,9 +8,13 @@ jobs: name: Publish runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 18 + run: npm build - uses: mr-smithers-excellent/docker-build-push@v6 with: image: team-resourceful/discord-bot-ts diff --git a/.gitignore b/.gitignore index ba92323..2fda21d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules /.env /.idea/ +dist \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9712405..21bb4d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,4 +6,4 @@ WORKDIR /app COPY ["package.json", "package-lock.json*", "./"] RUN npm install --production COPY . . -CMD ["npm", "run", "start"] \ No newline at end of file +CMD ["npm", "run", "no-build-start"] \ No newline at end of file diff --git a/dist/configs/config.json b/dist/configs/config.json deleted file mode 100644 index aa11171..0000000 --- a/dist/configs/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "token": "", - "databaseOptions": {} -} diff --git a/dist/configs/roles.config.json b/dist/configs/roles.config.json deleted file mode 100644 index 052deef..0000000 --- a/dist/configs/roles.config.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "roleSelections": { - "873346297053204561": { - "name": "Update Notifications", - "description": "Receive pings about mod updates!", - "emoji": "920730073080926318" - }, - "870461093288480768": { - "name": "Community Server", - "description": "Receive pings about community server updates!", - "emoji": "920730073261301770" - } - }, - "addAbleRolesRole": "873346594446131251" -} diff --git a/dist/configs/support.config.json b/dist/configs/support.config.json deleted file mode 100644 index 870bee6..0000000 --- a/dist/configs/support.config.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "channel": "874088526419984464", - "message": "874088931002560522", - "threads": { - "874089041929326642": "ATM Pack Support", - "874090332969652245": "E6 Pack Support", - "874090407313670253": "Sky Bees", - "874091627348623370": "Breeding Support", - "874091557484122173": "Flowers / Pollination Support", - "874091319570595870": "Apiary Support", - "874091249727062017": "Mutation Support", - "874099001216106538": "General Support", - "874091693027237889": "(Dev) Bees", - "874091752548610069": "(Dev) Honey", - "874091801315790869": "(Dev) Traits", - "874093238988984320": "Other Mods Support" - }, - "messages": { - "issues": { - "label": "Bugs & Feature Requests", - "message": { - "embeds": [ - { - "title": "Bugs & Feature Requests", - "description": "We do not accept bugs, issue, & feature requests on discord, please report them over to our github [here.](https://github.com/Resourceful-Bees/ResourcefulBees/issues)" - } - ], - "ephemeral": true - } - } - } -} diff --git a/dist/src/autocomplete/help.js b/dist/src/autocomplete/help.js deleted file mode 100644 index fffc3eb..0000000 --- a/dist/src/autocomplete/help.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const index_1 = require("../index"); -const commands_1 = require("../utils/commands"); -exports.default = { - id: "help", - execute(command) { - const category = command.options.getString("category", true); - let message = (0, index_1.getCommands)().get(commands_1.CommandType.HELP, category); - if (!message) - message = "Unknown category, command code needs to be updated."; - command.reply({ - content: message, - ephemeral: command.options.getBoolean("silent") === true - }); - }, - complete(command) { - const focusedValue = command.options.getFocused(); - const commands = (0, index_1.getCommands)().getCommands(commands_1.CommandType.HELP); - if (!commands) - return; - const filtered = Array.from(commands).filter(choice => choice.startsWith(focusedValue)); - command.respond(filtered.map(choice => ({ name: choice, value: choice }))); - } -}; -//# sourceMappingURL=help.js.map \ No newline at end of file diff --git a/dist/src/autocomplete/help.js.map b/dist/src/autocomplete/help.js.map deleted file mode 100644 index b00a544..0000000 --- a/dist/src/autocomplete/help.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"help.js","sourceRoot":"","sources":["../../../src/autocomplete/help.ts"],"names":[],"mappings":";;AAEA,oCAAqC;AACrC,gDAA8C;AAE9C,kBAAe;IACX,EAAE,EAAE,MAAM;IACV,OAAO,CAAC,OAA8C;QAClD,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC7D,IAAI,OAAO,GAAG,IAAA,mBAAW,GAAE,CAAC,GAAG,CAAC,sBAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QAC3D,IAAI,CAAC,OAAO;YAAE,OAAO,GAAG,qDAAqD,CAAC;QAE9E,OAAO,CAAC,KAAK,CAAC;YACV,OAAO,EAAE,OAAO;YAChB,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,IAAI;SAC3D,CAAC,CAAA;IACN,CAAC;IACD,QAAQ,CAAC,OAA0C;QAC/C,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAClD,MAAM,QAAQ,GAAG,IAAA,mBAAW,GAAE,CAAC,WAAW,CAAC,sBAAW,CAAC,IAAI,CAAC,CAAC;QAC7D,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;QACxF,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/E,CAAC;CACmB,CAAC"} \ No newline at end of file diff --git a/dist/src/autocomplete/wiki.js b/dist/src/autocomplete/wiki.js deleted file mode 100644 index d275336..0000000 --- a/dist/src/autocomplete/wiki.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const index_1 = require("../index"); -const commands_1 = require("../utils/commands"); -exports.default = { - id: "wiki", - execute(command) { - const category = command.options.getString("category", false); - let message = !category ? undefined : (0, index_1.getCommands)().get(commands_1.CommandType.WIKI, category); - if (!message) - message = "https://wiki.resourcefulbees.com"; - command.reply({ - content: message, - ephemeral: command.options.getBoolean("silent") === true - }); - }, - complete(command) { - const focusedValue = command.options.getFocused(); - const commands = (0, index_1.getCommands)().getCommands(commands_1.CommandType.WIKI); - if (!commands) - return; - const filtered = Array.from(commands).filter(choice => choice.startsWith(focusedValue)); - command.respond(filtered.map(choice => ({ name: choice, value: choice }))); - } -}; -//# sourceMappingURL=wiki.js.map \ No newline at end of file diff --git a/dist/src/autocomplete/wiki.js.map b/dist/src/autocomplete/wiki.js.map deleted file mode 100644 index 1376da3..0000000 --- a/dist/src/autocomplete/wiki.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wiki.js","sourceRoot":"","sources":["../../../src/autocomplete/wiki.ts"],"names":[],"mappings":";;AAEA,oCAAqC;AACrC,gDAA8C;AAE9C,kBAAe;IACX,EAAE,EAAE,MAAM;IACV,OAAO,CAAC,OAA8C;QAClD,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QAC9D,IAAI,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,mBAAW,GAAE,CAAC,GAAG,CAAC,sBAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACnF,IAAI,CAAC,OAAO;YAAE,OAAO,GAAG,kCAAkC,CAAC;QAE3D,OAAO,CAAC,KAAK,CAAC;YACV,OAAO,EAAE,OAAO;YAChB,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,IAAI;SAC3D,CAAC,CAAA;IACN,CAAC;IACD,QAAQ,CAAC,OAA0C;QAC/C,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAClD,MAAM,QAAQ,GAAG,IAAA,mBAAW,GAAE,CAAC,WAAW,CAAC,sBAAW,CAAC,IAAI,CAAC,CAAC;QAC7D,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;QACxF,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/E,CAAC;CACmB,CAAC"} \ No newline at end of file diff --git a/dist/src/commands/commands.js b/dist/src/commands/commands.js deleted file mode 100644 index 1fc5289..0000000 --- a/dist/src/commands/commands.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const discord_js_1 = require("discord.js"); -const index_1 = require("../index"); -const commands_1 = require("../utils/commands"); -exports.default = { - id: "command", - execute(command) { - if (!command.member.permissions.has(discord_js_1.PermissionFlagsBits.Administrator)) { - command.reply({ content: "You don't have perms.", ephemeral: true }); - return; - } - const operation = command.options.getString("operation", true); - const category = command.options.getString("category", true); - const key = command.options.getString("command", true); - const value = command.options.getString("data", false); - const categoryEnum = category === "wiki" ? commands_1.CommandType.WIKI : category === "help" ? commands_1.CommandType.HELP : null; - if (categoryEnum) { - if (operation === "remove") { - command.reply({ content: "Command successfully deleted!", ephemeral: true }); - (0, index_1.getCommands)().remove(categoryEnum, key); - } - else if (operation === "add") { - if (value) { - command.reply({ content: "Command successfully added!", ephemeral: true }); - (0, index_1.getCommands)().add(categoryEnum, key, value); - } - else { - command.reply({ content: "Command failed because data was not provided!", ephemeral: true }); - } - } - else { - command.reply({ content: "Command operation unknown.", ephemeral: true }); - } - } - else { - command.reply({ content: "Command category unknown.", ephemeral: true }); - } - } -}; -//# sourceMappingURL=commands.js.map \ No newline at end of file diff --git a/dist/src/commands/commands.js.map b/dist/src/commands/commands.js.map deleted file mode 100644 index a19eb3b..0000000 --- a/dist/src/commands/commands.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/commands/commands.ts"],"names":[],"mappings":";;AACA,2CAA4E;AAC5E,oCAAqC;AACrC,gDAA8C;AAE9C,kBAAe;IACX,EAAE,EAAE,SAAS;IACb,OAAO,CAAC,OAA8C;QAClD,IAAI,CAAC,OAAO,CAAC,MAAM,CAA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oBACH,OAAO,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,+CAA+C,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;iBAC7F;aACJ;iBAAM;gBACH,OAAO,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,4BAA4B,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;aAC1E;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,2BAA2B,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;SACzE;IACL,CAAC;CACO,CAAC"} \ No newline at end of file diff --git a/dist/src/commands/embed.js b/dist/src/commands/embed.js deleted file mode 100644 index 5857892..0000000 --- a/dist/src/commands/embed.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const discord_js_1 = require("discord.js"); -exports.default = { - id: "embed", - execute(command) { - if (!command.member.permissions.has(discord_js_1.PermissionFlagsBits.Administrator)) { - command.reply({ content: "You don't have perms.", ephemeral: true }); - return; - } - const message = command.options.getString("message", true); - const channel = command.options.getChannel("channel", true); - try { - command.reply({ content: "Message Created!", ephemeral: true }); - if (channel?.isTextBased()) { - channel.send(JSON.parse(message.trim())); - } - else { - command.reply({ content: "Message not created due to channel not being able to have messages sent in it.", ephemeral: true }); - } - } - catch (e) { - command.reply({ content: "Message not created data was bad.", ephemeral: true }); - } - } -}; -//# sourceMappingURL=embed.js.map \ No newline at end of file diff --git a/dist/src/commands/embed.js.map b/dist/src/commands/embed.js.map deleted file mode 100644 index c638dc7..0000000 --- a/dist/src/commands/embed.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"embed.js","sourceRoot":"","sources":["../../../src/commands/embed.ts"],"names":[],"mappings":";;AAAA,2CAA4E;AAG5E,kBAAe;IACX,EAAE,EAAE,OAAO;IACX,OAAO,CAAC,OAA8C;QAClD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,gCAAmB,CAAC,aAAa,CAAC,EAAE;YACpE,OAAO,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;YACnE,OAAO;SACV;QAED,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC5D,IAAI;YACA,OAAO,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;YAC7D,IAAI,OAAO,EAAE,WAAW,EAAE,EAAE;gBACxB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;aAC3C;iBAAM;gBACH,OAAO,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,gFAAgF,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;aAC9H;SACJ;QAAA,OAAO,CAAC,EAAC;YACN,OAAO,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,mCAAmC,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;SACjF;IACL,CAAC;CACO,CAAC"} \ No newline at end of file diff --git a/dist/src/commands/paste.js b/dist/src/commands/paste.js deleted file mode 100644 index 9bc4ff1..0000000 --- a/dist/src/commands/paste.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = { - id: "paste", - execute(command) { - const file = command.options.getAttachment("file", true); - } -}; -//# sourceMappingURL=paste.js.map \ No newline at end of file diff --git a/dist/src/commands/paste.js.map b/dist/src/commands/paste.js.map deleted file mode 100644 index 0603eb9..0000000 --- a/dist/src/commands/paste.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"paste.js","sourceRoot":"","sources":["../../../src/commands/paste.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACX,EAAE,EAAE,OAAO;IACX,OAAO,CAAC,OAA8C;QAClD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;CACO,CAAC"} \ No newline at end of file diff --git a/dist/src/commands/poll.js b/dist/src/commands/poll.js deleted file mode 100644 index 784e8ae..0000000 --- a/dist/src/commands/poll.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const discord_js_1 = require("discord.js"); -const emojis = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣", "🔟"]; -exports.default = { - id: "poll", - execute(command) { - if (!command.member.permissions.has(discord_js_1.PermissionFlagsBits.Administrator)) { - command.reply({ content: "You don't have perms.", ephemeral: true }); - return; - } - const channel = command.options.getChannel("channel", true); - const title = command.options.getString("title", true); - const embed = new discord_js_1.EmbedBuilder(); - let desc = []; - for (let i = 1; i <= 10; i++) { - const option = command.options.getString("option" + i); - if (!option) - break; - desc.push(emojis[i - 1] + " " + option); - } - embed.setTitle(title); - embed.setDescription(desc.join("\n")); - embed.setColor("Orange"); - if (channel instanceof discord_js_1.TextChannel) { - channel.send({ embeds: [embed] }).then(message => { - command.reply({ content: "Poll Created!", ephemeral: true }); - for (let i = 0; i < desc.length; i++) - message.react(emojis[i]); - channel.threads.create({ - name: "Poll Thread", - startMessage: message, - autoArchiveDuration: discord_js_1.ThreadAutoArchiveDuration.OneWeek - }); - }); - } - else { - command.reply({ content: "Channel provided was not a text channel.", ephemeral: true }); - } - } -}; -//# sourceMappingURL=poll.js.map \ No newline at end of file diff --git a/dist/src/commands/poll.js.map b/dist/src/commands/poll.js.map deleted file mode 100644 index a225c55..0000000 --- a/dist/src/commands/poll.js.map +++ /d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,CAAC,CAAC,CAAC;QACtC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAExB,IAAI,OAAO,YAAY,wBAAW,EAAE;YAChC,OAAO,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;gBAC3C,OAAO,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;gBAC1D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE;oBAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;gBAE/D,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;oBACnB,IAAI,EAAE,aAAa;oBACnB,YAAY,EAAE,OAAO;oBACrB,mBAAmB,EAAE,sCAAyB,CAAC,OAAO;iBACzD,CAAC,CAAA;YACN,CAAC,CAAC,CAAC;SACN;aAAM;YACH,OAAO,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,0CAA0C,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;SACxF;IACL,CAAC;CACO,CAAC"} \ No newline at end of file diff --git a/dist/src/commands/roles.js b/dist/src/commands/roles.js deleted file mode 100644 index d4793fd..0000000 --- a/dist/src/commands/roles.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const roles_config_json_1 = require("../../configs/roles.config.json"); -const discord_js_1 = require("discord.js"); -exports.default = { - id: "roles", - execute(command) { - if (!command.inGuild()) - return; - const selectionBox = new discord_js_1.SelectMenuBuilder(); - selectionBox.setCustomId("roles_selection"); - selectionBox.setMinValues(0); - selectionBox.setPlaceholder("Select or unselect roles to remove or add them."); - const cache = command.member.roles.cache; - let options = []; - for (let [id, selection] of Object.entries(roles_config_json_1.roleSelections)) { - const roleSelection = selection; - const option = new discord_js_1.SelectMenuOptionBuilder(); - option.setLabel(roleSelection.name); - option.setValue(id); - option.setDefault(cache.has(id)); - if (roleSelection.description) - option.setDescription(roleSelection.description); - if (roleSelection.emoji) - option.setEmoji(roleSelection.emoji); - options.push(option); - } - if (options.length === 0) { - command.reply({ - content: "Error: no selectable roles available.", - ephemeral: true - }); - return; - } - const row = new discord_js_1.ActionRowBuilder() - .addComponents([selectionBox.addOptions(options)]); - command.reply({ - content: "Select or deselect roles below.", - components: [row], - ephemeral: true - }); - } -}; -//# sourceMappingURL=roles.js.map \ No newline at end of file diff --git a/dist/src/commands/roles.js.map b/dist/src/commands/roles.js.map deleted file mode 100644 index a6a2171..0000000 --- a/dist/src/commands/roles.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../../src/commands/roles.ts"],"names":[],"mappings":";;AACA,uEAA+D;AAE/D,2CAAsH;AAEtH,kBAAe;IACX,EAAE,EAAE,OAAO;IACX,OAAO,CAAC,OAA8C;QAClD,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YAAE,OAAO;QAE/B,MAAM,YAAY,GAAG,IAAI,8BAAiB,EAAE,CAAC;QAC7C,YAAY,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;QAC5C,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAC7B,YAAY,CAAC,cAAc,CAAC,iDAAiD,CAAC,CAAC;QAE/E,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;QAEzC,IAAI,OAAO,GAA8B,EAAE,CAAA;QAE3C,KAAK,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,kCAAc,CAAC,EAAE;YACxD,MAAM,aAAa,GAAiC,SAAS,CAAC;YAC9D,MAAM,MAAM,GAAG,IAAI,oCAAuB,EAAE,CAAC;YAC7C,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YACpC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YACpB,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YACjC,IAAI,aAAa,CAAC,WAAW;gBAAE,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;YAChF,IAAI,aAAa,CAAC,KAAK;gBAAE,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC9D,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACxB;QAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,CAAC,KAAK,CAAC;gBACV,OAAO,EAAE,uCAAuC;gBAChD,SAAS,EAAE,IAAI;aAClB,CAAC,CAAC;YACH,OAAO;SACV;QAED,MAAM,GAAG,GAAG,IAAI,6BAAgB,EAAoC;aAC/D,aAAa,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAEvD,OAAO,CAAC,KAAK,CAAC;YACV,OAAO,EAAE,iCAAiC;YAC1C,UAAU,EAAE,CAAC,GAAG,CAAC;YACjB,SAAS,EAAE,IAAI;SAClB,CAAC,CAAA;IACN,CAAC;CACO,CAAC"} \ No newline at end of file diff --git a/dist/src/events/crosspost.js b/dist/src/events/crosspost.js deleted file mode 100644 index 85ad2da..0000000 --- a/dist/src/events/crosspost.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const discord_js_1 = require("discord.js"); -exports.default = { - name: "messageCreate", - execute(message) { - if (message.channel.type === discord_js_1.ChannelType.GuildAnnouncement && message.author.bot) { - message.crosspost(); - } - } -}; -//# sourceMappingURL=crosspost.js.map \ No newline at end of file diff --git a/dist/src/events/crosspost.js.map b/dist/src/events/crosspost.js.map deleted file mode 100644 index 288f641..0000000 --- a/dist/src/events/crosspost.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"crosspost.js","sourceRoot":"","sources":["../../../src/events/crosspost.ts"],"names":[],"mappings":";;AAAA,2CAAkD;AAGlD,kBAAe;IACX,IAAI,EAAE,eAAe;IACrB,OAAO,CAAC,OAAgB;QACpB,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,KAAK,wBAAW,CAAC,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;YAC9E,OAAO,CAAC,SAAS,EAAE,CAAC;SACvB;IACL,CAAC;CACY,CAAC"} \ No newline at end of file diff --git a/dist/src/events/interaction.js b/dist/src/events/interaction.js deleted file mode 100644 index 1aaa308..0000000 --- a/dist/src/events/interaction.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const index_1 = require("../index"); -exports.default = { - name: "interactionCreate", - execute(interaction) { - if (interaction.isChatInputCommand()) { - const command = (0, index_1.getInteractions)().getCommand(interaction.commandName); - if (!command) - return; - command.execute(interaction); - } - if (interaction.isSelectMenu()) { - const menu = (0, index_1.getInteractions)().getMenu(interaction.customId); - if (!menu) - return; - menu.execute(interaction); - } - if (interaction.isButton()) { - const button = (0, index_1.getInteractions)().getButton(interaction.customId); - if (!button) - return; - button.execute(interaction); - } - if (interaction.isAutocomplete()) { - const autoComplete = (0, index_1.getInteractions)().getAutoCompleteCommand(interaction.commandName); - if (!autoComplete) - return; - autoComplete.complete(interaction); - } - } -}; -//# sourceMappingURL=interaction.js.map \ No newline at end of file diff --git a/dist/src/events/interaction.js.map b/dist/src/events/interaction.js.map deleted file mode 100644 index fc44d88..0000000 --- a/dist/src/events/interaction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/events/interaction.ts"],"names":[],"mappings":";;AAEA,oCAA2C;AAE3C,kBAAe;IACX,IAAI,EAAE,mBAAmB;IACzB,OAAO,CAAC,WAAwB;QAC5B,IAAI,WAAW,CAAC,kBAAkB,EAAE,EAAC;YACjC,MAAM,OAAO,GAAG,IAAA,uBAAe,GAAE,CAAC,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YACtE,IAAI,CAAC,OAAO;gBAAE,OAAO;YACrB,OAAO,CAAC,OAAO,CAAC,WAAoD,CAAC,CAAC;SACzE;QACD,IAAI,WAAW,CAAC,YAAY,EAAE,EAAE;YAC5B,MAAM,IAAI,GAAG,IAAA,uBAAe,GAAE,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;YAC5D,IAAI,CAAC,IAAI;gBAAE,OAAO;YAClB,IAAI,CAAC,OAAO,CAAC,WAA8C,CAAC,CAAC;SAChE;QACD,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE;YACxB,MAAM,MAAM,GAAG,IAAA,uBAAe,GAAE,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;YAChE,IAAI,CAAC,MAAM;gBAAE,OAAO;YACpB,MAAM,CAAC,OAAO,CAAC,WAA0C,CAAC,CAAC;SAC9D;QACD,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE;YAC9B,MAAM,YAAY,GAAG,IAAA,uBAAe,GAAE,CAAC,sBAAsB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAA;YACtF,IAAI,CAAC,YAAY;gBAAE,OAAO;YAC1B,YAAY,CAAC,QAAQ,CAAC,WAAgD,CAAC,CAAA;SAC1E;IACL,CAAC;CACY,CAAC"} \ No newline at end of file diff --git a/dist/src/events/memberjoined.js b/dist/src/events/memberjoined.js deleted file mode 100644 index ae221e7..0000000 --- a/dist/src/events/memberjoined.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = { - name: "guildMemberAdd", - execute(member) { - if (member.guild.id === "738561073916936333" && !member.user.bot) { - member.roles.add("747019602860441630").catch(() => { }); - member.roles.add("874096315489992714").catch(() => { }); - } - } -}; -//# sourceMappingURL=memberjoined.js.map \ No newline at end of file diff --git a/dist/src/events/memberjoined.js.map b/dist/src/events/memberjoined.js.map deleted file mode 100644 index 107464a..0000000 --- a/dist/src/events/memberjoined.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"memberjoined.js","sourceRoot":"","sources":["../../../src/events/memberjoined.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACX,IAAI,EAAE,gBAAgB;IACtB,OAAO,CAAC,MAAmB;QACvB,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,oBAAoB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAC;YAC7D,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;YACtD,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;SACzD;IACL,CAAC;CACY,CAAC"} \ No newline at end of file diff --git a/dist/src/events/ready.js b/dist/src/events/ready.js deleted file mode 100644 index a97d1cb..0000000 --- a/dist/src/events/ready.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const discord_js_1 = require("discord.js"); -const support_config_json_1 = require("../../configs/support.config.json"); -exports.default = { - name: "ready", - once: true, - execute(client) { - console.log(`Ready! Logged in as ${client.user?.tag}`); - if (support_config_json_1.channel && support_config_json_1.message) { - client.channels.fetch(support_config_json_1.channel).then(c => { - if (!(c instanceof discord_js_1.TextChannel)) - return; - c.messages.fetch(support_config_json_1.message).then(msg => { - const selectionBox = new discord_js_1.SelectMenuBuilder(); - selectionBox.setPlaceholder("Select a support channel."); - selectionBox.setCustomId("support"); - selectionBox.setMaxValues(1); - selectionBox.setMinValues(1); - let options = []; - for (const message of Object.keys(support_config_json_1.messages)) { - options.push({ - // @ts-ignore - label: support_config_json_1.messages[message].label, - value: `message_${message}` - }); - } - for (let thread of Object.keys(support_config_json_1.threads)) { - options.push({ - // @ts-ignore - label: support_config_json_1.threads[thread], - value: thread - }); - } - const row = new discord_js_1.ActionRowBuilder() - .addComponents([selectionBox.addOptions(options)]); - msg.edit({ - embeds: [ - { - title: "Support Channels", - description: "Click the selection menu below to select which support channel you may need.", - fields: [ - { - name: "Info", - value: "If a category has (Dev) next to it that means its for the creation of that thing or about the use of that in development process not general user use." - } - ] - } - ], - components: [row] - }); - }); - }); - } - } -}; -//# sourceMappingURL=ready.js.map \ No newline at end of file diff --git a/dist/src/events/ready.js.map b/dist/src/events/ready.js.map deleted file mode 100644 index a443b85..0000000 --- a/dist/src/events/ready.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ready.js","sourceRoot":"","sources":["../../../src/events/ready.ts"],"names":[],"mappings":";;AAAA,2CAAoF;AAIpF,2EAAwF;AAExF,kBAAe;IACX,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,IAAI;IACV,OAAO,CAAC,MAAc;QAClB,OAAO,CAAC,GAAG,CAAC,uBAAuB,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QAEvD,IAAI,6BAAO,IAAI,6BAAO,EAAE;YACpB,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,6BAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;gBACpC,IAAI,CAAC,CAAC,CAAC,YAAY,wBAAW,CAAC;oBAAE,OAAO;gBAExC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,6BAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;oBACjC,MAAM,YAAY,GAAG,IAAI,8BAAiB,EAAE,CAAC;oBAC7C,YAAY,CAAC,cAAc,CAAC,2BAA2B,CAAC,CAAC;oBACzD,YAAY,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;oBACpC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;oBAC7B,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;oBAE7B,IAAI,OAAO,GAAG,EAAE,CAAC;oBACjB,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,8BAAQ,CAAC,EAAE;wBACzC,OAAO,CAAC,IAAI,CAAC;4BACT,aAAa;4BACb,KAAK,EAAE,8BAAQ,CAAC,OAAO,CAAC,CAAC,KAAK;4BAC9B,KAAK,EAAE,WAAW,OAAO,EAAE;yBAC9B,CAAC,CAAC;qBACN;oBAED,KAAK,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,6BAAO,CAAC,EAAE;wBACrC,OAAO,CAAC,IAAI,CAAC;4BACT,aAAa;4BACb,KAAK,EAAE,6BAAO,CAAC,MAAM,CAAC;4BACtB,KAAK,EAAE,MAAM;yBAChB,CAAC,CAAC;qBACN;oBAED,MAAM,GAAG,GAAG,IAAI,6BAAgB,EAAoC;yBAC/D,aAAa,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAEvD,GAAG,CAAC,IAAI,CAAC;wBACL,MAAM,EAAE;4BACJ;gCACI,KAAK,EAAE,kBAAkB;gCACzB,WAAW,EAAE,8EAA8E;gCAC3F,MAAM,EAAE;oCACJ;wCACI,IAAI,EAAE,MAAM;wCACZ,KAAK,EAAE,wJAAwJ;qCAClK;iCACJ;6BACJ;yBACJ;wBACD,UAAU,EAAE,CAAC,GAAG,CAAC;qBACpB,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;SACN;IACL,CAAC;CACY,CAAC"} \ No newline at end of file diff --git a/dist/src/index.js b/dist/src/index.js deleted file mode 100644 index 3ad5e1f..0000000 --- a/dist/src/index.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getCommands = exports.getInteractions = void 0; -//import { token } from "../configs/config.json"; -const discord_js_1 = require("discord.js"); -const interactions_1 = require("./utils/interactions"); -const commands_1 = require("./utils/commands"); -const process = __importStar(require("process")); -const client = new discord_js_1.Client({ intents: [discord_js_1.GatewayIntentBits.Guilds, discord_js_1.GatewayIntentBits.GuildMembers, discord_js_1.GatewayIntentBits.GuildMessages] }); -const interactions = new interactions_1.Interactions(client); -const commands = new commands_1.Commands(); -const getCommands = () => commands; -exports.getCommands = getCommands; -const getInteractions = () => interactions; -exports.getInteractions = getInteractions; -if (!process.env.DISCORD_TOKEN) { - console.log(process.env.DISCORD_TOKEN); - throw new Error("DISCORD_TOKEN environment variable missing."); -} -client.login(process.env.DISCORD_TOKEN); -/* -process.on('uncaughtException', err => { - console.error(err.stack); -});*/ -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/src/index.js.map b/dist/src/index.js.map deleted file mode 100644 index d53c5cf..0000000 --- a/dist/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAiD;AACjD,2CAAqD;AACrD,uDAAoD;AACpD,+CAA0C;AAC1C,iDAAmC;AAEnC,MAAM,MAAM,GAAG,IAAI,mBAAM,CAAC,EAAE,OAAO,EAAE,CAAC,8BAAiB,CAAC,MAAM,EAAE,8BAAiB,CAAC,YAAY,EAAE,8BAAiB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AACpI,MAAM,YAAY,GAAG,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC;AAC9C,MAAM,QAAQ,GAAG,IAAI,mBAAQ,EAAE,CAAC;AAEhC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC;AAW1B,kCAAW;AAVpB,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC;AASlC,0CAAe;AAPxB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACtC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;CACjE;AAED,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AAKxC;;;KAGK"} \ No newline at end of file diff --git a/dist/src/menus/role_selection.js b/dist/src/menus/role_selection.js deleted file mode 100644 index b34dfa9..0000000 --- a/dist/src/menus/role_selection.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const roles_config_json_1 = require("../../configs/roles.config.json"); -exports.default = { - id: "role_selection", - execute(menu) { - if (!menu.inGuild()) - return; - const values = menu.values; - let roles = menu.member.roles; - if (values.length === 0 && roles.cache.has(roles_config_json_1.addAbleRolesRole)) { - roles.remove(roles_config_json_1.addAbleRolesRole).catch(() => { }); - } - else if (values.length > 0 && !roles.cache.has(roles_config_json_1.addAbleRolesRole)) { - roles.add(roles_config_json_1.addAbleRolesRole).catch(() => { }); - } - const rolesInSelection = Object.keys(roles_config_json_1.roleSelections); - const rolesToRemove = rolesInSelection.filter(id => roles.cache.has(id) && !values.includes(id)); - const rolesToAdd = values.filter(id => rolesInSelection.includes(id) && !roles.cache.has(id)); - rolesToRemove.forEach(id => roles.remove(id).catch(() => { })); - rolesToAdd.forEach(id => roles.add(id).catch(() => { })); - menu.reply({ content: "Roles changed! You can Dismiss these.", ephemeral: true }); - } -}; -//# sourceMappingURL=role_selection.js.map \ No newline at end of file diff --git a/dist/src/menus/role_selection.js.map b/dist/src/menus/role_selection.js.map deleted file mode 100644 index ac3171d..0000000 --- a/dist/src/menus/role_selection.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"role_selection.js","sourceRoot":"","sources":["../../../src/menus/role_selection.ts"],"names":[],"mappings":";;AAEA,uEAAmF;AAEnF,kBAAe;IACX,EAAE,EAAE,gBAAgB;IACpB,OAAO,CAAC,IAAqC;QACzC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YAAE,OAAO;QAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QAC9B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,oCAAgB,CAAC,EAAE;YAC1D,KAAK,CAAC,MAAM,CAAC,oCAAgB,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;SACjD;aAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,oCAAgB,CAAC,EAAE;YAChE,KAAK,CAAC,GAAG,CAAC,oCAAgB,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;SAC9C;QACD,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,kCAAc,CAAC,CAAA;QACpD,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAA,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAChG,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;QAE7F,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAA;QAC7D,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAA;QAEvD,IAAI,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,uCAAuC,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;IACpF,CAAC;CACI,CAAC"} \ No newline at end of file diff --git a/dist/src/menus/support.js b/dist/src/menus/support.js deleted file mode 100644 index 2b8f6a0..0000000 --- a/dist/src/menus/support.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const support_config_json_1 = require("../../configs/support.config.json"); -exports.default = { - id: "support", - execute(menu) { - const value = menu.values[0]; - if (!value) - return menu.reply({ content: "No selection given", ephemeral: true }); - if (value.startsWith("message_")) { - // @ts-ignore - return menu.reply(support_config_json_1.messages[value.replace("message_", "")].message); - } - menu.client.channels.fetch(value).then(channel => { - if (!channel || !channel.isThread()) - return menu.reply({ content: "Support channel received wanted the correct format report this to @ThatGravyBoat", ephemeral: true }); - if (channel.archived) { - channel.setArchived(false, `Restoring for user <@${menu.member.id}>`) - .then(() => menu.reply({ content: `Click on this <#${channel.id}> to go to the proper support channel.`, ephemeral: true })); - } - else { - menu.reply({ content: `Click on this <#${channel.id}> to go to the proper support channel.`, ephemeral: true }); - } - }); - } -}; -//# sourceMappingURL=support.js.map \ No newline at end of file diff --git a/dist/src/menus/support.js.map b/dist/src/menus/support.js.map deleted file mode 100644 index 37964aa..0000000 --- a/dist/src/menus/support.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"support.js","sourceRoot":"","sources":["../../../src/menus/support.ts"],"names":[],"mappings":";;AAEA,2EAA6D;AAE7D,kBAAe;IACX,EAAE,EAAE,SAAS;IACb,OAAO,CAAC,IAAqC;QACzC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,EAAC,OAAO,EAAC,oBAAoB,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;QAE/E,IAAI,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;YAC9B,aAAa;YACb,OAAO,IAAI,CAAC,KAAK,CAAC,8BAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;SACtE;QAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YAC7C,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;gBAAE,OAAO,IAAI,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,kFAAkF,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;YACvK,IAAI,OAAO,CAAC,QAAQ,EAAC;gBACjB,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,wBAAwB,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC;qBAChE,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,mBAAmB,OAAO,CAAC,EAAE,wCAAwC,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;aAClI;iBAAK;gBACF,IAAI,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,mBAAmB,OAAO,CAAC,EAAE,wCAAwC,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;aACjH;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACI,CAAC"} \ No newline at end of file diff --git a/dist/src/utils/commands.js b/dist/src/utils/commands.js deleted file mode 100644 index 27453e4..0000000 --- a/dist/src/utils/commands.js +++ /dev/null @@ -1,97 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CommandType = exports.Commands = void 0; -const discord_js_1 = require("discord.js"); -const database_1 = require("./database"); -const process = __importStar(require("process")); -class Commands { - database; - commands; - constructor() { - console.log(process.env.DB_HOST); - console.log(process.env.DB_NAME); - console.log(process.env.DB_PASSWORD); - console.log(process.env.DB_PORT); - console.log(process.env.DB_USER); - this.database = new database_1.Database(`{host: ${process.env.DB_HOST}, database: ${process.env.DB_NAME}, password: ${process.env.DB_PASSWORD}, port: ${process.env.DB_PORT}, user: ${process.env.DB_USER}}`); - this.commands = new discord_js_1.Collection(Object.values(CommandType).map(type => [type, new discord_js_1.Collection()])); - this.database.connect() - .then(() => { - console.log("connected to database!"); - for (let type of Object.values(CommandType)) { - this.database.query("SELECT `category`, `key`, `value` FROM `commands` WHERE `category` = ?", [type]) - .then(async (results) => { - const category = this.commands.get(type); - if (category) { - for (let result of results) { - category.set(result.key, result.value); - } - } - }) - .catch(error => { - console.error("Failed to retrieve command from database: ", error); - }); - } - }) - .catch(err => { - console.error("Could not connect to command database: ", err); - }); - } - remove(category, id) { - this.database.query("DELETE FROM `commands` WHERE `category` = ? AND `key` = ?", [category, id]) - .then(() => { - this.commands.get(category)?.delete(id); - }) - .catch(err => { - console.error('failed to remove command in database', err); - }); - } - add(category, id, value) { - this.database.query("INSERT IGNORE INTO `commands` (`category`, `key`, `value`) VALUES (?)", [[category, id, value]]) - .then(results => { - this.commands.get(category)?.set(id, value); - }) - .catch(err => { - console.error('failed to set command in database', err); - }); - } - get(category, id) { - return this.commands.get(category)?.get(id); - } - getCommands(category) { - return this.commands.get(category)?.keys(); - } - has(category, id) { - return this.commands.get(category)?.has(id) || false; - } -} -exports.Commands = Commands; -var CommandType; -(function (CommandType) { - CommandType["HELP"] = "help"; - CommandType["WIKI"] = "wiki"; -})(CommandType = exports.CommandType || (exports.CommandType = {})); -//# sourceMappingURL=commands.js.map \ No newline at end of file diff --git a/dist/src/utils/commands.js.map b/dist/src/utils/commands.js.map deleted file mode 100644 index e50d22c..0000000 --- a/dist/src/utils/commands.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/utils/commands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAwC;A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,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,CAAC,EAAE;YACT,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,GAAG,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;IACX,CAAC;IAED,GAAG,CAAC,QAAqB,EAAE,EAAU;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,WAAW,CAAC,QAAqB;QAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC;IAC/C,CAAC;IAED,GAAG,CAAC,QAAqB,EAAE,EAAU;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC;IACzD,CAAC;CACJ;AApED,4BAoEC;AAED,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,4BAAa,CAAA;AACjB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB"} \ No newline at end of file diff --git a/dist/src/utils/database.js b/dist/src/utils/database.js deleted file mode 100644 index fbad8a7..0000000 --- a/dist/src/utils/database.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Database = void 0; -const mysql_1 = __importDefault(require("mysql")); -class Database { - connection; - constructor(config) { - this.connection = mysql_1.default.createConnection(config); - } - query(sql, values) { - return new Promise((resolve, reject) => { - this.connection.query(sql, values, (err, results) => { - if (err) - return reject(err); - resolve(results); - }); - }); - } - connect() { - return new Promise((resolve, reject) => { - this.connection.connect((err) => { - if (err) - return reject(err); - resolve(); - }); - }); - } - getConnection() { - return this.connection; - } -} -exports.Database = Database; -//# sourceMappingURL=database.js.map \ No newline at end of file diff --git a/dist/src/utils/database.js.map b/dist/src/utils/database.js.map deleted file mode 100644 index d11f842..0000000 --- a/dist/src/utils/database.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"database.js","sourceRoot":"","sources":["../../../src/utils/database.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA4D;AAE5D,MAAa,QAAQ;IACA,UAAU,CAAa;IAExC,YAAY,MAAiC;QACzC,IAAI,CAAC,UAAU,GAAG,eAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACpD,CAAC;IAED,KAAK,CAAC,GAAW,EAAE,MAAW;QAC1B,OAAO,IAAI,OAAO,CAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACxC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;gBAChD,IAAI,GAAG;oBAAE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC5B,OAAO,CAAC,OAAO,CAAC,CAAC;YACrB,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACN,CAAC;IAED,OAAO;QACH,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC5B,IAAI,GAAG;oBAAE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC5B,OAAO,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IAED,aAAa;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ;AA5BD,4BA4BC"} \ No newline at end of file diff --git a/dist/src/utils/interactions.js b/dist/src/utils/interactions.js deleted file mode 100644 index 244d25f..0000000 --- a/dist/src/utils/interactions.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Interactions = void 0; -const promises_1 = require("fs/promises"); -const discord_js_1 = require("discord.js"); -class Interactions { - commands; - autoCompleteCommands; - buttons; - menus; - constructor(client) { - let commands = new discord_js_1.Collection(); - let autoCompleteCommands = new discord_js_1.Collection(); - let buttons = new discord_js_1.Collection(); - let menus = new discord_js_1.Collection(); - (0, promises_1.readdir)("./dist/src/events") - .then(r => r.filter(file => file.endsWith(".js"))) - .then(files => files.forEach(async (file) => { - const event = (await Promise.resolve(`${`../events/${file}`}`).then(s => __importStar(require(s)))).default; - console.log(`Added event listener: ${event.name}`); - if (event.once) - client.once(event.name, (...args) => event.execute(...args, client)); - else - client.on(event.name, (...args) => event.execute(...args, client)); - })); - (0, promises_1.readdir)("./dist/src/commands") - .then(r => r.filter(file => file.endsWith(".js"))) - .then(files => files.forEach(async (file) => { - const command = (await Promise.resolve(`${`../commands/${file}`}`).then(s => __importStar(require(s)))).default; - if (command.id) - commands.set(command.id, command); - })); - (0, promises_1.readdir)("./dist/src/autocomplete") - .then(r => r.filter(file => file.endsWith(".js"))) - .then(files => files.forEach(async (file) => { - const command = (await Promise.resolve(`${`../autocomplete/${file}`}`).then(s => __importStar(require(s)))).default; - if (command.id) { - autoCompleteCommands.set(command.id, command); - commands.set(command.id, command); - } - })); - (0, promises_1.readdir)("./dist/src/buttons") - .then(r => r.filter(file => file.endsWith(".js"))) - .then(files => files.forEach(async (file) => { - const button = (await Promise.resolve(`${`../buttons/${file}`}`).then(s => __importStar(require(s)))).default; - if (button.id) - buttons.set(button.id, button); - })); - (0, promises_1.readdir)("./dist/src/menus") - .then(r => r.filter(file => file.endsWith(".js"))) - .then(files => files.forEach(async (file) => { - const menu = (await Promise.resolve(`${`../menus/${file}`}`).then(s => __importStar(require(s)))).default; - if (menu.id) - menus.set(menu.id, menu); - })); - this.commands = commands; - this.autoCompleteCommands = autoCompleteCommands; - this.buttons = buttons; - this.menus = menus; - } - getCommand(command) { - return this.commands.get(command); - } - getAutoCompleteCommand(command) { - return this.autoCompleteCommands.get(command); - } - getButton(button) { - return this.buttons.get(button); - } - getMenu(menu) { - return this.menus.get(menu); - } -} -exports.Interactions = Interactions; -//# sourceMappingURL=interactions.js.map \ No newline at end of file diff --git a/dist/src/utils/interactions.js.map b/dist/src/utils/interactions.js.map deleted file mode 100644 index 7068d94..0000000 --- a/dist/src/utils/interactions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interactions.js","sourceRoot":"","sources":["../../../src/utils/interactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAsC;AACtC,2CAA4D;AAG5D,MAAa,YAAY;IACJ,QAAQ,CAA8B;IACtC,oBAAoB,CAA0C;IAC9D,OAAO,CAA6B;IACpC,KAAK,CAA2B;IAEjD,YAAY,MAAc;QACtB,IAAI,QAAQ,GAAG,IAAI,uBAAU,EAAmB,CAAC;QACjD,IAAI,oBAAoB,GAAG,IAAI,uBAAU,EAA+B,CAAC;QACzE,IAAI,OAAO,GAAG,IAAI,uBAA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AA;QAEP,IAAA,kBAAO,EAAC,kBAAkB,CAAC;aACtB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;aACjD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAC,IAAI,EAAC,EAAE;YACtC,MAAM,IAAI,GAAS,CAAC,yBAAa,YAAY,IAAI,EAAE,uCAAC,CAAC,CAAC,OAAO,CAAC;YAC9D,IAAI,IAAI,CAAC,EAAE;gBAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC,CAAA;QAEP,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;QACjD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,UAAU,CAAC,OAAe;QACtB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED,sBAAsB,CAAC,OAAe;QAClC,OAAO,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAED,SAAS,CAAC,MAAc;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CAAC,IAAY;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACJ;AAzED,oCAyEC"} \ No newline at end of file diff --git a/dist/src/utils/types.js b/dist/src/utils/types.js deleted file mode 100644 index 11e638d..0000000 --- a/dist/src/utils/types.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/dist/src/utils/types.js.map b/dist/src/utils/types.js.map deleted file mode 100644 index b4ae664..0000000 --- a/dist/src/utils/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":""} \ No newline at end of file