Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
8ac91bbd
Commit
8ac91bbd
authored
Feb 02, 2016
by
Armando Lüscher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up all headers and add generic DocBlock to members.
parent
6c03ff17
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
738 additions
and
78 deletions
+738
-78
ChannelchatcreatedCommand.php
src/Commands/ChannelchatcreatedCommand.php
+38
-4
ChoseninlineresultCommand.php
src/Commands/ChoseninlineresultCommand.php
+46
-6
DateCommand.php
src/Commands/DateCommand.php
+44
-4
DeletechatphotoCommand.php
src/Commands/DeletechatphotoCommand.php
+38
-4
EchoCommand.php
src/Commands/EchoCommand.php
+44
-4
GenericCommand.php
src/Commands/GenericCommand.php
+39
-5
GenericmessageCommand.php
src/Commands/GenericmessageCommand.php
+38
-4
GroupchatcreatedCommand.php
src/Commands/GroupchatcreatedCommand.php
+38
-4
HelpCommand.php
src/Commands/HelpCommand.php
+44
-4
InlinequeryCommand.php
src/Commands/InlinequeryCommand.php
+46
-6
LeftchatparticipantCommand.php
src/Commands/LeftchatparticipantCommand.php
+38
-4
NewchatparticipantCommand.php
src/Commands/NewchatparticipantCommand.php
+38
-4
NewchattitleCommand.php
src/Commands/NewchattitleCommand.php
+38
-4
SlapCommand.php
src/Commands/SlapCommand.php
+39
-4
StartCommand.php
src/Commands/StartCommand.php
+44
-4
SupergroupchatcreatedCommand.php
src/Commands/SupergroupchatcreatedCommand.php
+38
-4
WeatherCommand.php
src/Commands/WeatherCommand.php
+44
-4
WhoamiCommand.php
src/Commands/WhoamiCommand.php
+44
-5
No files found.
src/Commands/ChannelchatcreatedCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
ChannelchatcreatedCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'Channelchatcreated'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Channel chat created'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/ChoseninlineresultCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Entities\InlineQueryResultArticle
;
use
Longman\TelegramBot\Entities\Entity
;
use
Longman\TelegramBot\Entities\InlineQueryResultArticle
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
ChoseninlineresultCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'choseninlineresult'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Chosen result query'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
''
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
false
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/DateCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Exception\TelegramException
;
use
Longman\TelegramBot\Request
;
class
DateCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'date'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Show date/time by location'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/date <location>'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.2.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
true
;
private
$base_url
=
'https://maps.googleapis.com/maps/api'
;
...
...
@@ -130,6 +165,11 @@ class DateCommand extends Command
return
$response
;
}
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/DeletechatphotoCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
DeletechatphotoCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'Deletechatphoto'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Delete chat photo'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/EchoCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
EchoCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'echo'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Show text'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/echo <text>'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/GenericCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
GenericCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'Generic'
;
protected
$description
=
'Handle generic commands or is executed by default when a command is not found'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Handles generic commands or is executed by default when a command is not found'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/GenericmessageCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
GenericmessageCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'Genericmessage'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Handle generic message'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/GroupchatcreatedCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
GroupchatcreatedCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'Groupchatcreated'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Group chat created'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/HelpCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
HelpCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'help'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Show bot commands help'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/help or /help <command>'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/InlinequeryCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Entities\InlineQueryResultArticle
;
use
Longman\TelegramBot\Entities\Entity
;
use
Longman\TelegramBot\Entities\InlineQueryResultArticle
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
InlinequeryCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'inlinequery'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Reply to inline query'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
''
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
false
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/LeftchatparticipantCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
LeftchatparticipantCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'leftchatparticipant'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Left Chat Participant'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/NewchatparticipantCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
NewchatparticipantCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'Newchatparticipant'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'New Chat Participant'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/NewchattitleCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
NewchattitleCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'Newchattitle'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'New chat Title'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/SlapCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
SlapCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'slap'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Slap someone with their username'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/slap <@user>'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/StartCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
StartCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'start'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Start command'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
false
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/SupergroupchatcreatedCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
SupergroupchatcreatedCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'Supergroupchatcreated'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Super group chat created'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/WeatherCommand.php
View file @
8ac91bbd
<?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
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
WeatherCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'weather'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Show weather by location'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/weather <location>'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
true
;
private
function
getWeather
(
$location
)
...
...
@@ -94,6 +129,11 @@ class WeatherCommand extends Command
return
$result
;
}
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
src/Commands/WhoamiCommand.php
View file @
8ac91bbd
<?php
/*
/**
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
...
...
@@ -9,24 +8,64 @@
* file that was distributed with this source code.
*
* Written by Marco Boretto <marco.bore@gmail.com>
*/
*/
namespace
Longman\TelegramBot\Commands
;
use
Longman\TelegramBot\Request
;
use
Longman\TelegramBot\Command
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Entities\File
;
use
Longman\TelegramBot\Entities\Update
;
use
Longman\TelegramBot\Request
;
class
WhoamiCommand
extends
Command
{
/**
* Name
*
* @var string
*/
protected
$name
=
'whoami'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Show your id, name and username'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/whoami'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is enabled
*
* @var boolean
*/
protected
$enabled
=
true
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
true
;
/**
* Execute command
*
* @return boolean
*/
public
function
execute
()
{
$update
=
$this
->
getUpdate
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment