-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
266 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Telegram\\": "src/" | ||
"PhpBrasil\\Telegram\\": "src/" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace PhpBrasil\Telegram; | ||
|
||
use Telegram\Bot\Api as Http; | ||
use Telegram\Bot\Objects\Message; | ||
|
||
/** | ||
* Class Api | ||
* @package PhpBrasil\Telegram | ||
*/ | ||
class Api extends Http | ||
{ | ||
/** | ||
* Delete messages of chat history. | ||
* | ||
* <code> | ||
* $params = [ | ||
* 'chat_id' => '', | ||
* 'message_id' => '', | ||
* ]; | ||
* </code> | ||
* | ||
* @link https://core.telegram.org/bots/api#deletemessage | ||
* | ||
* @param array $params | ||
* | ||
* @var int|string $params ['chat_id'] | ||
* @var int|string $params ['message_id'] | ||
* | ||
* @return Message | ||
*/ | ||
public function deleteMessage(array $params) | ||
{ | ||
$response = $this->post('deleteMessage', $params); | ||
|
||
return new Message($response->getDecodedBody()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.