Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F625330
MarkdownCommand.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
MarkdownCommand.php
View Options
<?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
\
UserCommands
;
use
Longman
\
TelegramBot
\
Commands
\
UserCommand
;
use
Longman
\
TelegramBot
\
Request
;
use
Longman
\
TelegramBot
\
Entities
\
ReplyKeyboardMarkup
;
/**
* User "/markdown" command
*/
class
MarkdownCommand
extends
UserCommand
{
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'markdown'
;
protected
$description
=
'Print Markdown text'
;
protected
$usage
=
'/markdown'
;
protected
$version
=
'1.0.1'
;
/**#@-*/
/**
* {@inheritdoc}
*/
public
function
execute
(
)
{
$message
=
$this
->
getMessage
(
)
;
$chat_id
=
$message
->
getChat
(
)
->
getId
(
)
;
$data
=
[
'chat_id'
=>
$chat_id
,
'parse_mode'
=>
'MARKDOWN'
,
'text'
=>
'*bold* _italic_ `inline fixed width code`
```
preformatted code block
code block
```
[Best Telegram bot api!!](https://github.com/akalongman/php-telegram-bot)
'
,
]
;
return
Request
::
sendMessage
(
$data
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 14, 11:20 PM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
151457
Default Alt Text
MarkdownCommand.php (1 KB)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline