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
086f4859
Commit
086f4859
authored
Feb 12, 2016
by
Marco Boretto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #97 from noplanman/some_code_cleanup
Just inherit repeating documentation blocks
parents
8509c63c
6135853c
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
63 additions
and
462 deletions
+63
-462
ChatsCommand.php
src/Admin/ChatsCommand.php
+3
-34
SendtoallCommand.php
src/Admin/SendtoallCommand.php
+3
-34
SendtochannelCommand.php
src/Admin/SendtochannelCommand.php
+3
-34
ChannelchatcreatedCommand.php
src/Commands/ChannelchatcreatedCommand.php
+3
-16
ChoseninlineresultCommand.php
src/Commands/ChoseninlineresultCommand.php
+3
-16
DateCommand.php
src/Commands/DateCommand.php
+3
-28
DeletechatphotoCommand.php
src/Commands/DeletechatphotoCommand.php
+3
-16
EchoCommand.php
src/Commands/EchoCommand.php
+3
-28
GenericCommand.php
src/Commands/GenericCommand.php
+3
-16
GenericmessageCommand.php
src/Commands/GenericmessageCommand.php
+3
-16
GroupchatcreatedCommand.php
src/Commands/GroupchatcreatedCommand.php
+3
-16
HelpCommand.php
src/Commands/HelpCommand.php
+3
-28
InlinequeryCommand.php
src/Commands/InlinequeryCommand.php
+3
-16
LeftchatparticipantCommand.php
src/Commands/LeftchatparticipantCommand.php
+3
-16
NewchatparticipantCommand.php
src/Commands/NewchatparticipantCommand.php
+3
-16
NewchattitleCommand.php
src/Commands/NewchattitleCommand.php
+3
-16
SlapCommand.php
src/Commands/SlapCommand.php
+3
-22
StartCommand.php
src/Commands/StartCommand.php
+3
-22
SupergroupchatcreatedCommand.php
src/Commands/SupergroupchatcreatedCommand.php
+3
-16
WeatherCommand.php
src/Commands/WeatherCommand.php
+3
-28
WhoamiCommand.php
src/Commands/WhoamiCommand.php
+3
-28
No files found.
src/Admin/ChatsCommand.php
View file @
086f4859
...
...
@@ -20,47 +20,16 @@ use Longman\TelegramBot\Request;
*/
class
ChatsCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'chats'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'List all chats stored by the bot'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/chats'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
true
;
/**
* If this command needs mysql
*
* @var boolean
*/
protected
$need_mysql
=
false
;
/**#@-*/
/**
* Execution if MySQL is required but not available
...
...
src/Admin/SendtoallCommand.php
View file @
086f4859
...
...
@@ -18,47 +18,16 @@ use Longman\TelegramBot\Request;
*/
class
SendtoallCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'sendtoall'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Send the message to all the user\'s bot'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/sendall <message to send>'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.2.0'
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
true
;
/**
* If this command needs mysql
*
* @var boolean
*/
protected
$need_mysql
=
true
;
/**#@-*/
/**
* Execution if MySQL is required but not available
...
...
src/Admin/SendtochannelCommand.php
View file @
086f4859
...
...
@@ -18,47 +18,16 @@ use Longman\TelegramBot\Request;
*/
class
SendtochannelCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'sendtochannel'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Send message to a channel'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/sendchannel <message to send>'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'0.1.0'
;
/**
* If this command is public
*
* @var boolean
*/
protected
$public
=
true
;
/**
* If this command needs mysql
*
* @var boolean
*/
protected
$need_mysql
=
false
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/ChannelchatcreatedCommand.php
View file @
086f4859
...
...
@@ -17,26 +17,13 @@ use Longman\TelegramBot\Command;
*/
class
ChannelchatcreatedCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'Channelchatcreated'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Channel chat created'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/ChoseninlineresultCommand.php
View file @
086f4859
...
...
@@ -17,26 +17,13 @@ use Longman\TelegramBot\Command;
*/
class
ChoseninlineresultCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'choseninlineresult'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Chosen result query'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/DateCommand.php
View file @
086f4859
...
...
@@ -19,40 +19,15 @@ use Longman\TelegramBot\Request;
*/
class
DateCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
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 public
*
* @var boolean
*/
protected
$public
=
true
;
/**#@-*/
/**
* Base URL for Google Maps API
...
...
src/Commands/DeletechatphotoCommand.php
View file @
086f4859
...
...
@@ -17,26 +17,13 @@ use Longman\TelegramBot\Command;
*/
class
DeletechatphotoCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'Deletechatphoto'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Delete chat photo'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/EchoCommand.php
View file @
086f4859
...
...
@@ -18,40 +18,15 @@ use Longman\TelegramBot\Request;
*/
class
EchoCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
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 public
*
* @var boolean
*/
protected
$public
=
true
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/GenericCommand.php
View file @
086f4859
...
...
@@ -18,26 +18,13 @@ use Longman\TelegramBot\Request;
*/
class
GenericCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'Generic'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Handles generic commands or is executed by default when a command is not found'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/GenericmessageCommand.php
View file @
086f4859
...
...
@@ -17,26 +17,13 @@ use Longman\TelegramBot\Command;
*/
class
GenericmessageCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'Genericmessage'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Handle generic message'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/GroupchatcreatedCommand.php
View file @
086f4859
...
...
@@ -17,26 +17,13 @@ use Longman\TelegramBot\Command;
*/
class
GroupchatcreatedCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'Groupchatcreated'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Group chat created'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/HelpCommand.php
View file @
086f4859
...
...
@@ -18,40 +18,15 @@ use Longman\TelegramBot\Request;
*/
class
HelpCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
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 public
*
* @var boolean
*/
protected
$public
=
true
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/InlinequeryCommand.php
View file @
086f4859
...
...
@@ -19,26 +19,13 @@ use Longman\TelegramBot\Request;
*/
class
InlinequeryCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'inlinequery'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Reply to inline query'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/LeftchatparticipantCommand.php
View file @
086f4859
...
...
@@ -17,26 +17,13 @@ use Longman\TelegramBot\Command;
*/
class
LeftchatparticipantCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'leftchatparticipant'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Left Chat Participant'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/NewchatparticipantCommand.php
View file @
086f4859
...
...
@@ -18,26 +18,13 @@ use Longman\TelegramBot\Request;
*/
class
NewchatparticipantCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'Newchatparticipant'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'New Chat Participant'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/NewchattitleCommand.php
View file @
086f4859
...
...
@@ -17,26 +17,13 @@ use Longman\TelegramBot\Command;
*/
class
NewchattitleCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'Newchattitle'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'New chat Title'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/SlapCommand.php
View file @
086f4859
...
...
@@ -18,33 +18,14 @@ use Longman\TelegramBot\Request;
*/
class
SlapCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
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'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/StartCommand.php
View file @
086f4859
...
...
@@ -18,33 +18,14 @@ use Longman\TelegramBot\Request;
*/
class
StartCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'start'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Start command'
;
/**
* Usage
*
* @var string
*/
protected
$usage
=
'/'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/SupergroupchatcreatedCommand.php
View file @
086f4859
...
...
@@ -18,26 +18,13 @@ use Longman\TelegramBot\Request;
*/
class
SupergroupchatcreatedCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'Supergroupchatcreated'
;
/**
* Description
*
* @var string
*/
protected
$description
=
'Super group chat created'
;
/**
* Version
*
* @var string
*/
protected
$version
=
'1.0.0'
;
/**#@-*/
/**
* Execute command
...
...
src/Commands/WeatherCommand.php
View file @
086f4859
...
...
@@ -18,40 +18,15 @@ use Longman\TelegramBot\Request;
*/
class
WeatherCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
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 public
*
* @var boolean
*/
protected
$public
=
true
;
/**#@-*/
/**
* Get weather using cURL request
...
...
src/Commands/WhoamiCommand.php
View file @
086f4859
...
...
@@ -21,40 +21,15 @@ use Longman\TelegramBot\Request;
*/
class
WhoamiCommand
extends
Command
{
/**
* Name
*
* @var string
/**#@+
* {@inheritdoc}
*/
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 public
*
* @var boolean
*/
protected
$public
=
true
;
/**#@-*/
/**
* Execute command
...
...
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