From 580b7124969cd0ad06da626b7664a87913b4d29f Mon Sep 17 00:00:00 2001 From: SrIzan10 <66965250+SrIzan10@users.noreply.github.com> Date: Sun, 23 Apr 2023 11:35:26 +0200 Subject: [PATCH] fix: wtf? vscode? hello? --- .prettierrc | 4 +- .vscode/settings.json | 4 +- Dockerfile | 24 ++-- LICENSE | 42 +++---- README.md | 20 ++-- commands/handler/awards-1.ts | 202 ++++++++++++++++----------------- commands/handler/awards-2.ts | 164 +++++++++++++-------------- commands/handler/awards-3.ts | 100 ++++++++--------- commands/menumsg/Highlight.ts | 74 ++++++------ events/djs/guildMemberAdd.ts | 42 +++---- events/djs/movePablo.ts | 26 ++--- events/djs/ready.ts | 16 +-- events/djs/tiktok.ts | 70 ++++++------ events/sern/error.ts | 14 +-- schemas/highlights.ts | 22 ++-- schemas/pepega.ts | 20 ++-- tsconfig.json | 206 +++++++++++++++++----------------- 17 files changed, 525 insertions(+), 525 deletions(-) diff --git a/.prettierrc b/.prettierrc index c115a4c..6a98bcf 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,3 @@ -{ - "useTabs": true +{ + "useTabs": true } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index ed785b5..f8f5460 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ -{ - "dotenv.enableAutocloaking": false +{ + "dotenv.enableAutocloaking": false } \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 62f9e85..c2d73e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ -FROM node:lts-alpine - -WORKDIR /app - -COPY package.json ./ - -RUN npm i - -COPY . . - -RUN npm run build - +FROM node:lts-alpine + +WORKDIR /app + +COPY package.json ./ + +RUN npm i + +COPY . . + +RUN npm run build + CMD node ./dist/index.js \ No newline at end of file diff --git a/LICENSE b/LICENSE index a615a03..da5a8de 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2022 SrIzan10 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2022 SrIzan10 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 3268b01..3cb7c50 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# femboybot -i regret my life choices rn - -"features": -- weeb commands (my friends actually forced me to code this) - -this is open source because i need to have some way of git version control -(and to autodeploy to my server) - - +# femboybot +i regret my life choices rn + +"features": +- weeb commands (my friends actually forced me to code this) + +this is open source because i need to have some way of git version control +(and to autodeploy to my server) + + lol send help (jkjk) \ No newline at end of file diff --git a/commands/handler/awards-1.ts b/commands/handler/awards-1.ts index 133fe94..ea509ec 100644 --- a/commands/handler/awards-1.ts +++ b/commands/handler/awards-1.ts @@ -1,102 +1,102 @@ -import { commandModule, CommandType } from '@sern/handler'; -import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, EmbedBuilder, ModalActionRowComponentBuilder, ModalBuilder, TextChannel, TextInputBuilder, TextInputStyle } from 'discord.js'; - -export default commandModule({ - type: CommandType.Modal, - plugins: [], - execute: async (ctx) => { - await ctx.deferReply({ephemeral: true}) - const resp1 = ctx.fields.getTextInputValue('clip-del-ano') - const resp2 = ctx.fields.getTextInputValue('video-del-ano') - const resp3 = ctx.fields.getTextInputValue('integrante-racista') - const resp4 = ctx.fields.getTextInputValue('bot-mas-importante') - const resp5 = ctx.fields.getTextInputValue('mejor-mc-server') - - const embed = new EmbedBuilder() - .setColor('Green') - .setAuthor({ - name: ctx.user.username, - iconURL: ctx.user.displayAvatarURL() - }) - .setTitle('Awards response') - .setFields( - { name: 'Clip del año', value: resp1 }, - { name: 'Vídeo del año', value: resp2 }, - { name: 'Integrante más racista', value: resp3 }, - { name: 'Bot más importante', value: resp4 }, - { name: 'Mejor server de MC jugado', value: resp5 }, - ); - const fetchChannel = await ctx.client.channels.fetch(process.env.AWARDS!) as TextChannel - const message = await fetchChannel.send({ - embeds: [embed] - }) - - const modal = new ModalBuilder() - .setCustomId('awards-2') - .setTitle('Awards (parte 2)'); - const input = new TextInputBuilder() - .setCustomId('mas-horas-llamada') - .setLabel('Integrante con más horas en llamada') - .setStyle(TextInputStyle.Short); - const input2 = new TextInputBuilder() - .setCustomId('mas-mensajes-enviados') - .setLabel('Integrante con más mensajes enviados') - .setStyle(TextInputStyle.Short); - const input3 = new TextInputBuilder() - .setCustomId('mejor-emote') - .setLabel('Mejor emote') - .setStyle(TextInputStyle.Short); - const input4 = new TextInputBuilder() - .setCustomId('integrante-degenerado') - .setLabel('Integrante más degenerado') - .setStyle(TextInputStyle.Short); - const input5 = new TextInputBuilder() - .setCustomId('juego-mas-jugado') - .setLabel('Juego más jugado') - .setStyle(TextInputStyle.Short); - const one = - new ActionRowBuilder().addComponents( - input - ); - const two = - new ActionRowBuilder().addComponents( - input2 - ); - const three = - new ActionRowBuilder().addComponents( - input3 - ); - const four = - new ActionRowBuilder().addComponents( - input4 - ); - const five = - new ActionRowBuilder().addComponents( - input5 - ); - modal.addComponents([one, two, three, four, five]); - - const userEmbed = new EmbedBuilder() - .setColor('Green') - .setTitle('Aún no se ha acabado!') - .setDescription('Continúa dándole al botón!\nEn el embed de más abajo podrás ver tus respuestas hechas de momento.') - .setFooter({ text: `ID: ${message.id}` }) - const userButton = new ActionRowBuilder() - .addComponents( - new ButtonBuilder() - .setCustomId('awards-continue-1') - .setLabel('Continuar') - .setStyle(ButtonStyle.Success) - ) - const userMsg = await ctx.editReply({ - embeds: [userEmbed, embed], - components: [userButton] - }) - const collector = userMsg.createMessageComponentCollector({ time: 60_000, componentType: ComponentType.Button, max: 1 }) - collector.on('collect', async (i) => { - if (i.customId !== 'awards-continue-1') return; - - await i.showModal(modal) - }) - }, +import { commandModule, CommandType } from '@sern/handler'; +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, EmbedBuilder, ModalActionRowComponentBuilder, ModalBuilder, TextChannel, TextInputBuilder, TextInputStyle } from 'discord.js'; + +export default commandModule({ + type: CommandType.Modal, + plugins: [], + execute: async (ctx) => { + await ctx.deferReply({ephemeral: true}) + const resp1 = ctx.fields.getTextInputValue('clip-del-ano') + const resp2 = ctx.fields.getTextInputValue('video-del-ano') + const resp3 = ctx.fields.getTextInputValue('integrante-racista') + const resp4 = ctx.fields.getTextInputValue('bot-mas-importante') + const resp5 = ctx.fields.getTextInputValue('mejor-mc-server') + + const embed = new EmbedBuilder() + .setColor('Green') + .setAuthor({ + name: ctx.user.username, + iconURL: ctx.user.displayAvatarURL() + }) + .setTitle('Awards response') + .setFields( + { name: 'Clip del año', value: resp1 }, + { name: 'Vídeo del año', value: resp2 }, + { name: 'Integrante más racista', value: resp3 }, + { name: 'Bot más importante', value: resp4 }, + { name: 'Mejor server de MC jugado', value: resp5 }, + ); + const fetchChannel = await ctx.client.channels.fetch(process.env.AWARDS!) as TextChannel + const message = await fetchChannel.send({ + embeds: [embed] + }) + + const modal = new ModalBuilder() + .setCustomId('awards-2') + .setTitle('Awards (parte 2)'); + const input = new TextInputBuilder() + .setCustomId('mas-horas-llamada') + .setLabel('Integrante con más horas en llamada') + .setStyle(TextInputStyle.Short); + const input2 = new TextInputBuilder() + .setCustomId('mas-mensajes-enviados') + .setLabel('Integrante con más mensajes enviados') + .setStyle(TextInputStyle.Short); + const input3 = new TextInputBuilder() + .setCustomId('mejor-emote') + .setLabel('Mejor emote') + .setStyle(TextInputStyle.Short); + const input4 = new TextInputBuilder() + .setCustomId('integrante-degenerado') + .setLabel('Integrante más degenerado') + .setStyle(TextInputStyle.Short); + const input5 = new TextInputBuilder() + .setCustomId('juego-mas-jugado') + .setLabel('Juego más jugado') + .setStyle(TextInputStyle.Short); + const one = + new ActionRowBuilder().addComponents( + input + ); + const two = + new ActionRowBuilder().addComponents( + input2 + ); + const three = + new ActionRowBuilder().addComponents( + input3 + ); + const four = + new ActionRowBuilder().addComponents( + input4 + ); + const five = + new ActionRowBuilder().addComponents( + input5 + ); + modal.addComponents([one, two, three, four, five]); + + const userEmbed = new EmbedBuilder() + .setColor('Green') + .setTitle('Aún no se ha acabado!') + .setDescription('Continúa dándole al botón!\nEn el embed de más abajo podrás ver tus respuestas hechas de momento.') + .setFooter({ text: `ID: ${message.id}` }) + const userButton = new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setCustomId('awards-continue-1') + .setLabel('Continuar') + .setStyle(ButtonStyle.Success) + ) + const userMsg = await ctx.editReply({ + embeds: [userEmbed, embed], + components: [userButton] + }) + const collector = userMsg.createMessageComponentCollector({ time: 60_000, componentType: ComponentType.Button, max: 1 }) + collector.on('collect', async (i) => { + if (i.customId !== 'awards-continue-1') return; + + await i.showModal(modal) + }) + }, }); \ No newline at end of file diff --git a/commands/handler/awards-2.ts b/commands/handler/awards-2.ts index 4027e04..371cd52 100644 --- a/commands/handler/awards-2.ts +++ b/commands/handler/awards-2.ts @@ -1,83 +1,83 @@ -import { commandModule, CommandType } from '@sern/handler'; -import { ModalBuilder, TextInputBuilder, TextInputStyle, ActionRowBuilder, ModalActionRowComponentBuilder, EmbedBuilder, TextChannel, ButtonBuilder, ButtonStyle, ComponentType } from 'discord.js'; - -export default commandModule({ - type: CommandType.Modal, - plugins: [], - execute: async (ctx) => { - await ctx.deferReply({ephemeral: true}) - const resp1 = ctx.fields.getTextInputValue('mas-horas-llamada') - const resp2 = ctx.fields.getTextInputValue('mas-mensajes-enviados') - const resp3 = ctx.fields.getTextInputValue('mejor-emote') - const resp4 = ctx.fields.getTextInputValue('integrante-degenerado') - const resp5 = ctx.fields.getTextInputValue('juego-mas-jugado') - - const modal = new ModalBuilder() - .setCustomId('awards-3') - .setTitle('Awards (parte 3)'); - const input = new TextInputBuilder() - .setCustomId('mejor-respuesta') - .setLabel('Premio a la mejor respuesta') - .setPlaceholder('What\'s bofa? BOFA DEEZ NUTS HAHAHAHAAAA') - .setStyle(TextInputStyle.Short); - const input2 = new TextInputBuilder() - .setCustomId('mejor-mascota') - .setLabel('Mejor mascota del servidor') - .setPlaceholder('Creo que el olivas se refería a un animal') - .setStyle(TextInputStyle.Short); - const input3 = new TextInputBuilder() - .setCustomId('opinnion') - .setLabel('Algo que quieras que añada al server?') - .setPlaceholder('Escribe, no te cortes! :DIESOFCRINGE:') - .setStyle(TextInputStyle.Paragraph); - const one = - new ActionRowBuilder().addComponents( - input - ); - const two = - new ActionRowBuilder().addComponents( - input2 - ); - const three = - new ActionRowBuilder().addComponents( - input3 - ); - modal.addComponents([one, two, three]); - - const embed = new EmbedBuilder(ctx.message!.embeds[1].data) - .addFields( - { name: 'Integrante con más horas en llamada', value: resp1 }, - { name: 'Integrante con más mensajes enviados', value: resp2 }, - { name: 'Mejor emote', value: resp3 }, - { name: 'Integrante más degenerado', value: resp4 }, - { name: 'Juego más jugado', value: resp5 }, - ) - const fetchMsg = await (await ctx.client.channels.fetch(process.env.AWARDS!) as TextChannel).messages.fetch(ctx.message!.embeds[0].footer!.text.replace('ID: ', '')) - const responseMsg = await fetchMsg.edit({ - embeds: [embed] - }) - - const userEmbed = new EmbedBuilder() - .setColor('Random') - .setTitle('Ya casi estás!') - .setDescription('Continúa dándole al botón!\nEn el embed de más abajo podrás ver tus respuestas hechas de hasta ahora.') - .setFooter({ text: `ID: ${responseMsg.id}` }) - const userButton = new ActionRowBuilder() - .addComponents( - new ButtonBuilder() - .setCustomId('awards-continue-2') - .setLabel('Continuar') - .setStyle(ButtonStyle.Success) - ) - const userMsg = await ctx.editReply({ - embeds: [userEmbed, embed], - components: [userButton] - }) - const collector = userMsg.createMessageComponentCollector({ time: 60_000, componentType: ComponentType.Button, max: 1 }) - collector.on('collect', async (i) => { - if (i.customId !== 'awards-continue-2') return; - - await i.showModal(modal) - }) - }, +import { commandModule, CommandType } from '@sern/handler'; +import { ModalBuilder, TextInputBuilder, TextInputStyle, ActionRowBuilder, ModalActionRowComponentBuilder, EmbedBuilder, TextChannel, ButtonBuilder, ButtonStyle, ComponentType } from 'discord.js'; + +export default commandModule({ + type: CommandType.Modal, + plugins: [], + execute: async (ctx) => { + await ctx.deferReply({ephemeral: true}) + const resp1 = ctx.fields.getTextInputValue('mas-horas-llamada') + const resp2 = ctx.fields.getTextInputValue('mas-mensajes-enviados') + const resp3 = ctx.fields.getTextInputValue('mejor-emote') + const resp4 = ctx.fields.getTextInputValue('integrante-degenerado') + const resp5 = ctx.fields.getTextInputValue('juego-mas-jugado') + + const modal = new ModalBuilder() + .setCustomId('awards-3') + .setTitle('Awards (parte 3)'); + const input = new TextInputBuilder() + .setCustomId('mejor-respuesta') + .setLabel('Premio a la mejor respuesta') + .setPlaceholder('What\'s bofa? BOFA DEEZ NUTS HAHAHAHAAAA') + .setStyle(TextInputStyle.Short); + const input2 = new TextInputBuilder() + .setCustomId('mejor-mascota') + .setLabel('Mejor mascota del servidor') + .setPlaceholder('Creo que el olivas se refería a un animal') + .setStyle(TextInputStyle.Short); + const input3 = new TextInputBuilder() + .setCustomId('opinnion') + .setLabel('Algo que quieras que añada al server?') + .setPlaceholder('Escribe, no te cortes! :DIESOFCRINGE:') + .setStyle(TextInputStyle.Paragraph); + const one = + new ActionRowBuilder().addComponents( + input + ); + const two = + new ActionRowBuilder().addComponents( + input2 + ); + const three = + new ActionRowBuilder().addComponents( + input3 + ); + modal.addComponents([one, two, three]); + + const embed = new EmbedBuilder(ctx.message!.embeds[1].data) + .addFields( + { name: 'Integrante con más horas en llamada', value: resp1 }, + { name: 'Integrante con más mensajes enviados', value: resp2 }, + { name: 'Mejor emote', value: resp3 }, + { name: 'Integrante más degenerado', value: resp4 }, + { name: 'Juego más jugado', value: resp5 }, + ) + const fetchMsg = await (await ctx.client.channels.fetch(process.env.AWARDS!) as TextChannel).messages.fetch(ctx.message!.embeds[0].footer!.text.replace('ID: ', '')) + const responseMsg = await fetchMsg.edit({ + embeds: [embed] + }) + + const userEmbed = new EmbedBuilder() + .setColor('Random') + .setTitle('Ya casi estás!') + .setDescription('Continúa dándole al botón!\nEn el embed de más abajo podrás ver tus respuestas hechas de hasta ahora.') + .setFooter({ text: `ID: ${responseMsg.id}` }) + const userButton = new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setCustomId('awards-continue-2') + .setLabel('Continuar') + .setStyle(ButtonStyle.Success) + ) + const userMsg = await ctx.editReply({ + embeds: [userEmbed, embed], + components: [userButton] + }) + const collector = userMsg.createMessageComponentCollector({ time: 60_000, componentType: ComponentType.Button, max: 1 }) + collector.on('collect', async (i) => { + if (i.customId !== 'awards-continue-2') return; + + await i.showModal(modal) + }) + }, }); \ No newline at end of file diff --git a/commands/handler/awards-3.ts b/commands/handler/awards-3.ts index 86013e1..ebba9a7 100644 --- a/commands/handler/awards-3.ts +++ b/commands/handler/awards-3.ts @@ -1,51 +1,51 @@ -import { commandModule, CommandType } from '@sern/handler'; -import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, EmbedBuilder, GuildMemberRoleManager, TextChannel } from 'discord.js'; - -export default commandModule({ - type: CommandType.Modal, - plugins: [], - execute: async (ctx) => { - await ctx.deferReply({ephemeral: true}) - const resp1 = ctx.fields.getTextInputValue('mejor-respuesta') - const resp2 = ctx.fields.getTextInputValue('mejor-mascota') - const resp3 = ctx.fields.getTextInputValue('opinnion') - - const embed = new EmbedBuilder(ctx.message!.embeds[1].data) - .addFields( - { name: 'Mejor respuesta', value: resp1 }, - { name: 'Mejor mascota', value: resp2 }, - { name: 'Opinión', value: resp3 } - ) - const fetchMsg = await (await ctx.client.channels.fetch(process.env.AWARDS!) as TextChannel).messages.fetch(ctx.message!.embeds[0].footer!.text.replace('ID: ', '')) - await fetchMsg.edit({ - embeds: [embed] - }) - - const userEmbed = new EmbedBuilder() - .setColor('Random') - .setTitle('Listo!') - .setDescription('Se acabó! Gracias por responder. Las preguntas han sido hechas por <@630502288154427414>.\nEn el embed de más abajo podrás ver tus respuestas hechas.') - const userButton = new ActionRowBuilder() - .addComponents( - new ButtonBuilder() - .setCustomId('awards-responses') - .setLabel('Enseñar respuestas finales') - .setStyle(ButtonStyle.Secondary) - ) - const msg = await ctx.editReply({ - embeds: [userEmbed], - components: [userButton] - }) - const collector = msg.createMessageComponentCollector({componentType: ComponentType.Button, time: 60_000}) - collector.on('collect', async (i) => { - if (i.customId !== 'awards-responses') return; - - await i.deferReply({ ephemeral: true }) - await i.editReply({ - embeds: [embed] - }) - }) - - await (ctx.member?.roles as GuildMemberRoleManager).add('1060314978273472602') - }, +import { commandModule, CommandType } from '@sern/handler'; +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, EmbedBuilder, GuildMemberRoleManager, TextChannel } from 'discord.js'; + +export default commandModule({ + type: CommandType.Modal, + plugins: [], + execute: async (ctx) => { + await ctx.deferReply({ephemeral: true}) + const resp1 = ctx.fields.getTextInputValue('mejor-respuesta') + const resp2 = ctx.fields.getTextInputValue('mejor-mascota') + const resp3 = ctx.fields.getTextInputValue('opinnion') + + const embed = new EmbedBuilder(ctx.message!.embeds[1].data) + .addFields( + { name: 'Mejor respuesta', value: resp1 }, + { name: 'Mejor mascota', value: resp2 }, + { name: 'Opinión', value: resp3 } + ) + const fetchMsg = await (await ctx.client.channels.fetch(process.env.AWARDS!) as TextChannel).messages.fetch(ctx.message!.embeds[0].footer!.text.replace('ID: ', '')) + await fetchMsg.edit({ + embeds: [embed] + }) + + const userEmbed = new EmbedBuilder() + .setColor('Random') + .setTitle('Listo!') + .setDescription('Se acabó! Gracias por responder. Las preguntas han sido hechas por <@630502288154427414>.\nEn el embed de más abajo podrás ver tus respuestas hechas.') + const userButton = new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setCustomId('awards-responses') + .setLabel('Enseñar respuestas finales') + .setStyle(ButtonStyle.Secondary) + ) + const msg = await ctx.editReply({ + embeds: [userEmbed], + components: [userButton] + }) + const collector = msg.createMessageComponentCollector({componentType: ComponentType.Button, time: 60_000}) + collector.on('collect', async (i) => { + if (i.customId !== 'awards-responses') return; + + await i.deferReply({ ephemeral: true }) + await i.editReply({ + embeds: [embed] + }) + }) + + await (ctx.member?.roles as GuildMemberRoleManager).add('1060314978273472602') + }, }); \ No newline at end of file diff --git a/commands/menumsg/Highlight.ts b/commands/menumsg/Highlight.ts index 7dc14ad..4a838ab 100644 --- a/commands/menumsg/Highlight.ts +++ b/commands/menumsg/Highlight.ts @@ -1,37 +1,37 @@ -import { commandModule, CommandType } from "@sern/handler"; -import { publish } from "../../plugins/publish.js"; -import db from "../../schemas/highlights.js"; -import { Model } from "mongoose"; - -export default commandModule({ - type: CommandType.CtxMsg, - plugins: [publish()], - // alias : [], - execute: async (ctx) => { - await ctx.deferReply(); - const author = ctx.targetMessage.author; - const message = ctx.targetMessage.id; - db.countDocuments( - { msgid: message }, - async function (err: Error, count: number) { - if (err) throw err - if (count > 0) { - return await ctx.editReply({ - content: "Este mensaje ya ha sido guardado en la base de datos", - }); - } else { - const save = new db({ - authorid: author.id, - channelid: ctx.channel!.id, - msgid: message, - }); - await save.save(); - await ctx.editReply({ - content: `El mensaje de ${author} con ID \`${message}\` ha sido guardado correctamente en la base de datos!`, - allowedMentions: { repliedUser: false } - }); - } - } - ); - }, -}); +import { commandModule, CommandType } from "@sern/handler"; +import { publish } from "../../plugins/publish.js"; +import db from "../../schemas/highlights.js"; +import { Model } from "mongoose"; + +export default commandModule({ + type: CommandType.CtxMsg, + plugins: [publish()], + // alias : [], + execute: async (ctx) => { + await ctx.deferReply(); + const author = ctx.targetMessage.author; + const message = ctx.targetMessage.id; + db.countDocuments( + { msgid: message }, + async function (err: Error, count: number) { + if (err) throw err + if (count > 0) { + return await ctx.editReply({ + content: "Este mensaje ya ha sido guardado en la base de datos", + }); + } else { + const save = new db({ + authorid: author.id, + channelid: ctx.channel!.id, + msgid: message, + }); + await save.save(); + await ctx.editReply({ + content: `El mensaje de ${author} con ID \`${message}\` ha sido guardado correctamente en la base de datos!`, + allowedMentions: { repliedUser: false } + }); + } + } + ); + }, +}); diff --git a/events/djs/guildMemberAdd.ts b/events/djs/guildMemberAdd.ts index c32d4e3..c8fa03f 100644 --- a/events/djs/guildMemberAdd.ts +++ b/events/djs/guildMemberAdd.ts @@ -1,21 +1,21 @@ -import { EmbedBuilder, GuildMember, TextChannel } from "discord.js"; - -import { EventType, eventModule } from "@sern/handler"; - -export default eventModule({ - type: EventType.Discord, - execute(member: GuildMember) { - const newMemberEmbed = new EmbedBuilder() - .setColor("Random") - .setTitle("Nuevo miembro!") - .setDescription(`${member.user} acaba de entrar al servidor, oh no`) - .setThumbnail(member.user.displayAvatarURL()) - .setFooter({text: 'Ya le he dado automáticamente el rol de gente limitada.'}) - .setTimestamp(); - const channel = member.client.guilds.cache - .get("839200013187285002")! - .channels.cache.get("939533050205839430") as TextChannel; - channel.send({ embeds: [newMemberEmbed] }); - member.roles.add('940618686853677116') - }, -}); +import { EmbedBuilder, GuildMember, TextChannel } from "discord.js"; + +import { EventType, eventModule } from "@sern/handler"; + +export default eventModule({ + type: EventType.Discord, + execute(member: GuildMember) { + const newMemberEmbed = new EmbedBuilder() + .setColor("Random") + .setTitle("Nuevo miembro!") + .setDescription(`${member.user} acaba de entrar al servidor, oh no`) + .setThumbnail(member.user.displayAvatarURL()) + .setFooter({text: 'Ya le he dado automáticamente el rol de gente limitada.'}) + .setTimestamp(); + const channel = member.client.guilds.cache + .get("839200013187285002")! + .channels.cache.get("939533050205839430") as TextChannel; + channel.send({ embeds: [newMemberEmbed] }); + member.roles.add('940618686853677116') + }, +}); diff --git a/events/djs/movePablo.ts b/events/djs/movePablo.ts index 323fe10..a8fcab2 100644 --- a/events/djs/movePablo.ts +++ b/events/djs/movePablo.ts @@ -1,14 +1,14 @@ -import { EventType, eventModule } from "@sern/handler"; -import { VoiceChannel, VoiceState } from "discord.js"; - -export default eventModule({ - type: EventType.Discord, - name: 'voiceStateUpdate', - execute: async (oldState: VoiceState, newState: VoiceState) => { - if (newState.member!.id !== '954042602615869520') return; - - if (newState.channelId === '940619088550559745' && (await newState.client.channels.fetch('839200013618774028') as VoiceChannel).members.size >= 1) { - await newState.member?.voice.setChannel('839200013618774028') - } - }, +import { EventType, eventModule } from "@sern/handler"; +import { VoiceChannel, VoiceState } from "discord.js"; + +export default eventModule({ + type: EventType.Discord, + name: 'voiceStateUpdate', + execute: async (oldState: VoiceState, newState: VoiceState) => { + if (newState.member!.id !== '954042602615869520') return; + + if (newState.channelId === '940619088550559745' && (await newState.client.channels.fetch('839200013618774028') as VoiceChannel).members.size >= 1) { + await newState.member?.voice.setChannel('839200013618774028') + } + }, }); \ No newline at end of file diff --git a/events/djs/ready.ts b/events/djs/ready.ts index 2865475..51f6732 100644 --- a/events/djs/ready.ts +++ b/events/djs/ready.ts @@ -1,9 +1,9 @@ -import { EventType, eventModule } from "@sern/handler"; -import { Client } from "discord.js"; - -export default eventModule({ - type: EventType.Discord, - execute: async () => { - console.log('el bot c ha ensendio'); - }, +import { EventType, eventModule } from "@sern/handler"; +import { Client } from "discord.js"; + +export default eventModule({ + type: EventType.Discord, + execute: async () => { + console.log('el bot c ha ensendio'); + }, }); \ No newline at end of file diff --git a/events/djs/tiktok.ts b/events/djs/tiktok.ts index d4edd84..c148cc1 100644 --- a/events/djs/tiktok.ts +++ b/events/djs/tiktok.ts @@ -1,36 +1,36 @@ -import { EventType, eventModule } from "@sern/handler"; -import { ActionRowBuilder, AttachmentBuilder, ButtonBuilder, Client, Message } from "discord.js"; -import axios from 'axios' - -export default eventModule({ - type: EventType.Discord, - name: 'messageCreate', - execute: async (message: Message) => { - if (!message.content.includes('tiktok.com')) return; - - try { - const index = message.content.indexOf("https://"); - let link = 'some goofy ahh string that is gonna be replaced' - if (index !== -1) { - let endIndex = message.content.indexOf(" ", index); - if (endIndex === -1) { - endIndex = message.content.length; - } - link = message.content.substring(index, endIndex); - } - - const scrap = await axios.get(`https://www.tikwm.com/api/?url=${link}`, { headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' } }).then(res => res.data) - const shorten = await axios.post(`https://cleanuri.com/api/v1/shorten`, { 'url': scrap.data.play }).then(res => res.data) - const audio = await axios.get(scrap.data.music, { responseType: 'arraybuffer' }).then(res => res.data) - const audioAttachment = new AttachmentBuilder(audio, { name: 'audio.mp3' }) - - await message.reply({ - content: `Vídeo: ${shorten.result_url}`, - files: [audioAttachment] - }) - } catch (e) { - message.react('❌') - console.log(e) - } - }, +import { EventType, eventModule } from "@sern/handler"; +import { ActionRowBuilder, AttachmentBuilder, ButtonBuilder, Client, Message } from "discord.js"; +import axios from 'axios' + +export default eventModule({ + type: EventType.Discord, + name: 'messageCreate', + execute: async (message: Message) => { + if (!message.content.includes('tiktok.com')) return; + + try { + const index = message.content.indexOf("https://"); + let link = 'some goofy ahh string that is gonna be replaced' + if (index !== -1) { + let endIndex = message.content.indexOf(" ", index); + if (endIndex === -1) { + endIndex = message.content.length; + } + link = message.content.substring(index, endIndex); + } + + const scrap = await axios.get(`https://www.tikwm.com/api/?url=${link}`, { headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' } }).then(res => res.data) + const shorten = await axios.post(`https://cleanuri.com/api/v1/shorten`, { 'url': scrap.data.play }).then(res => res.data) + const audio = await axios.get(scrap.data.music, { responseType: 'arraybuffer' }).then(res => res.data) + const audioAttachment = new AttachmentBuilder(audio, { name: 'audio.mp3' }) + + await message.reply({ + content: `Vídeo: ${shorten.result_url}`, + files: [audioAttachment] + }) + } catch (e) { + message.react('❌') + console.log(e) + } + }, }); \ No newline at end of file diff --git a/events/sern/error.ts b/events/sern/error.ts index c45bc2e..fade477 100644 --- a/events/sern/error.ts +++ b/events/sern/error.ts @@ -1,8 +1,8 @@ -import { EventType, eventModule } from "@sern/handler"; - -export default eventModule({ - type: EventType.Sern, - execute(err) { - console.log(err); - }, +import { EventType, eventModule } from "@sern/handler"; + +export default eventModule({ + type: EventType.Sern, + execute(err) { + console.log(err); + }, }); \ No newline at end of file diff --git a/schemas/highlights.ts b/schemas/highlights.ts index b9c17f5..005f7d9 100644 --- a/schemas/highlights.ts +++ b/schemas/highlights.ts @@ -1,12 +1,12 @@ -import { model, Schema } from "mongoose"; - -const schema = new Schema({ - authorid: {type: String, required: true}, - channelid: {type: String, required: true}, - msgid: {type: String, required: true} -}) - -// @ts-ignore -const db = new model('highlights', schema) - +import { model, Schema } from "mongoose"; + +const schema = new Schema({ + authorid: {type: String, required: true}, + channelid: {type: String, required: true}, + msgid: {type: String, required: true} +}) + +// @ts-ignore +const db = new model('highlights', schema) + export default db; \ No newline at end of file diff --git a/schemas/pepega.ts b/schemas/pepega.ts index 8639d9c..b758fd4 100644 --- a/schemas/pepega.ts +++ b/schemas/pepega.ts @@ -1,11 +1,11 @@ -import { model, Schema } from "mongoose"; - -const schema = new Schema({ - userid: {type: String, required: true}, - times: {type: Number, required: true} -}) - -// @ts-ignore -const db = new model('pepega', schema) - +import { model, Schema } from "mongoose"; + +const schema = new Schema({ + userid: {type: String, required: true}, + times: {type: Number, required: true} +}) + +// @ts-ignore +const db = new model('pepega', schema) + export default db; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index fc9e646..0fee124 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,103 +1,103 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "ESNext", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - "outDir": "dist", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } -} +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "ESNext", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": "dist", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +}