Page MenuHomePhabricator (Chris)

GenericmessageCommand.php
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

GenericmessageCommand.php

<?php
/**
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\TelegramBot\Commands\SystemCommands;
use Longman\TelegramBot\Commands\SystemCommand;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Exception\TelegramException;
use Longman\TelegramBot\Request;
/**
* Generic message command
*/
class GenericmessageCommand extends SystemCommand
{
/**
* @var string
*/
protected $name = 'genericmessage';
/**
* @var string
*/
protected $description = 'Handle generic message';
/**
* @var string
*/
protected $version = '1.2.0';
/**
* @var bool
*/
protected $need_mysql = true;
/**
* Execution if MySQL is required but not available
*
* @return ServerResponse
* @throws TelegramException
*/
public function executeNoDb()
{
// Try to execute any deprecated system commands.
if (self::$execute_deprecated && $deprecated_system_command_response = $this->executeDeprecatedSystemCommand()) {
return $deprecated_system_command_response;
}
return Request::emptyResponse();
}
/**
* Execute command
*
* @return ServerResponse
* @throws TelegramException
*/
public function execute()
{
// Try to continue any active conversation.
if ($active_conversation_response = $this->executeActiveConversation()) {
return $active_conversation_response;
}
// Try to execute any deprecated system commands.
if (self::$execute_deprecated && $deprecated_system_command_response = $this->executeDeprecatedSystemCommand()) {
return $deprecated_system_command_response;
}
return Request::emptyResponse();
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Nov 15, 1:25 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
151531
Default Alt Text
GenericmessageCommand.php (1 KB)

Event Timeline