mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-03-10 21:00:03 +00:00
Fixed identation + formatting on help and random
This commit is contained in:
parent
16a7576e49
commit
784a463e8e
@ -6,13 +6,13 @@ module.exports = function(bot, msg) {
|
||||
|
||||
const message = `*Hello! I'm Lynx!*\n\nI'm a simple bot made entirely from scratch in Node.js by Lucas Gabriel (lucmsilva).\n\n` +
|
||||
`I am running on a *GitHub Codespaces* server (see /stats), so please refrain from overusing or spamming the bot!\n\n` +
|
||||
`*Some commands to test*:
|
||||
• */chatinfo*: send some information about the group
|
||||
• */furry*: check if you are a furry
|
||||
• */gay*: check if you are gay
|
||||
• */help*: send this message
|
||||
• */start*: start the bot
|
||||
• */whois*: send some information about yourself\n\n` +
|
||||
`*Some commands to test:*
|
||||
• */chatinfo* - send some information about the group
|
||||
• */furry* - check if you are a furry
|
||||
• */gay* - check if you are gay
|
||||
• */help* - send this message
|
||||
• */start* - start the bot
|
||||
• */whois* - send some information about yourself\n\n` +
|
||||
`*See my source code in:* [GitHub Repository](https://github.com/lucmsilva651/lynx)\n\n` +
|
||||
`Thanks to all users, testers, contributors, and others. Without you, perhaps this bot wouldn't be possible ❤️`;
|
||||
|
||||
|
@ -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…
x
Reference in New Issue
Block a user