Update crew.js

This commit is contained in:
Lucas Gabriel 2024-09-08 00:12:09 -03:00 committed by GitHub
parent 00f151b378
commit d87fc8d1b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,6 +60,24 @@ module.exports = (bot) => {
}, '', Strings.errorRetrievingStats); }, '', 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) => { bot.command('setbotname', spamwatchMiddleware, async (ctx) => {
const Strings = getStrings(ctx.from.language_code); const Strings = getStrings(ctx.from.language_code);
const botName = ctx.message.text.split(' ').slice(1).join(' '); const botName = ctx.message.text.split(' ').slice(1).join(' ');