update
This commit is contained in:
@@ -161,6 +161,25 @@ class Telegram
|
||||
return $this->SendMessage($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify one step of the VM rebuild pipeline (success or failure).
|
||||
*/
|
||||
public function SendRebuildStepNotification(string $vmName, string $ip, string $step, bool $success, ?string $note = null)
|
||||
{
|
||||
$msg = ($success ? '🔄' : '❌') . " Rebuild VPS — {$step}\n";
|
||||
$msg .= "--------------------------------\n";
|
||||
$msg .= "🖥️ VM: {$vmName}\n";
|
||||
$msg .= "🌐 IP: {$ip}\n";
|
||||
$msg .= "📊 Trạng thái: " . ($success ? 'Hoàn tất ✅' : 'Thất bại ❌') . "\n";
|
||||
if ($note) {
|
||||
$msg .= "📝 " . ($success ? 'Ghi chú' : 'Lỗi') . ": {$note}\n";
|
||||
}
|
||||
$msg .= "🕒 Thời gian: " . Carbon::now()->format('d/m/Y H:i:s') . "\n";
|
||||
$msg .= "--------------------------------";
|
||||
|
||||
return $this->SendMessage($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a photo to Telegram group
|
||||
* @param string $filePath Local storage path (e.g. Upload/2024/06/01/image.png)
|
||||
|
||||
Reference in New Issue
Block a user