Update README.md + Translations (#6)

* Update README.md

Now we don't have config.env anymore, we now use config.json inside props folder

* Add portuguese.json

* Set portuguese language if  user's telegram app is in portuguese

* oh fudge, I forgot this one

---------

Co-authored-by: GiovaniFZ <giovanifinazzi@gmail.com>
This commit is contained in:
mthlma 2024-07-25 23:40:22 -03:00 committed by GitHub
parent c692edbc66
commit fd3196a34f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 52 additions and 14 deletions

View file

@ -1,4 +1,4 @@
const Strings = require('../locales/english.json');
const { getStrings } = require('./checklang');
function getRandomInt(max) {
return Math.floor(Math.random() * max);
@ -6,6 +6,7 @@ function getRandomInt(max) {
module.exports = (bot) => {
bot.command('random', (ctx) => {
const Strings = getStrings(ctx.from.language_code);
const randomValue = getRandomInt(11);
const randomVStr = Strings.randomNum.replace('{number}', randomValue);