Fixed identation + formatting on help and random
This commit is contained in:
parent
16a7576e49
commit
784a463e8e
2 changed files with 22 additions and 22 deletions
|
@ -1,18 +1,18 @@
|
|||
module.exports = function(bot, msg) {
|
||||
const chatId = msg.chat.id;
|
||||
const userName = msg.from.first_name;
|
||||
const userId = msg.from.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('ERROR: Message cannot be sent:', error));
|
||||
console.log(`INFO: /random executed by ${userName}, ${userId}`);
|
||||
const chatId = msg.chat.id;
|
||||
const userName = msg.from.first_name;
|
||||
const userId = msg.from.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('ERROR: Message cannot be sent:', error));
|
||||
console.log(`INFO: /random executed by ${userName}, ${userId}`);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue