diff --git a/commands/gsmarena.js b/commands/gsmarena.js index 2b751bb..28aa475 100644 --- a/commands/gsmarena.js +++ b/commands/gsmarena.js @@ -110,9 +110,11 @@ function formatPhone(phone) { .map(([label, key]) => `${label}: ${formattedPhone[key]}`) .join("\n\n"); + + const deviceUrl = `GSMArena page: ${formattedPhone.url}`; const deviceImage = phone.picture ? `Device Image: ${phone.picture}` : ''; - return `${formattedPhone.name}\n\n${attributes}\n\n${deviceImage}`; + return `\n\nName: ${formattedPhone.name}\n\n${attributes}\n\n${deviceImage}\n\n${deviceUrl}`; } async function fetchHtml(url) { @@ -230,7 +232,7 @@ module.exports = (bot) => { if (phoneDetails.name) { const message = formatPhone(phoneDetails); - ctx.editMessageText(`${userName}, there are the details of your device: ` + message, { parse_mode: 'HTML', disable_web_page_preview: false }); + ctx.editMessageText(`${userName}, there are the details of your device:` + message, { parse_mode: 'HTML', disable_web_page_preview: false }); } else { ctx.reply("Error fetching phone details.", { reply_with_message_id: ctx.message.message_id }); }