Merge remote-tracking branch 'origin/send_log_adm'

This commit is contained in:
GiovaniFZ 2024-09-20 19:10:17 -03:00
commit b7820a1276
No known key found for this signature in database
GPG Key ID: 63DD92181B575322

View File

@ -90,7 +90,7 @@ module.exports = (bot) => {
} }
}, '', Strings.errorRetrievingCommit); }, '', 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(' ');
@ -117,4 +117,15 @@ module.exports = (bot) => {
await ctx.telegram.leaveChat(ctx.chat.id); await ctx.telegram.leaveChat(ctx.chat.id);
}, '', Strings.kickingMyselfErr); }, '', Strings.kickingMyselfErr);
}); });
bot.command('getfile', spamwatchMiddleware, async (ctx) => {
const botFile = ctx.message.text.split(' ').slice(1).join(' ');
handleAdminCommand(ctx, async () => {
try{
await ctx.replyWithDocument({source: botFile});
}catch (error){
console.log('ERROR');
}
});
});
}; };