// code from goatstore // api: https://store.agi.bd module.exports.config = { name: "worldtime", version: "1.0.0", author: "Zihad", countDown: 5, role: 0, shortDescription: "বিশ্বের বিভিন্ন দেশের বর্তমান সময়", longDescription: "বিভিন্ন দেশের বর্তমান সময় দেখায়", category: "utility", guide: { en: "{pn}\n{pn} Bangladesh\n{pn} Japan\n{pn} USA\n{pn} UK\n{pn} Dubai" } }; const countries = { Bangladesh: { city: "Dhaka", zone: "Asia/Dhaka", flag: "🇧🇩" }, India: { city: "New Delhi", zone: "Asia/Kolkata", flag: "🇮🇳" }, Pakistan: { city: "Islamabad", zone: "Asia/Karachi", flag: "🇵🇰" }, Nepal: { city: "Kathmandu", zone: "Asia/Kathmandu", flag: "🇳🇵" }, Japan: { city: "Tokyo", zone: "Asia/Tokyo", flag: "🇯🇵" }, China: { city: "Beijing", zone: "Asia/Shanghai", flag: "🇨🇳" }, Korea: { city: "Seoul", zone: "Asia/Seoul", flag: "🇰🇷" }, Dubai: { city: "Dubai", zone: "Asia/Dubai", flag: "🇦🇪" }, Saudi: { city: "Riyadh", zone: "Asia/Riyadh", flag: "🇸🇦" }, Turkey: { city: "Istanbul", zone: "Europe/Istanbul", flag: "🇹🇷" }, UK: { city: "London", zone: "Europe/London", flag: "🇬🇧" }, France: { city: "Paris", zone: "Europe/Paris", flag: "🇫🇷" }, Germany: { city: "Berlin", zone: "Europe/Berlin", flag: "🇩🇪" }, Russia: { city: "Moscow", zone: "Europe/Moscow", flag: "🇷🇺" }, USA: { city: "New York", zone: "America/New_York", flag: "🇺🇸" }, Canada: { city: "Toronto", zone: "America/Toronto", flag: "🇨🇦" }, Brazil: { city: "Brasilia", zone: "America/Sao_Paulo", flag: "🇧🇷" }, Australia: { city: "Sydney", zone: "Australia/Sydney", flag: "🇦🇺" }, Singapore: { city: "Singapore", zone: "Asia/Singapore", flag: "🇸🇬" }, Malaysia: { city: "Kuala Lumpur", zone: "Asia/Kuala_Lumpur", flag: "🇲🇾" }, Indonesia: { city: "Jakarta", zone: "Asia/Jakarta", flag: "🇮🇩" } }; function getTime(zone) { const now = new Date(); return new Intl.DateTimeFormat("en-US", { timeZone: zone, hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: true }).format(now); } function getDate(zone) { const now = new Date(); return new Intl.DateTimeFormat("en-GB", { timeZone: zone, day: "2-digit", month: "2-digit", year: "numeric" }).format(now); } module.exports.run = async function ({ api, event }) { const input = event.body .replace(/^[^\s]+/, "") .trim(); // নির্দিষ্ট দেশের সময় if (input) { const key = Object.keys(countries).find( name => name.toLowerCase() === input.toLowerCase() ); if (!key) { return api.sendMessage( "❌ দেশ পাওয়া যায়নি!\n\n" + "🌍 ব্যবহার করুন:\n" + "• worldtime Bangladesh\n" + "• worldtime Japan\n" + "• worldtime USA\n" + "• worldtime UK\n" + "• worldtime Dubai\n\n" + "📌 সব দেশের তালিকা দেখতে শুধু: worldtime", event.threadID, event.messageID ); } const country = countries[key]; return api.sendMessage( `${country.flag} ${key}\n` + `━━━━━━━━━━━━━━\n` + `🏙️ City: ${country.city}\n` + `📅 Date: ${getDate(country.zone)}\n` + `🕐 Time: ${getTime(country.zone)}\n` + `🌐 Zone: ${country.zone}\n` + `━━━━━━━━━━━━━━`, event.threadID, event.messageID ); } // সব দেশের সময় let message = "🌍 WORLD CLOCK\n" + "━━━━━━━━━━━━━━━━━━\n" + "🕐 বর্তমান বিশ্ব সময়\n" + "━━━━━━━━━━━━━━━━━━\n\n"; for (const key of Object.keys(countries)) { const country = countries[key]; message += `${country.flag} ${key} — ${getTime(country.zone)}\n`; } message += "\n━━━━━━━━━━━━━━━━━━\n" + "💡 নির্দিষ্ট দেশের সময়:\n" + "worldtime Bangladesh\n" + "worldtime Japan\n" + "worldtime USA\n" + "worldtime UK\n" + "worldtime Dubai\n" + "━━━━━━━━━━━━━━━━━━\n" + "⚡ Powered by Zihad"; return api.sendMessage( message, event.threadID, event.messageID ); };