From 425dbf1d6a61584a785c313b579e445c01981163 Mon Sep 17 00:00:00 2001 From: Alexander NeonXP Kiryukhin Date: Fri, 27 May 2016 15:17:48 +0300 Subject: Fix no link --- src/NeonXP/BotScript.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/NeonXP/BotScript.php') diff --git a/src/NeonXP/BotScript.php b/src/NeonXP/BotScript.php index 5b912c5..3e94d1b 100644 --- a/src/NeonXP/BotScript.php +++ b/src/NeonXP/BotScript.php @@ -23,6 +23,9 @@ class BotScript }; $showLink = function (Message $message, Telegram $telegram) { $link = $telegram->getCache()->fetch("link_{$message->getChat()->getId()}"); + if (!$link) { + $link = 'Ссылка не задана! Используй /setlink'; + } $telegram->getMethods()->sendMessage($message->getChat(), $link); return State::INITIAL; -- cgit v1.2.3