feat: Show error properly to the user on yt command

This commit is contained in:
GiovaniFZ 2024-12-14 15:30:26 -03:00
parent 86e6664795
commit 7c8dba27f9
No known key found for this signature in database
GPG Key ID: 63DD92181B575322
3 changed files with 4 additions and 2 deletions

View File

@ -139,7 +139,7 @@ module.exports = (bot) => {
fs.unlinkSync(mp4File);
} catch (error) {
await ctx.reply(`\`${error.message}\``, {
await ctx.reply(Strings.error, {
parse_mode: 'Markdown',
reply_to_message_id: ctx.message.message_id,
});
@ -165,7 +165,7 @@ module.exports = (bot) => {
}
} catch (error) {
console.error(error);
await ctx.reply(`\`${error.message}\``, {
await ctx.reply(Strings.error, {
parse_mode: 'Markdown',
reply_to_message_id: ctx.message.message_id,
});

View File

@ -24,6 +24,7 @@
"banErr": "Could not ban the user. Check if the ID is correct and if the bot has admin permissions.\n\n`{tgErr}`",
"unBanSuccess": "User with ID `{userId}` has been unbanned.",
"unBanErr": "Could not unban the user. Check if the ID is correct and if the bot has admin permissions.\n\n`{tgErr}`",
"error": "An unexpected error occured. Please, report to the developers.",
"isGay": "Yes, you are *gay*!",
"isNtGay": "Ah, you are not gay!",
"isFurry": "Yes, you are *furry*!",

View File

@ -22,6 +22,7 @@
"invalidId": "Por favor, insira um ID de usuário válido.",
"banSuccess": "Usuário com ID `{userId}` foi banido.",
"banErr": "Não foi possível banir o usuário. Verifique se o ID está correto e se o bot tem permissões de administrador.\n\n`{tgErr}`",
"error": "Um erro inesperado ocorreu, por favor reporte ao desenvolvedor",
"unBanSuccess": "Usuário com ID `{userId}` foi desbanido.",
"unBanErr": "Não foi possível desbanir o usuário. Verifique se o ID está correto e se o bot tem permissões de administrador.\n\n`{tgErr}`",
"isGay": "Sim, você é *gay*!",