prepare("SELECT channel_id FROM channels WHERE type = 'price_channel'"); $stmt->execute(); $channels = $stmt->fetchAll(); if (!$channels) { die("no_channel"); } $time = jdate("Y/m/d - H:i:s", strtotime(date("Y/m/d H:i:s")), tr_num: 'en'); $message = "💸 *به‌روزرسانی نرخ لحظه‌ای تتر (USDT)* 💰 *قیمت بازار:* `{$exchangeFormatted}` تومان 💵 *قیمت خرید از شما:* `{$purchaseFormatted}` تومان ⏱ بروزرسانی در: *{$time}*"; $inlineKeyboard = json_encode([ "inline_keyboard" => [ [ [ "text" => "🚀 ورود به ربات", "url" => "https://t.me/" . BOT_USERNAME ] ] ] ]); foreach ($channels as $ch) { $cid = "@" . $ch->channel_id; sendMessage($cid, $message, $inlineKeyboard); } die("sent");