From d87fc8d1b427e8a159a52a822355382310ddb7fa Mon Sep 17 00:00:00 2001 From: Lucas Gabriel <90426410+lucmsilva651@users.noreply.github.com> Date: Sun, 8 Sep 2024 00:12:09 -0300 Subject: [PATCH] Update crew.js --- commands/crew.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/commands/crew.js b/commands/crew.js index 0b9a530..2a780d5 100644 --- a/commands/crew.js +++ b/commands/crew.js @@ -60,6 +60,24 @@ module.exports = (bot) => { }, '', Strings.errorRetrievingStats); }); + bot.command('getbotcommit', spamwatchMiddleware, async (ctx) => { + const Strings = getStrings(ctx.from.language_code); + handleAdminCommand(ctx, async () => { + try { + const commitHash = await getGitCommitHash(); + await ctx.reply(Strings.currentCommit.replace('{commitHash}', commitHash), { + parse_mode: 'Markdown', + reply_to_message_id: ctx.message.message_id + }); + } catch (error) { + ctx.reply(Strings.errorRetrievingCommit.replace('{error}', error), { + parse_mode: 'Markdown', + reply_to_message_id: ctx.message.message_id + }); + } + }, '', Strings.errorRetrievingCommit); + }); + bot.command('setbotname', spamwatchMiddleware, async (ctx) => { const Strings = getStrings(ctx.from.language_code); const botName = ctx.message.text.split(' ').slice(1).join(' ');