Markdown formatting + some fixes

This commit is contained in:
Lucas Gabriel 2024-06-02 00:26:48 +00:00
parent 1ec0af7cdb
commit 57154bcb70
8 changed files with 56 additions and 63 deletions

View file

@ -2,18 +2,21 @@ module.exports = function(bot, msg) {
const chatId = msg.chat.id;
const userName = msg.from.first_name;
const userId = msg.from.id;
const lynxPhoto = 'https://graph.org/file/a77382dab4d62ba626806.jpg'
const lynxFullPhoto = 'https://graph.org/file/a77382dab4d62ba626806.jpg';
const message = `Hi! I am Lynx!\nI am a simple bot made entirely from scratch in Node.js by Lucas Gabriel (lucmsilva).\n\nSome commands to test:
/start: start the bot
/help: send this message
/whois: send some information about yourself
/chatinfo: send some information about the group
/furry: check if you are a furry
/gay: check if you are a gay\n\nSee my source code in:
https://github.com/lucmsilva651/lynx.\n\nThanks to all users, testers, contributors, and others. Without you, perhaps this bot wouldn't be possible ❤️`;
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 might be running on a GitHub Codespaces server (see /stats), so please refrain from overusing or spamming the bot!\n\n` +
`*Some commands to test*:
*/start*: start the bot
*/help*: send this message
*/whois*: send some information about yourself
*/chatinfo*: send some information about the group
*/furry*: check if you are a furry
*/gay*: check if you are gay\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 ❤️`;
bot.sendPhoto(chatId, lynxPhoto, { caption: message })
.catch(error => console.error('ERROR: Message cannot be send:', error));
bot.sendPhoto(chatId, lynxFullPhoto, { caption: message, parse_mode: 'Markdown' })
.catch(error => console.error('ERROR: Message cannot be sent:', error));
console.log(`INFO: /help executed by ${userName}, ${userId}`);
}