diff --git a/includes/class-telegram-exception.php b/includes/class-telegram-exception.php new file mode 100644 index 0000000..076590e --- /dev/null +++ b/includes/class-telegram-exception.php @@ -0,0 +1,27 @@ +permanent = $permanent; + $this->retry_after = max(0, $retry_after); + } + + public function is_permanent(): bool + { + return $this->permanent; + } + + public function retry_after(): int + { + return $this->retry_after; + } +}