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
59cd92e8
Commit
59cd92e8
authored
Mar 29, 2016
by
Jack'lul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new_chat_photo handler
parent
999ee2e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
NewchatphotoCommand.php
src/Commands/SystemCommands/NewchatphotoCommand.php
+36
-0
Message.php
src/Entities/Message.php
+1
-0
Telegram.php
src/Telegram.php
+1
-0
No files found.
src/Commands/SystemCommands/NewchatphotoCommand.php
0 → 100644
View file @
59cd92e8
<?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
;
/**
* New chat photo command
*/
class
NewchatphotoCommand
extends
SystemCommand
{
/**#@+
* {@inheritdoc}
*/
protected
$name
=
'Newchatphoto'
;
protected
$description
=
'New chat Photo'
;
protected
$version
=
'1.0.1'
;
/**#@-*/
/**
* {@inheritdoc}
*/
/*public function execute()
{
//$message = $this->getMessage();
//$new_chat_photo = $message->getNewChatPhoto();
}*/
}
src/Entities/Message.php
View file @
59cd92e8
...
...
@@ -205,6 +205,7 @@ class Message extends Entity
}
}
$this
->
new_chat_photo
=
$photos
;
$this
->
type
=
'new_chat_photo'
;
}
$this
->
delete_chat_photo
=
isset
(
$data
[
'delete_chat_photo'
])
?
$data
[
'delete_chat_photo'
]
:
null
;
...
...
src/Telegram.php
View file @
59cd92e8
...
...
@@ -457,6 +457,7 @@ class Telegram
'left_chat_participant'
,
'new_chat_participant'
,
'new_chat_title'
,
'new_chat_photo'
,
'supergroup_chat_created'
,
]))
{
$command
=
$this
->
getCommandFromType
(
$type
);
...
...
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