Reformulation of bot structure

This commit is contained in:
Lucas Gabriel 2024-06-02 14:55:44 +00:00
parent 4b9ed6d2c0
commit 2f65126319
15 changed files with 2 additions and 2 deletions

View file

@ -1,15 +0,0 @@
module.exports = function(bot, msg) {
const chatId = msg.chat.id;
function getRandomInt(max) {
return Math.floor(Math.random() * max);
}
const randomValue = getRandomInt(11);
const message = `*Generated value:* ${randomValue}`;
bot.sendMessage(chatId, message, { parse_mode: 'Markdown' })
.catch(error => console.error('WARN: Message cannot be sent: ', error));
}