Monospace in some commands

This commit is contained in:
Lucas Gabriel 2024-06-02 15:18:27 +00:00
parent 614eed0102
commit 38c585af36
3 changed files with 7 additions and 7 deletions

View file

@ -14,14 +14,14 @@ module.exports = function(bot, msg) {
} }
if (chatHandle) { if (chatHandle) {
chatHandleOutput = `*Chat handle:* @${chatHandle}`; chatHandleOutput = `*Chat handle:* \`@${chatHandle}`;
} else { } else {
chatHandleOutput = `*Chat handle:* none (private group)`; chatHandleOutput = `*Chat handle:* \`none (private group)\``;
} }
// if chatName returns undefined, the chat is not a group or channel // if chatName returns undefined, the chat is not a group or channel
if (chatName) { if (chatName) {
chatNameOutput = `*Chat name:* ${chatName}\n${chatHandleOutput}\n*Chat ID:* ${chatId}\n\n${isForumOutput}`; chatNameOutput = `*Chat name:* \`${chatName}\`\n${chatHandleOutput}\n*Chat ID:* \`${chatId}\`\n\n${isForumOutput}`;
} else { } else {
chatNameOutput = "Whoops!\nThis command doesn't work in PM."; chatNameOutput = "Whoops!\nThis command doesn't work in PM.";
} }

View file

@ -7,7 +7,7 @@ module.exports = function(bot, msg) {
const randomValue = getRandomInt(11); const randomValue = getRandomInt(11);
const message = `*Generated value:* ${randomValue}`; const message = `*Generated value:* \`${randomValue}\``;
bot.sendMessage(chatId, message, { parse_mode: 'Markdown' }) bot.sendMessage(chatId, message, { parse_mode: 'Markdown' })
.catch(error => console.error('WARN: Message cannot be sent: ', error)); .catch(error => console.error('WARN: Message cannot be sent: ', error));

View file

@ -16,12 +16,12 @@ module.exports = function(bot, msg) {
} }
if (userHandle) { if (userHandle) {
haveUsername = `*Your username is:* @${userHandle}`; haveUsername = `*Your username is:* \`@${userHandle}\``;
} else { } else {
haveUsername = "*Your username is:* none"; haveUsername = `*Your username is:* \`none\``;
} }
const message = `*Your name is:* ${userName}\n${haveUsername}\n*Your ID is:* ${userId}\n*You are a bot:* ${isBot}\n*Your language:* ${userLang}\n\n${userPremiumOutput}`; const message = `*Your name is:* \`${userName}\`\n${haveUsername}\n*Your ID is:* \`${userId}\`\n*You are a bot:* \`${isBot}\`\n*Your language:* \`${userLang}\`\n\n${userPremiumOutput}`;
bot.sendMessage(chatId, message, { parse_mode: 'Markdown' }) bot.sendMessage(chatId, message, { parse_mode: 'Markdown' })
.catch(error => console.error('WARN: Message cannot be sent: ', error)); .catch(error => console.error('WARN: Message cannot be sent: ', error));