mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-03-10 12:49:57 +00:00
Changed error handling on crew.js
This commit is contained in:
parent
a36e1825b9
commit
0af901a258
@ -159,12 +159,12 @@ module.exports = (bot) => {
|
||||
caption: botFile
|
||||
});
|
||||
} catch (error) {
|
||||
ctx.reply(Strings.fileError.replace('{error}', error.message), {
|
||||
ctx.reply(Strings.varErr.replace('{error}', error.message), {
|
||||
parse_mode: 'Markdown',
|
||||
reply_to_message_id: ctx.message.message_id
|
||||
});
|
||||
}
|
||||
}, '', Strings.fileError);
|
||||
}, '', Strings.varErr);
|
||||
});
|
||||
|
||||
bot.command('run', spamwatchMiddleware, async (ctx) => {
|
||||
|
@ -11,6 +11,7 @@
|
||||
"varIs": "is",
|
||||
"varWas": "was",
|
||||
"varNone": "None",
|
||||
"varErr": "Some unexpected error occurred during a bot action. Please report it to the developers.",
|
||||
"invalidOption": "Whoops! Invalid option!",
|
||||
"kickingMyself": "*Since you don't need me, I'll leave.*",
|
||||
"kickingMyselfErr": "Error leaving the chat.",
|
||||
@ -27,7 +28,6 @@
|
||||
"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*!",
|
||||
|
@ -11,6 +11,7 @@
|
||||
"varIs": "está",
|
||||
"varWas": "estava",
|
||||
"varNone": "Nenhum",
|
||||
"varErr": "Algum erro inesperado ocorreu durante uma ação do bot. Por favor, reporte aos desenvolvedores.\n\n{error}",
|
||||
"invalidOption": "Ops! Opção inválida!",
|
||||
"kickingMyself": "*Já que você não precisa de mim, vou sair daqui.*",
|
||||
"kickingMyselfErr": "Erro ao sair do chat.",
|
||||
@ -25,7 +26,6 @@
|
||||
"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*!",
|
||||
|
Loading…
x
Reference in New Issue
Block a user