Next Effects PhotoGraphy

Next Effects PhotoGraphy މާދަމާގެ ހަނދާނަށް

27/05/2026

call

21/05/2026

Viral overlay Bilkul free

Thanks you ❤️Flame café
14/05/2026

Thanks you ❤️
Flame café

free downlod black Cofee eh dhineema dhas kon dhan https://t.me/Next_Effects/67/** * 🗺️ Ihavandhoo Map Bot - Enhanced Go...
06/05/2026

free downlod black Cofee eh dhineema dhas kon dhan
https://t.me/Next_Effects/67

/**
* 🗺️ Ihavandhoo Map Bot - Enhanced Google Apps Script Version
* Based strictly on telegram_bot.py
*
* Features:
* - DMS Coordinate Parsing
* - Item search (Address, Dhivehi, Shop)
* - Initial search (1-3 chars)
* - Shop list via 'shop' keyword
* - Map Venue + Detailed Text response
* - Fast index-based button retrieval
*/

// ============================================
// CONFIGURATION
// ============================================
var token = "###";
var SheetID = "###;
var UrLPublish = "###";
var telegramUrl = "https://api.telegram.org/bot" + token;

// ============================================
// WEBHOOK SETUP
// ============================================
function setWebhook() {
try {
var resp = UrlFetchApp.fetch(telegramUrl + "/setWebhook?url=" + UrLPublish);
Logger.log(resp.getContentText());
} catch (e) {
Logger.log("Webhook setup failed: " + e);
}
}

function doGet() {
return ContentService.createTextOutput("Ihavandhoo Map Bot Active ✅");
}

function doPost(e) {
try {
var data = JSON.parse(e.postData.contents);
if (data.callback_query) {
handleCallback(data.callback_query);
} else if (data.message && data.message.text) {
handleMessage(data.message);
}
} catch (err) {
Logger.log("doPost Error: " + err);
}
}

// ================= DATA =================
function getAllRows() {
try {
var values = Sheets.Spreadsheets.Values.get(SheetID, "DateList!A2:G").values;
return values || [];
} catch (e) {
Logger.log("Error fetching sheet: " + e);
return [];
}
}

// ================= DMS =================
function dmsToDecimal(dms) {
if (!dms) return null;
var cleaned = dms.toString().replace(/["]/g,'').trim();
var m = cleaned.match(/(\d+)[°\s]\s*(\d+)'?\s*(\d*(\.\d+)?)?\s*([NSEW])/i);
if (!m) return null;
var dec = parseFloat(m[1]) + parseFloat(m[2])/60 + (m[3]?parseFloat(m[3])/3600:0);
return (m[5].toUpperCase() === "S" || m[5].toUpperCase() === "W") ? -dec : dec;
}

// ============================================
// MESSAGE HANDLER
// ============================================
function handleMessage(message) {
var chatID = message.chat.id;
var text = message.text.trim();
var textLower = text.toLowerCase();
textLower = textLower.replace( /🏠|🕌|☕|🏥|🛒|👷🏾|💼|🏤|🪡|🏍️|🍽️|👮🏾|🤝|⚽|📷|🛢️/g, "" ).trim();

// --- 1. Commands & Menu Buttons ---
if (text === "/start") { sendStartMenu(chatID); return; }
if (text === "📝 Check Address") { sendText(chatID, "✅ Please enter the Address ID, Address Name, or Shop Name:"); return; }
if (text === "ℹ️ Help") { sendHelp(chatID); return; }
if (text === "📞 Contact") { sendContact(chatID); return; }

// --- 2. Perform Search ---
var allRows = getAllRows();
if (!allRows || allRows.length === 0) { sendText(chatID, "❌ Error: Could not access the address database."); return; }

// ---------------- TYPE SEARCH ----------------
var types = [
"house",
"mosque",
"cafe",
"hospital",
"sites",
"branches",
"office",
"tailor",
"garges",
"police",
"ngo'",
"sports",
"photo",
"restaurent",
"oilpatrol"

];

if (types.includes(textLower)) {
var list = allRows
.map((row,i) => ({
type: (row[6]||"").toLowerCase().trim(),
name: formatName(row),
idx: i
}))
.filter(r => r.type === textLower)
.sort((a,b) => a.name.localeCompare(b.name));

if (list.length) return sendSuggestions(chatID, `📂 ${capitalize(textLower)} Locations\nFound: ${list.length}`, list.slice(0,50));
return sendText(chatID, `❌ No ${capitalize(textLower)} found`);
}

// ---------------- SHOP LIST ----------------
if (textLower === "shop") {
var shops = allRows
.map((row,i) => row[2] ? { name: "🛒 " + formatName(row, "shop"), idx: i } : null)
.filter(Boolean)
.sort((a,b) => a.name.localeCompare(b.name));

if (shops.length) return sendSuggestions(chatID, "🛒 All Shops", shops.slice(0,50));
return sendText(chatID, "❌ No shops found");
}

// ---------------- B. Special: Short Query (1-3 chars) Dhivhi ----------------
if (textLower.length 0) {
prefixMatches.sort(function (a, b) {
return a.name.localeCompare(b.name);
});

sendSuggestions(
chatID,
"📋 Here are all addresses starting with '" +
text.toUpperCase() +
"':\n\nFound " +
prefixMatches.length +
" address(es). Select one below 👇",
prefixMatches.slice(0, 30)
);
return;
}
}

// ---------------- NORMAL SEARCH ( Dhivhi SEARCH ) ----------------
for (var i=0;i [{ text: i.name, callback_data: "idx:" + i.idx }]) });
}

function sendText(chatID, text, kb) {
UrlFetchApp.fetch(telegramUrl + "/sendMessage", {
method: "post",
contentType: "application/json",
payload: JSON.stringify({
chat_id: chatID,
text: text,
parse_mode: "HTML",
reply_markup: kb ? JSON.stringify(kb) : undefined
}),
muteHttpExceptions: true
});
}

function sendVenue(chatID, lat, lon, title, address) {
UrlFetchApp.fetch(telegramUrl + "/sendVenue", {
method: "post",
contentType: "application/json",
payload: JSON.stringify({
chat_id: chatID,
latitude: lat,
longitude: lon,
title: title,
address: address
}),
muteHttpExceptions: true
});
}

// ================= UTIL =================
function capitalize(s) { return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase(); }

function formatName(row) {
if (!row) return "N/A";
return (row[0] ? row[0] + " | " : "") + (row[1] || "N/A");
}

function formatAddress(row) {
if (!row) return "N/A";
return (row[1] ? row[1] + " | " : "") + (row[0] || "N/A");
}

Address

Male

Website

Alerts

Be the first to know and let us send you an email when Next Effects PhotoGraphy posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Next Effects PhotoGraphy:

Share