summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <frei@neonxp.info>2016-05-27 15:17:48 +0300
committerAlexander NeonXP Kiryukhin <frei@neonxp.info>2016-05-27 15:17:48 +0300
commit425dbf1d6a61584a785c313b579e445c01981163 (patch)
tree2fb9b04a540eb65fdfdb458553bb6d0ed559f4fc
parent512a360694bf9eca4ddaaefc4bf71e8c9573d0d4 (diff)
Fix no link
-rw-r--r--src/NeonXP/BotScript.php3
1 files changed, 3 insertions, 0 deletions
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;