Add Help command
This commit is contained in:
34
src/Commands/HelpCommand.php
Normal file
34
src/Commands/HelpCommand.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Longman\TelegramBot\Commands\UserCommands;
|
||||||
|
|
||||||
|
use Longman\TelegramBot\Commands\UserCommand;
|
||||||
|
use Longman\TelegramBot\Entities\ServerResponse;
|
||||||
|
|
||||||
|
class HelpCommand extends UserCommand
|
||||||
|
{
|
||||||
|
/** @var string */
|
||||||
|
protected $name = 'help';
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
protected $description = 'Show bot commands help';
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
protected $usage = '/help';
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
protected $version = '1.0.0';
|
||||||
|
|
||||||
|
public function execute(): ServerResponse
|
||||||
|
{
|
||||||
|
return $this->replyToChat(
|
||||||
|
<<<END
|
||||||
|
This bots detects a Twitter link and reply with a [FixTweet](https://github.com/FixTweet/FixTweet) replacement.
|
||||||
|
|
||||||
|
_If added to a group chat, the bot has to be able to read all the messages._
|
||||||
|
END, [
|
||||||
|
'parse_mode' => 'markdown',
|
||||||
|
'disable_web_page_preview' => true,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user