Push base Telegraf bot

This commit is contained in:
lucmsilva651 2024-07-24 22:39:27 -03:00
commit 05eddc7734
No known key found for this signature in database
GPG key ID: D9B075FC6DC93985
15 changed files with 818 additions and 0 deletions

18
commands/random.js Normal file
View file

@ -0,0 +1,18 @@
const Strings = require('../locales/english.json');
function getRandomInt(max) {
return Math.floor(Math.random() * max);
}
module.exports = (bot) => {
bot.command('random', (ctx) => {
const randomValue = getRandomInt(11);
const randomVStr = Strings.randomNum.replace('{number}', randomValue);
ctx.reply(
randomVStr, {
parse_mode: 'Markdown'
}
);
});
};