2.2 KiB
2.2 KiB
title | description | image |
---|---|---|
channels.getImportantHistory | Get important channel/supergroup history | https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png |
Method: channels.getImportantHistory
Get important channel/supergroup history
Parameters:
Name | Type | Required | Description |
---|---|---|---|
channel | Username, chat ID, Update, Message or InputChannel | Optional | The supergroup/channel |
offset_id | int | Yes | Message ID offset |
add_offset | int | Yes | Additional offset |
limit | int | Yes | Number of results to return |
max_id | int | Yes | Maximum message ID |
min_id | int | Yes | Minumum message ID |
Return type: messages_Messages
Can bots use this method: YES
MadelineProto Example:
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$messages_Messages = $MadelineProto->channels->getImportantHistory(['channel' => InputChannel, 'offset_id' => int, 'add_offset' => int, 'limit' => int, 'max_id' => int, 'min_id' => int, ]);
PWRTelegram HTTP API example (NOT FOR MadelineProto):
As a bot:
POST/GET to https://api.pwrtelegram.xyz/botTOKEN/madeline
Parameters:
- method - channels.getImportantHistory
- params -
{"channel": InputChannel, "offset_id": int, "add_offset": int, "limit": int, "max_id": int, "min_id": int, }
As a user:
POST/GET to https://api.pwrtelegram.xyz/userTOKEN/channels.getImportantHistory
Parameters:
channel - Json encoded InputChannel
offset_id - Json encoded int
add_offset - Json encoded int
limit - Json encoded int
max_id - Json encoded int
min_id - Json encoded int
Or, if you're into Lua:
messages_Messages = channels.getImportantHistory({channel=InputChannel, offset_id=int, add_offset=int, limit=int, max_id=int, min_id=int, })