diff --git a/commands/fun/gogoanime.ts b/commands/fun/gogoanime.ts index 04277de..d2daeb2 100644 --- a/commands/fun/gogoanime.ts +++ b/commands/fun/gogoanime.ts @@ -66,7 +66,7 @@ export default commandModule({ value: choice.id.toString(), })) ) - } catch (err) { + } catch { await autocomplete.respond([{name: 'Algo malo ha ocurrido! Asegúrate que hayas puesto el ID correctamente', value: 'error'}]) } } @@ -137,7 +137,7 @@ export default commandModule({ const search = await gogoanime.fetchEpisodeServers(selepisode) const arrayed = await Promise.all(search.map((server) => `[${server.name}](<${server.url!.replace(doubleslashregex, '/')}>)`)) await ctx.reply({content: `Todos los servidores de \`${selepisode}\` (Vinci no se hace cargo de los enlaces):\n${arrayed.join('\n')}`}) - } catch (err) { + } catch { await ctx.reply({content: 'Ha ocurrido un error! Asegúrate que hayas seleccionado bien un capítulo.'}) } } break; @@ -159,7 +159,7 @@ export default commandModule({ ) await ctx.reply({embeds: [embed]}) - } catch (err) { + } catch { await ctx.reply({content: 'Algo malo ha ocurrido, asegúrate que hayas escrito el ID correctamente\nTip: Usa el comando de buscar y conviértelos a ID.'}) } } break; diff --git a/commands/misc/askjavi_disabled.ts b/commands/misc/askjavi_disabled.ts index 8fe7826..ba8c4dd 100644 --- a/commands/misc/askjavi_disabled.ts +++ b/commands/misc/askjavi_disabled.ts @@ -174,7 +174,7 @@ export default commandModule({ ephemeral: true, }); }); - } catch (err) { + } catch { await ctx.reply({ content: `Parece que no se ha podido enviar el DM...`, ephemeral: true, diff --git a/commands/moderation/ban.ts b/commands/moderation/ban.ts index 75ab2d2..38cae5d 100644 --- a/commands/moderation/ban.ts +++ b/commands/moderation/ban.ts @@ -29,7 +29,7 @@ export default commandModule({ const sendToMods = ctx.client.guilds.cache.get(process.env.GUILDID!)!.channels.cache.get(process.env.MODLOGS_CHANNEL!) as TextChannel await sendToMods.send({content: `Se ha baneado a ${userToBan}.\nBan efectuado por ${ctx.user} con razón "${reason}."`}) await ctx.reply({content: 'Baneado correctamente!', ephemeral: true}) - } catch (e) { + } catch { await ctx.reply({content: `ERROR: No puedo hacer este comando porque a lo mejor soy inferior que el rol de esa persona o estoy usándolo contra admins.`}) } }, diff --git a/commands/moderation/deleteMessage.ts b/commands/moderation/deleteMessage.ts index 3b72d39..3f6b583 100644 --- a/commands/moderation/deleteMessage.ts +++ b/commands/moderation/deleteMessage.ts @@ -35,7 +35,7 @@ export default commandModule({ const channel = await guild.channels.fetch(ctx.channel!.id); (await (channel as TextChannel).messages.fetch(idMensaje)).delete(); await ctx.reply({content: 'Mensaje eliminado correctamente.', ephemeral: true}); - } catch (e) { + } catch { await ctx.reply({content: `ERROR: No se ha podido eliminar el mensaje, asegúrate que estás usando el ID y el canal correcto.`}) } }, diff --git a/commands/moderation/kick.ts b/commands/moderation/kick.ts index 881da3f..cef02ae 100644 --- a/commands/moderation/kick.ts +++ b/commands/moderation/kick.ts @@ -31,7 +31,7 @@ export default commandModule({ const sendToMods = ctx.client.guilds.cache.get(process.env.GUILDID!)!.channels.cache.get(process.env.MODLOGS_CHANNEL!) as TextChannel await sendToMods!.send({content: `Se ha expulsado a ${userToKick}.\nKick efectuado por ${ctx.user} con razón "${reason}."`}) await ctx.reply({content: 'Expulsado correctamente!'}) - } catch (e) { + } catch { await ctx.reply({content: `ERROR: No puedo hacer este comando porque a lo mejor soy inferior que el rol de esa persona o estoy usándolo contra admins.`}) } }, diff --git a/commands/moderation/prune.ts b/commands/moderation/prune.ts index c9ef9e1..7ba326d 100644 --- a/commands/moderation/prune.ts +++ b/commands/moderation/prune.ts @@ -26,7 +26,7 @@ export default commandModule({ await ctx.reply({content: `Se han eliminado ${amount} mensajes.`}) const sendToMods = ctx.client.guilds.cache.get(process.env.GUILDID!)!.channels.cache.get(process.env.MODLOGS_CHANNEL!) as TextChannel await sendToMods.send({content: `Se han eliminado ${amount} mensajes en ${ctx.channel}\nEfectuado por ${ctx.user}.`}) - } catch (e){ + } catch { ctx.reply({content: 'Ha habido un error eliminando mensajes! Error reportado automáticamente.', ephemeral: true})}; } }); \ No newline at end of file diff --git a/commands/moderation/slowmode.ts b/commands/moderation/slowmode.ts index 95fde29..f595bab 100644 --- a/commands/moderation/slowmode.ts +++ b/commands/moderation/slowmode.ts @@ -33,7 +33,7 @@ export default commandModule({ ctx.reply({content: `Se han añadido ${seconds} segundos de modo lento al canal de voz actual`}) const sendToMods = ctx.client.guilds.cache.get(process.env.GUILDID!)!.channels.cache.get(process.env.MODLOGS_CHANNEL!) as TextChannel await sendToMods.send({content: `Se ha aplicado modo lento al canal ${ctx.channel}.\nEfectuado por ${ctx.user} con ${seconds} segundos de retardo.\nRazón: ${reason}`}) - } catch (e) { + } catch { ctx.reply({content: `No se ha podido aplicar modo lento al canal.`}) } }, diff --git a/commands/moderation/timeoutUser.ts b/commands/moderation/timeoutUser.ts index f6ecdc6..1f288ea 100644 --- a/commands/moderation/timeoutUser.ts +++ b/commands/moderation/timeoutUser.ts @@ -43,7 +43,7 @@ export default commandModule({ usuario.timeout(minutosToMilisegundos, razon).then(() => {ctx.reply({content: `Se ha silenciado a ${usuario} correctamente.`, ephemeral: true})}) const sendToMods = ctx.client.guilds.cache.get(process.env.GUILDID!)!.channels.cache.get(process.env.MODLOGS_CHANNEL!) as TextChannel await sendToMods.send({content: `Se ha silenciado a ${usuario}.\nSlencio efectuado por ${ctx.user} con ${minutos} minutos de duración.\nRazón: ${razon}`}) - } catch (e) { + } catch { await ctx.reply({content: `ERROR: No puedo hacer este comando porque a lo mejor soy inferior que el rol de esa persona o estoy usándolo contra admins.`}) } }, diff --git a/util/twitternotifications.ts b/util/twitternotifications.ts index 9f15bae..d8b7204 100644 --- a/util/twitternotifications.ts +++ b/util/twitternotifications.ts @@ -29,5 +29,5 @@ export default async function twitternotifications(client: Client) { }); message.react('<:Pog:1030169609178976346>'); } - } catch (err) {} + } catch {} }