mirror of
https://github.com/tiennm99/miti-telegram.git
synced 2026-04-17 15:20:57 +00:00
feat: cleanup
This commit is contained in:
26
src/index.js
26
src/index.js
@@ -44,21 +44,19 @@ export default {
|
|||||||
? `https://www.google.com/maps?q=${latitude},${longitude}`
|
? `https://www.google.com/maps?q=${latitude},${longitude}`
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
const requestInfo = `URL: ${url}
|
const requestInfo = `<b>IP</b>: <code>${clientIP}</code>
|
||||||
IP: ${clientIP}
|
<b>Browser</b>: <code>${userAgent}</code>
|
||||||
Browser: ${userAgent}
|
<b>Country</b>: <code>${country}</code>
|
||||||
Country: ${country}
|
<b>Region</b>: <code>${region}</code>
|
||||||
Region: ${region}
|
<b>City</b>: <code>${city}</code>
|
||||||
City: ${city}
|
<b>Coordinates</b>: <code>${latitude}, ${longitude}</code>${mapLink ? ` <a href="${mapLink}">📍</a>` : ''}
|
||||||
Coordinates: ${latitude}, ${longitude}
|
<b>Timezone</b>: <code>${timezone}</code>
|
||||||
Timezone: ${timezone}
|
<b>Timestamp</b>: <code>${timestamp}</code>
|
||||||
Timestamp: ${timestamp}
|
<b>Original text</b>:`;
|
||||||
Original text:`;
|
|
||||||
|
|
||||||
const formattedMessage = `<code>
|
const formattedMessage = `${requestInfo}
|
||||||
${requestInfo}
|
|
||||||
</code>
|
${text}`;
|
||||||
${mapLink ? `<a href="${mapLink}">📍 View Location on Map</a>\n\n` : ''}${text}`;
|
|
||||||
|
|
||||||
const telegramToken = env.TELEGRAM_TOKEN;
|
const telegramToken = env.TELEGRAM_TOKEN;
|
||||||
const telegramChatId = env.TELEGRAM_CHAT_ID;
|
const telegramChatId = env.TELEGRAM_CHAT_ID;
|
||||||
|
|||||||
Reference in New Issue
Block a user