diff --git a/commands/chatinfo.js b/commands/chatinfo.js index f2863a7..f5be223 100644 --- a/commands/chatinfo.js +++ b/commands/chatinfo.js @@ -14,14 +14,14 @@ module.exports = function(bot, msg) { } if (chatHandle) { - chatHandleOutput = `*Chat handle:* @${chatHandle}`; + chatHandleOutput = `*Chat handle:* \`@${chatHandle}`; } 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) { - 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 { chatNameOutput = "Whoops!\nThis command doesn't work in PM."; } diff --git a/commands/random.js b/commands/random.js index afa520a..05cf7f8 100644 --- a/commands/random.js +++ b/commands/random.js @@ -7,7 +7,7 @@ module.exports = function(bot, msg) { const randomValue = getRandomInt(11); - const message = `*Generated value:* ${randomValue}`; + const message = `*Generated value:* \`${randomValue}\``; bot.sendMessage(chatId, message, { parse_mode: 'Markdown' }) .catch(error => console.error('WARN: Message cannot be sent: ', error)); diff --git a/commands/whois.js b/commands/whois.js index ccd264b..14f1193 100644 --- a/commands/whois.js +++ b/commands/whois.js @@ -16,12 +16,12 @@ module.exports = function(bot, msg) { } if (userHandle) { - haveUsername = `*Your username is:* @${userHandle}`; + haveUsername = `*Your username is:* \`@${userHandle}\``; } 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' }) .catch(error => console.error('WARN: Message cannot be sent: ', error));