Documenting methods...
This commit is contained in:
parent
4c7e1bad87
commit
feefb91feb
@ -20,7 +20,7 @@ Get most used chats
|
|||||||
|channels|[CLICK ME Bool](../types/Bool.md) | Optional|Fetch channels and supergroups?|
|
|channels|[CLICK ME Bool](../types/Bool.md) | Optional|Fetch channels and supergroups?|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|Initially 0, then `$offset += $contacts_TopPeers['categories']['count'];`|
|
|offset|[CLICK ME int](../types/int.md) | Yes|Initially 0, then `$offset += $contacts_TopPeers['categories']['count'];`|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|How many results to fetch|
|
|limit|[CLICK ME int](../types/int.md) | Yes|How many results to fetch|
|
||||||
|hash|[CLICK ME int](../types/int.md) | Yes||
|
|hash|[CLICK ME int](../types/int.md) | Yes|$MadelineProto->gen_vector_hash(previously fetched peer ids);|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [contacts\_TopPeers](../types/contacts_TopPeers.md)
|
### Return type: [contacts\_TopPeers](../types/contacts_TopPeers.md)
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: contacts.resetSaved
|
title: contacts.resetSaved
|
||||||
description: contacts.resetSaved parameters, return type and example
|
description: Reset saved contacts
|
||||||
---
|
---
|
||||||
## Method: contacts.resetSaved
|
## Method: contacts.resetSaved
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Reset saved contacts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.addChatUser
|
title: messages.addChatUser
|
||||||
description: messages.addChatUser parameters, return type and example
|
description: Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
||||||
---
|
---
|
||||||
## Method: messages.addChatUser
|
## Method: messages.addChatUser
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to invite users|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to invite|
|
||||||
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|
|
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.createChat
|
title: messages.createChat
|
||||||
description: messages.createChat parameters, return type and example
|
description: Create a chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.createChat
|
## Method: messages.createChat
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Create a chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|
|
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|The users to add to the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|
|
|title|[CLICK ME string](../types/string.md) | Yes|The new chat's title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteChatUser
|
title: messages.deleteChatUser
|
||||||
description: messages.deleteChatUser parameters, return type and example
|
description: Delete a user from a chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.deleteChatUser
|
## Method: messages.deleteChatUser
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete a user from a chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to delete (pass @me to leave the chat)|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteHistory
|
title: messages.deleteHistory
|
||||||
description: messages.deleteHistory parameters, return type and example
|
description: Delete chat history
|
||||||
---
|
---
|
||||||
## Method: messages.deleteHistory
|
## Method: messages.deleteHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete chat history
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional|Only clear it from your side|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteMessages
|
title: messages.deleteMessages
|
||||||
description: messages.deleteMessages parameters, return type and example
|
description: Delete messages
|
||||||
---
|
---
|
||||||
## Method: messages.deleteMessages
|
## Method: messages.deleteMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|IDs of messages to delete, use channels->deleteMessages for supergroups|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.editChatPhoto
|
title: messages.editChatPhoto
|
||||||
description: messages.editChatPhoto parameters, return type and example
|
description: Edit the photo of a normal chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.editChatPhoto
|
## Method: messages.editChatPhoto
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Edit the photo of a normal chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|
|
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|The new phto|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.editChatTitle
|
title: messages.editChatTitle
|
||||||
description: messages.editChatTitle parameters, return type and example
|
description: Edit the title of a normal chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.editChatTitle
|
## Method: messages.editChatTitle
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Edit the title of a normal chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|
|
|title|[CLICK ME string](../types/string.md) | Yes|The new title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -16,7 +16,7 @@ description: messages.editInlineBotMessage parameters, return type and example
|
|||||||
|message|[CLICK ME string](../types/string.md) | Optional|
|
|message|[CLICK ME string](../types/string.md) | Optional|
|
||||||
|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|
|
|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|
|
||||||
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|
|
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|
|
||||||
|parse\_mode| [string](../types/string.md) | Optional |
|
|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message|
|
||||||
|geo\_point|[CLICK ME InputGeoPoint](../types/InputGeoPoint.md) | Optional|
|
|geo\_point|[CLICK ME InputGeoPoint](../types/InputGeoPoint.md) | Optional|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ description: messages.editMessage parameters, return type and example
|
|||||||
|message|[CLICK ME string](../types/string.md) | Optional|
|
|message|[CLICK ME string](../types/string.md) | Optional|
|
||||||
|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|
|
|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|
|
||||||
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|
|
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|
|
||||||
|parse\_mode| [string](../types/string.md) | Optional |
|
|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message|
|
||||||
|geo\_point|[CLICK ME InputGeoPoint](../types/InputGeoPoint.md) | Optional|
|
|geo\_point|[CLICK ME InputGeoPoint](../types/InputGeoPoint.md) | Optional|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,22 +1,24 @@
|
|||||||
---
|
---
|
||||||
title: messages.forwardMessages
|
title: messages.forwardMessages
|
||||||
description: messages.forwardMessages parameters, return type and example
|
description: Forward messages
|
||||||
---
|
---
|
||||||
## Method: messages.forwardMessages
|
## Method: messages.forwardMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Forward messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|silent|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications|
|
||||||
|background|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications|
|
||||||
|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional|If forwarding a game, forward your score, too|
|
||||||
|grouped|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|grouped|[CLICK ME Bool](../types/Bool.md) | Optional|Set to true if forwarding albums|
|
||||||
|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|From where to forward the messages|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs|
|
||||||
|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.getChats
|
title: messages.getChats
|
||||||
description: messages.getChats parameters, return type and example
|
description: Get info about chats
|
||||||
---
|
---
|
||||||
## Method: messages.getChats
|
## Method: messages.getChats
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get info about chats
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|The MTProto IDs of chats to fetch info about|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Chats](../types/messages_Chats.md)
|
### Return type: [messages\_Chats](../types/messages_Chats.md)
|
||||||
|
@ -1,71 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: messages.getDhConfig
|
title: messages.getDhConfig
|
||||||
description: messages.getDhConfig parameters, return type and example
|
description: You cannot use this method directly, instead use $MadelineProto->get_dh_config();
|
||||||
---
|
---
|
||||||
## Method: messages.getDhConfig
|
## Method: messages.getDhConfig
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
### Parameters:
|
**You cannot use this method directly, instead use $MadelineProto->get_dh_config();**
|
||||||
|
|
||||||
| Name | Type | Required |
|
|
||||||
|----------|---------------|----------|
|
|
||||||
|version|[CLICK ME int](../types/int.md) | Yes|
|
|
||||||
|random\_length|[CLICK ME int](../types/int.md) | Yes|
|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_DhConfig](../types/messages_DhConfig.md)
|
|
||||||
|
|
||||||
### Can bots use this method: **NO**
|
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|RANDOM_LENGTH_INVALID|Random length invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
if (!file_exists('madeline.php')) {
|
|
||||||
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
|
|
||||||
}
|
|
||||||
include 'madeline.php';
|
|
||||||
|
|
||||||
// !!! This API id/API hash combination will not work !!!
|
|
||||||
// !!! You must get your own @ my.telegram.org !!!
|
|
||||||
$api_id = 0;
|
|
||||||
$api_hash = '';
|
|
||||||
|
|
||||||
$MadelineProto = new \danog\MadelineProto\API('session.madeline', ['app_info' => ['api_id' => $api_id, 'api_hash' => $api_hash]]);
|
|
||||||
$MadelineProto->start();
|
|
||||||
|
|
||||||
$messages_DhConfig = $MadelineProto->messages->getDhConfig(['version' => int, 'random_length' => int, ]);
|
|
||||||
```
|
|
||||||
|
|
||||||
### [PWRTelegram HTTP API](https://pwrtelegram.xyz) example (NOT FOR MadelineProto):
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### As a user:
|
|
||||||
|
|
||||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getDhConfig`
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
|
|
||||||
version - Json encoded int
|
|
||||||
|
|
||||||
random_length - Json encoded int
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Or, if you're into Lua:
|
|
||||||
|
|
||||||
```
|
|
||||||
messages_DhConfig = messages.getDhConfig({version=int, random_length=int, })
|
|
||||||
```
|
|
||||||
|
|
||||||
|
@ -1,20 +1,22 @@
|
|||||||
---
|
---
|
||||||
title: messages.getDialogs
|
title: messages.getDialogs
|
||||||
description: messages.getDialogs parameters, return type and example
|
description: Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
|
||||||
---
|
---
|
||||||
## Method: messages.getDialogs
|
## Method: messages.getDialogs
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|Do not fetch pinned chats|
|
||||||
|offset\_date|[CLICK ME int](../types/int.md) | Yes|
|
|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];|
|
||||||
|offset\_id|[CLICK ME int](../types/int.md) | Yes|
|
|offset\_id|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['id'];|
|
||||||
|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|end($res['dialogs'])['peer'];|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Dialogs](../types/messages_Dialogs.md)
|
### Return type: [messages\_Dialogs](../types/messages_Dialogs.md)
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
---
|
---
|
||||||
title: messages.getHistory
|
title: messages.getHistory
|
||||||
description: messages.getHistory parameters, return type and example
|
description: Get previous messages of a group
|
||||||
---
|
---
|
||||||
## Method: messages.getHistory
|
## Method: messages.getHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get previous messages of a group
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat|
|
||||||
|offset\_id|[CLICK ME int](../types/int.md) | Yes|
|
|offset\_id|[CLICK ME int](../types/int.md) | Yes|The last fetched message ID, initially 0|
|
||||||
|offset\_date|[CLICK ME int](../types/int.md) | Yes|
|
|offset\_date|[CLICK ME int](../types/int.md) | Yes|The date of the last previously fetched message, initially 0|
|
||||||
|add\_offset|[CLICK ME int](../types/int.md) | Yes|
|
|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch|
|
||||||
|min\_id|[CLICK ME int](../types/int.md) | Yes|
|
|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch|
|
||||||
|hash|[CLICK ME int](../types/int.md) | Yes|
|
|hash|[CLICK ME int](../types/int.md) | Yes|hash of old messages, $MadelineProto->gen_vector_hash($parsedMessageIds)|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.getPeerSettings
|
title: messages.getPeerSettings
|
||||||
description: messages.getPeerSettings parameters, return type and example
|
description: Get the settings of apeer
|
||||||
---
|
---
|
||||||
## Method: messages.getPeerSettings
|
## Method: messages.getPeerSettings
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get the settings of apeer
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [PeerSettings](../types/PeerSettings.md)
|
### Return type: [PeerSettings](../types/PeerSettings.md)
|
||||||
|
@ -12,7 +12,7 @@ description: messages.getWebPagePreview parameters, return type and example
|
|||||||
|----------|---------------|----------|
|
|----------|---------------|----------|
|
||||||
|message|[CLICK ME string](../types/string.md) | Yes|
|
|message|[CLICK ME string](../types/string.md) | Yes|
|
||||||
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|
|
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|
|
||||||
|parse\_mode| [string](../types/string.md) | Optional |
|
|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [MessageMedia](../types/MessageMedia.md)
|
### Return type: [MessageMedia](../types/MessageMedia.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.hideReportSpam
|
title: messages.hideReportSpam
|
||||||
description: messages.hideReportSpam parameters, return type and example
|
description: Hide report spam popup
|
||||||
---
|
---
|
||||||
## Method: messages.hideReportSpam
|
## Method: messages.hideReportSpam
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Hide report spam popup
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.readHistory
|
title: messages.readHistory
|
||||||
description: messages.readHistory parameters, return type and example
|
description: Mark messages as read
|
||||||
---
|
---
|
||||||
## Method: messages.readHistory
|
## Method: messages.readHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Mark messages as read
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to mark messages as read|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to mark as read|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.receivedMessages
|
title: messages.receivedMessages
|
||||||
description: messages.receivedMessages parameters, return type and example
|
description: Mark messages as read
|
||||||
---
|
---
|
||||||
## Method: messages.receivedMessages
|
## Method: messages.receivedMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Mark messages as read
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to mark as read|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Vector\_of\_ReceivedNotifyMessage](../types/ReceivedNotifyMessage.md)
|
### Return type: [Vector\_of\_ReceivedNotifyMessage](../types/ReceivedNotifyMessage.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.reportSpam
|
title: messages.reportSpam
|
||||||
description: messages.reportSpam parameters, return type and example
|
description: Report a peer for spam
|
||||||
---
|
---
|
||||||
## Method: messages.reportSpam
|
## Method: messages.reportSpam
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Report a peer for spam
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -15,7 +15,7 @@ description: messages.saveDraft parameters, return type and example
|
|||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
||||||
|message|[CLICK ME string](../types/string.md) | Yes|
|
|message|[CLICK ME string](../types/string.md) | Yes|
|
||||||
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|
|
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|
|
||||||
|parse\_mode| [string](../types/string.md) | Optional |
|
|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,26 +1,28 @@
|
|||||||
---
|
---
|
||||||
title: messages.search
|
title: messages.search
|
||||||
description: messages.search parameters, return type and example
|
description: Search peers or messages
|
||||||
---
|
---
|
||||||
## Method: messages.search
|
## Method: messages.search
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Search peers or messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search|
|
||||||
|q|[CLICK ME string](../types/string.md) | Yes|
|
|q|[CLICK ME string](../types/string.md) | Yes|What to search|
|
||||||
|from\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|from\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|Show only messages from a certain user?|
|
||||||
|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|
|
|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter|
|
||||||
|min\_date|[CLICK ME int](../types/int.md) | Yes|
|
|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch|
|
||||||
|max\_date|[CLICK ME int](../types/int.md) | Yes|
|
|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch|
|
||||||
|offset\_id|[CLICK ME int](../types/int.md) | Yes|
|
|offset\_id|[CLICK ME int](../types/int.md) | Yes|Offset |
|
||||||
|add\_offset|[CLICK ME int](../types/int.md) | Yes|
|
|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of results to return|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id to return|
|
||||||
|min\_id|[CLICK ME int](../types/int.md) | Yes|
|
|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message id to return|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
||||||
|
@ -1,25 +1,27 @@
|
|||||||
---
|
---
|
||||||
title: messages.sendMedia
|
title: messages.sendMedia
|
||||||
description: messages.sendMedia parameters, return type and example
|
description: Send a media
|
||||||
---
|
---
|
||||||
## Method: messages.sendMedia
|
## Method: messages.sendMedia
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send a media
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|silent|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?|
|
||||||
|background|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?|
|
||||||
|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional|Clear the message draft of this chat?|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to send the media|
|
||||||
|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|
|
|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID|
|
||||||
|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|
|
|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send|
|
||||||
|message|[CLICK ME string](../types/string.md) | Yes|
|
|message|[CLICK ME string](../types/string.md) | Yes|The caption|
|
||||||
|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|
|
|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send|
|
||||||
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|
|
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities for styled text|
|
||||||
|parse\_mode| [string](../types/string.md) | Optional |
|
|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,25 +1,27 @@
|
|||||||
---
|
---
|
||||||
title: messages.sendMessage
|
title: messages.sendMessage
|
||||||
description: messages.sendMessage parameters, return type and example
|
description: Send a message
|
||||||
---
|
---
|
||||||
## Method: messages.sendMessage
|
## Method: messages.sendMessage
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send a message
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?|
|
||||||
|silent|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?|
|
||||||
|background|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?|
|
||||||
|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional|
|
|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional|Clear the message draft of this chat?|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to send this message|
|
||||||
|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|
|
|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID|
|
||||||
|message|[CLICK ME string](../types/string.md) | Yes|
|
|message|[CLICK ME string](../types/string.md) | Yes|The message to send|
|
||||||
|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|
|
|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send|
|
||||||
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|
|
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)|
|
||||||
|parse\_mode| [string](../types/string.md) | Optional |
|
|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.setEncryptedTyping
|
title: messages.setEncryptedTyping
|
||||||
description: messages.setEncryptedTyping parameters, return type and example
|
description: Send typing notification to secret chat
|
||||||
---
|
---
|
||||||
## Method: messages.setEncryptedTyping
|
## Method: messages.setEncryptedTyping
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send typing notification to secret chat
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|
|
|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes||
|
||||||
|typing|[CLICK ME Bool](../types/Bool.md) | Yes|
|
|typing|[CLICK ME Bool](../types/Bool.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.setTyping
|
title: messages.setTyping
|
||||||
description: messages.setTyping parameters, return type and example
|
description: Change typing status
|
||||||
---
|
---
|
||||||
## Method: messages.setTyping
|
## Method: messages.setTyping
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Change typing status
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to change typing status|
|
||||||
|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes|
|
|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes|Typing status|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.addChatUser
|
title: messages.addChatUser
|
||||||
description: messages.addChatUser parameters, return type and example
|
description: Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
||||||
---
|
---
|
||||||
## Method: messages.addChatUser
|
## Method: messages.addChatUser
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to invite users|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to invite|
|
||||||
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|
|
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.createChat
|
title: messages.createChat
|
||||||
description: messages.createChat parameters, return type and example
|
description: Create a chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.createChat
|
## Method: messages.createChat
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Create a chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|
|
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|The users to add to the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|
|
|title|[CLICK ME string](../types/string.md) | Yes|The new chat's title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteChatUser
|
title: messages.deleteChatUser
|
||||||
description: messages.deleteChatUser parameters, return type and example
|
description: Delete a user from a chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.deleteChatUser
|
## Method: messages.deleteChatUser
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete a user from a chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to delete (pass @me to leave the chat)|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteHistory
|
title: messages.deleteHistory
|
||||||
description: messages.deleteHistory parameters, return type and example
|
description: Delete chat history
|
||||||
---
|
---
|
||||||
## Method: messages.deleteHistory
|
## Method: messages.deleteHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete chat history
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteMessages
|
title: messages.deleteMessages
|
||||||
description: messages.deleteMessages parameters, return type and example
|
description: Delete messages
|
||||||
---
|
---
|
||||||
## Method: messages.deleteMessages
|
## Method: messages.deleteMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|IDs of messages to delete, use channels->deleteMessages for supergroups|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Vector\_of\_int](../types/int.md)
|
### Return type: [Vector\_of\_int](../types/int.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.editChatPhoto
|
title: messages.editChatPhoto
|
||||||
description: messages.editChatPhoto parameters, return type and example
|
description: Edit the photo of a normal chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.editChatPhoto
|
## Method: messages.editChatPhoto
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Edit the photo of a normal chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|
|
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|The new phto|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.editChatTitle
|
title: messages.editChatTitle
|
||||||
description: messages.editChatTitle parameters, return type and example
|
description: Edit the title of a normal chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.editChatTitle
|
## Method: messages.editChatTitle
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Edit the title of a normal chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|
|
|title|[CLICK ME string](../types/string.md) | Yes|The new title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.forwardMessages
|
title: messages.forwardMessages
|
||||||
description: messages.forwardMessages parameters, return type and example
|
description: Forward messages
|
||||||
---
|
---
|
||||||
## Method: messages.forwardMessages
|
## Method: messages.forwardMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Forward messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional||
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessages](../types/messages_StatedMessages.md)
|
### Return type: [messages\_StatedMessages](../types/messages_StatedMessages.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.getChats
|
title: messages.getChats
|
||||||
description: messages.getChats parameters, return type and example
|
description: Get info about chats
|
||||||
---
|
---
|
||||||
## Method: messages.getChats
|
## Method: messages.getChats
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get info about chats
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|The MTProto IDs of chats to fetch info about|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Chats](../types/messages_Chats.md)
|
### Return type: [messages\_Chats](../types/messages_Chats.md)
|
||||||
|
@ -1,71 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: messages.getDhConfig
|
title: messages.getDhConfig
|
||||||
description: messages.getDhConfig parameters, return type and example
|
description: You cannot use this method directly, instead use $MadelineProto->get_dh_config();
|
||||||
---
|
---
|
||||||
## Method: messages.getDhConfig
|
## Method: messages.getDhConfig
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
### Parameters:
|
**You cannot use this method directly, instead use $MadelineProto->get_dh_config();**
|
||||||
|
|
||||||
| Name | Type | Required |
|
|
||||||
|----------|---------------|----------|
|
|
||||||
|version|[CLICK ME int](../types/int.md) | Yes|
|
|
||||||
|random\_length|[CLICK ME int](../types/int.md) | Yes|
|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_DhConfig](../types/messages_DhConfig.md)
|
|
||||||
|
|
||||||
### Can bots use this method: **NO**
|
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|RANDOM_LENGTH_INVALID|Random length invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
if (!file_exists('madeline.php')) {
|
|
||||||
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
|
|
||||||
}
|
|
||||||
include 'madeline.php';
|
|
||||||
|
|
||||||
// !!! This API id/API hash combination will not work !!!
|
|
||||||
// !!! You must get your own @ my.telegram.org !!!
|
|
||||||
$api_id = 0;
|
|
||||||
$api_hash = '';
|
|
||||||
|
|
||||||
$MadelineProto = new \danog\MadelineProto\API('session.madeline', ['app_info' => ['api_id' => $api_id, 'api_hash' => $api_hash]]);
|
|
||||||
$MadelineProto->start();
|
|
||||||
|
|
||||||
$messages_DhConfig = $MadelineProto->messages->getDhConfig(['version' => int, 'random_length' => int, ]);
|
|
||||||
```
|
|
||||||
|
|
||||||
### [PWRTelegram HTTP API](https://pwrtelegram.xyz) example (NOT FOR MadelineProto):
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### As a user:
|
|
||||||
|
|
||||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getDhConfig`
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
|
|
||||||
version - Json encoded int
|
|
||||||
|
|
||||||
random_length - Json encoded int
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Or, if you're into Lua:
|
|
||||||
|
|
||||||
```
|
|
||||||
messages_DhConfig = messages.getDhConfig({version=int, random_length=int, })
|
|
||||||
```
|
|
||||||
|
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.getDialogs
|
title: messages.getDialogs
|
||||||
description: messages.getDialogs parameters, return type and example
|
description: Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
|
||||||
---
|
---
|
||||||
## Method: messages.getDialogs
|
## Method: messages.getDialogs
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Dialogs](../types/messages_Dialogs.md)
|
### Return type: [messages\_Dialogs](../types/messages_Dialogs.md)
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
---
|
---
|
||||||
title: messages.getHistory
|
title: messages.getHistory
|
||||||
description: messages.getHistory parameters, return type and example
|
description: Get previous messages of a group
|
||||||
---
|
---
|
||||||
## Method: messages.getHistory
|
## Method: messages.getHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get previous messages of a group
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
---
|
---
|
||||||
title: messages.readHistory
|
title: messages.readHistory
|
||||||
description: messages.readHistory parameters, return type and example
|
description: Mark messages as read
|
||||||
---
|
---
|
||||||
## Method: messages.readHistory
|
## Method: messages.readHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Mark messages as read
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to mark messages as read|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to mark as read|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|read\_contents|[CLICK ME Bool](../types/Bool.md) | Yes|
|
|read\_contents|[CLICK ME Bool](../types/Bool.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.receivedMessages
|
title: messages.receivedMessages
|
||||||
description: messages.receivedMessages parameters, return type and example
|
description: Mark messages as read
|
||||||
---
|
---
|
||||||
## Method: messages.receivedMessages
|
## Method: messages.receivedMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Mark messages as read
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to mark as read|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Vector\_of\_int](../types/int.md)
|
### Return type: [Vector\_of\_int](../types/int.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.reportSpam
|
title: messages.reportSpam
|
||||||
description: messages.reportSpam parameters, return type and example
|
description: Report a peer for spam
|
||||||
---
|
---
|
||||||
## Method: messages.reportSpam
|
## Method: messages.reportSpam
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Report a peer for spam
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
---
|
---
|
||||||
title: messages.search
|
title: messages.search
|
||||||
description: messages.search parameters, return type and example
|
description: Search peers or messages
|
||||||
---
|
---
|
||||||
## Method: messages.search
|
## Method: messages.search
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Search peers or messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search|
|
||||||
|q|[CLICK ME string](../types/string.md) | Yes|
|
|q|[CLICK ME string](../types/string.md) | Yes|What to search|
|
||||||
|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|
|
|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter|
|
||||||
|min\_date|[CLICK ME int](../types/int.md) | Yes|
|
|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch|
|
||||||
|max\_date|[CLICK ME int](../types/int.md) | Yes|
|
|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id to return|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of results to return|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.sendMedia
|
title: messages.sendMedia
|
||||||
description: messages.sendMedia parameters, return type and example
|
description: Send a media
|
||||||
---
|
---
|
||||||
## Method: messages.sendMedia
|
## Method: messages.sendMedia
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send a media
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to send the media|
|
||||||
|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|
|
|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.sendMessage
|
title: messages.sendMessage
|
||||||
description: messages.sendMessage parameters, return type and example
|
description: Send a message
|
||||||
---
|
---
|
||||||
## Method: messages.sendMessage
|
## Method: messages.sendMessage
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send a message
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to send this message|
|
||||||
|message|[CLICK ME string](../types/string.md) | Yes|
|
|message|[CLICK ME string](../types/string.md) | Yes|The message to send|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_SentMessage](../types/messages_SentMessage.md)
|
### Return type: [messages\_SentMessage](../types/messages_SentMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.setEncryptedTyping
|
title: messages.setEncryptedTyping
|
||||||
description: messages.setEncryptedTyping parameters, return type and example
|
description: Send typing notification to secret chat
|
||||||
---
|
---
|
||||||
## Method: messages.setEncryptedTyping
|
## Method: messages.setEncryptedTyping
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send typing notification to secret chat
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|
|
|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes||
|
||||||
|typing|[CLICK ME Bool](../types/Bool.md) | Yes|
|
|typing|[CLICK ME Bool](../types/Bool.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.setTyping
|
title: messages.setTyping
|
||||||
description: messages.setTyping parameters, return type and example
|
description: Change typing status
|
||||||
---
|
---
|
||||||
## Method: messages.setTyping
|
## Method: messages.setTyping
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Change typing status
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to change typing status|
|
||||||
|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes|
|
|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes|Typing status|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.addChatUser
|
title: messages.addChatUser
|
||||||
description: messages.addChatUser parameters, return type and example
|
description: Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
||||||
---
|
---
|
||||||
## Method: messages.addChatUser
|
## Method: messages.addChatUser
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to invite users|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to invite|
|
||||||
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|
|
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.createChat
|
title: messages.createChat
|
||||||
description: messages.createChat parameters, return type and example
|
description: Create a chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.createChat
|
## Method: messages.createChat
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Create a chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|
|
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|The users to add to the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|
|
|title|[CLICK ME string](../types/string.md) | Yes|The new chat's title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteChatUser
|
title: messages.deleteChatUser
|
||||||
description: messages.deleteChatUser parameters, return type and example
|
description: Delete a user from a chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.deleteChatUser
|
## Method: messages.deleteChatUser
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete a user from a chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to delete (pass @me to leave the chat)|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteHistory
|
title: messages.deleteHistory
|
||||||
description: messages.deleteHistory parameters, return type and example
|
description: Delete chat history
|
||||||
---
|
---
|
||||||
## Method: messages.deleteHistory
|
## Method: messages.deleteHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete chat history
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteMessages
|
title: messages.deleteMessages
|
||||||
description: messages.deleteMessages parameters, return type and example
|
description: Delete messages
|
||||||
---
|
---
|
||||||
## Method: messages.deleteMessages
|
## Method: messages.deleteMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|IDs of messages to delete, use channels->deleteMessages for supergroups|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Vector\_of\_int](../types/int.md)
|
### Return type: [Vector\_of\_int](../types/int.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.editChatPhoto
|
title: messages.editChatPhoto
|
||||||
description: messages.editChatPhoto parameters, return type and example
|
description: Edit the photo of a normal chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.editChatPhoto
|
## Method: messages.editChatPhoto
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Edit the photo of a normal chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|
|
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|The new phto|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.editChatTitle
|
title: messages.editChatTitle
|
||||||
description: messages.editChatTitle parameters, return type and example
|
description: Edit the title of a normal chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.editChatTitle
|
## Method: messages.editChatTitle
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Edit the title of a normal chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|
|
|title|[CLICK ME string](../types/string.md) | Yes|The new title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.forwardMessages
|
title: messages.forwardMessages
|
||||||
description: messages.forwardMessages parameters, return type and example
|
description: Forward messages
|
||||||
---
|
---
|
||||||
## Method: messages.forwardMessages
|
## Method: messages.forwardMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Forward messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional||
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessages](../types/messages_StatedMessages.md)
|
### Return type: [messages\_StatedMessages](../types/messages_StatedMessages.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.getChats
|
title: messages.getChats
|
||||||
description: messages.getChats parameters, return type and example
|
description: Get info about chats
|
||||||
---
|
---
|
||||||
## Method: messages.getChats
|
## Method: messages.getChats
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get info about chats
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|The MTProto IDs of chats to fetch info about|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Chats](../types/messages_Chats.md)
|
### Return type: [messages\_Chats](../types/messages_Chats.md)
|
||||||
|
@ -1,71 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: messages.getDhConfig
|
title: messages.getDhConfig
|
||||||
description: messages.getDhConfig parameters, return type and example
|
description: You cannot use this method directly, instead use $MadelineProto->get_dh_config();
|
||||||
---
|
---
|
||||||
## Method: messages.getDhConfig
|
## Method: messages.getDhConfig
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
### Parameters:
|
**You cannot use this method directly, instead use $MadelineProto->get_dh_config();**
|
||||||
|
|
||||||
| Name | Type | Required |
|
|
||||||
|----------|---------------|----------|
|
|
||||||
|version|[CLICK ME int](../types/int.md) | Yes|
|
|
||||||
|random\_length|[CLICK ME int](../types/int.md) | Yes|
|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_DhConfig](../types/messages_DhConfig.md)
|
|
||||||
|
|
||||||
### Can bots use this method: **NO**
|
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|RANDOM_LENGTH_INVALID|Random length invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
if (!file_exists('madeline.php')) {
|
|
||||||
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
|
|
||||||
}
|
|
||||||
include 'madeline.php';
|
|
||||||
|
|
||||||
// !!! This API id/API hash combination will not work !!!
|
|
||||||
// !!! You must get your own @ my.telegram.org !!!
|
|
||||||
$api_id = 0;
|
|
||||||
$api_hash = '';
|
|
||||||
|
|
||||||
$MadelineProto = new \danog\MadelineProto\API('session.madeline', ['app_info' => ['api_id' => $api_id, 'api_hash' => $api_hash]]);
|
|
||||||
$MadelineProto->start();
|
|
||||||
|
|
||||||
$messages_DhConfig = $MadelineProto->messages->getDhConfig(['version' => int, 'random_length' => int, ]);
|
|
||||||
```
|
|
||||||
|
|
||||||
### [PWRTelegram HTTP API](https://pwrtelegram.xyz) example (NOT FOR MadelineProto):
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### As a user:
|
|
||||||
|
|
||||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getDhConfig`
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
|
|
||||||
version - Json encoded int
|
|
||||||
|
|
||||||
random_length - Json encoded int
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Or, if you're into Lua:
|
|
||||||
|
|
||||||
```
|
|
||||||
messages_DhConfig = messages.getDhConfig({version=int, random_length=int, })
|
|
||||||
```
|
|
||||||
|
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.getDialogs
|
title: messages.getDialogs
|
||||||
description: messages.getDialogs parameters, return type and example
|
description: Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
|
||||||
---
|
---
|
||||||
## Method: messages.getDialogs
|
## Method: messages.getDialogs
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Dialogs](../types/messages_Dialogs.md)
|
### Return type: [messages\_Dialogs](../types/messages_Dialogs.md)
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
---
|
---
|
||||||
title: messages.getHistory
|
title: messages.getHistory
|
||||||
description: messages.getHistory parameters, return type and example
|
description: Get previous messages of a group
|
||||||
---
|
---
|
||||||
## Method: messages.getHistory
|
## Method: messages.getHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get previous messages of a group
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
---
|
---
|
||||||
title: messages.readHistory
|
title: messages.readHistory
|
||||||
description: messages.readHistory parameters, return type and example
|
description: Mark messages as read
|
||||||
---
|
---
|
||||||
## Method: messages.readHistory
|
## Method: messages.readHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Mark messages as read
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to mark messages as read|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to mark as read|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|read\_contents|[CLICK ME Bool](../types/Bool.md) | Yes|
|
|read\_contents|[CLICK ME Bool](../types/Bool.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.receivedMessages
|
title: messages.receivedMessages
|
||||||
description: messages.receivedMessages parameters, return type and example
|
description: Mark messages as read
|
||||||
---
|
---
|
||||||
## Method: messages.receivedMessages
|
## Method: messages.receivedMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Mark messages as read
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to mark as read|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Vector\_of\_int](../types/int.md)
|
### Return type: [Vector\_of\_int](../types/int.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.reportSpam
|
title: messages.reportSpam
|
||||||
description: messages.reportSpam parameters, return type and example
|
description: Report a peer for spam
|
||||||
---
|
---
|
||||||
## Method: messages.reportSpam
|
## Method: messages.reportSpam
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Report a peer for spam
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
---
|
---
|
||||||
title: messages.search
|
title: messages.search
|
||||||
description: messages.search parameters, return type and example
|
description: Search peers or messages
|
||||||
---
|
---
|
||||||
## Method: messages.search
|
## Method: messages.search
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Search peers or messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search|
|
||||||
|q|[CLICK ME string](../types/string.md) | Yes|
|
|q|[CLICK ME string](../types/string.md) | Yes|What to search|
|
||||||
|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|
|
|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter|
|
||||||
|min\_date|[CLICK ME int](../types/int.md) | Yes|
|
|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch|
|
||||||
|max\_date|[CLICK ME int](../types/int.md) | Yes|
|
|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id to return|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of results to return|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.sendMedia
|
title: messages.sendMedia
|
||||||
description: messages.sendMedia parameters, return type and example
|
description: Send a media
|
||||||
---
|
---
|
||||||
## Method: messages.sendMedia
|
## Method: messages.sendMedia
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send a media
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to send the media|
|
||||||
|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|
|
|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.sendMessage
|
title: messages.sendMessage
|
||||||
description: messages.sendMessage parameters, return type and example
|
description: Send a message
|
||||||
---
|
---
|
||||||
## Method: messages.sendMessage
|
## Method: messages.sendMessage
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send a message
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to send this message|
|
||||||
|message|[CLICK ME string](../types/string.md) | Yes|
|
|message|[CLICK ME string](../types/string.md) | Yes|The message to send|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_SentMessage](../types/messages_SentMessage.md)
|
### Return type: [messages\_SentMessage](../types/messages_SentMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.setEncryptedTyping
|
title: messages.setEncryptedTyping
|
||||||
description: messages.setEncryptedTyping parameters, return type and example
|
description: Send typing notification to secret chat
|
||||||
---
|
---
|
||||||
## Method: messages.setEncryptedTyping
|
## Method: messages.setEncryptedTyping
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send typing notification to secret chat
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|
|
|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes||
|
||||||
|typing|[CLICK ME Bool](../types/Bool.md) | Yes|
|
|typing|[CLICK ME Bool](../types/Bool.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.setTyping
|
title: messages.setTyping
|
||||||
description: messages.setTyping parameters, return type and example
|
description: Change typing status
|
||||||
---
|
---
|
||||||
## Method: messages.setTyping
|
## Method: messages.setTyping
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Change typing status
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to change typing status|
|
||||||
|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes|
|
|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes|Typing status|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.addChatUser
|
title: messages.addChatUser
|
||||||
description: messages.addChatUser parameters, return type and example
|
description: Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
||||||
---
|
---
|
||||||
## Method: messages.addChatUser
|
## Method: messages.addChatUser
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to invite users|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to invite|
|
||||||
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|
|
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.createChat
|
title: messages.createChat
|
||||||
description: messages.createChat parameters, return type and example
|
description: Create a chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.createChat
|
## Method: messages.createChat
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Create a chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|
|
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|The users to add to the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|
|
|title|[CLICK ME string](../types/string.md) | Yes|The new chat's title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteChatUser
|
title: messages.deleteChatUser
|
||||||
description: messages.deleteChatUser parameters, return type and example
|
description: Delete a user from a chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.deleteChatUser
|
## Method: messages.deleteChatUser
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete a user from a chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to delete (pass @me to leave the chat)|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteHistory
|
title: messages.deleteHistory
|
||||||
description: messages.deleteHistory parameters, return type and example
|
description: Delete chat history
|
||||||
---
|
---
|
||||||
## Method: messages.deleteHistory
|
## Method: messages.deleteHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete chat history
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteMessages
|
title: messages.deleteMessages
|
||||||
description: messages.deleteMessages parameters, return type and example
|
description: Delete messages
|
||||||
---
|
---
|
||||||
## Method: messages.deleteMessages
|
## Method: messages.deleteMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|IDs of messages to delete, use channels->deleteMessages for supergroups|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.editChatPhoto
|
title: messages.editChatPhoto
|
||||||
description: messages.editChatPhoto parameters, return type and example
|
description: Edit the photo of a normal chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.editChatPhoto
|
## Method: messages.editChatPhoto
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Edit the photo of a normal chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|
|
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|The new phto|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.editChatTitle
|
title: messages.editChatTitle
|
||||||
description: messages.editChatTitle parameters, return type and example
|
description: Edit the title of a normal chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.editChatTitle
|
## Method: messages.editChatTitle
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Edit the title of a normal chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|
|
|title|[CLICK ME string](../types/string.md) | Yes|The new title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.forwardMessages
|
title: messages.forwardMessages
|
||||||
description: messages.forwardMessages parameters, return type and example
|
description: Forward messages
|
||||||
---
|
---
|
||||||
## Method: messages.forwardMessages
|
## Method: messages.forwardMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Forward messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional||
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessages](../types/messages_StatedMessages.md)
|
### Return type: [messages\_StatedMessages](../types/messages_StatedMessages.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.getChats
|
title: messages.getChats
|
||||||
description: messages.getChats parameters, return type and example
|
description: Get info about chats
|
||||||
---
|
---
|
||||||
## Method: messages.getChats
|
## Method: messages.getChats
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get info about chats
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|The MTProto IDs of chats to fetch info about|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Chats](../types/messages_Chats.md)
|
### Return type: [messages\_Chats](../types/messages_Chats.md)
|
||||||
|
@ -1,71 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: messages.getDhConfig
|
title: messages.getDhConfig
|
||||||
description: messages.getDhConfig parameters, return type and example
|
description: You cannot use this method directly, instead use $MadelineProto->get_dh_config();
|
||||||
---
|
---
|
||||||
## Method: messages.getDhConfig
|
## Method: messages.getDhConfig
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
### Parameters:
|
**You cannot use this method directly, instead use $MadelineProto->get_dh_config();**
|
||||||
|
|
||||||
| Name | Type | Required |
|
|
||||||
|----------|---------------|----------|
|
|
||||||
|version|[CLICK ME int](../types/int.md) | Yes|
|
|
||||||
|random\_length|[CLICK ME int](../types/int.md) | Yes|
|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_DhConfig](../types/messages_DhConfig.md)
|
|
||||||
|
|
||||||
### Can bots use this method: **NO**
|
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|RANDOM_LENGTH_INVALID|Random length invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
if (!file_exists('madeline.php')) {
|
|
||||||
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
|
|
||||||
}
|
|
||||||
include 'madeline.php';
|
|
||||||
|
|
||||||
// !!! This API id/API hash combination will not work !!!
|
|
||||||
// !!! You must get your own @ my.telegram.org !!!
|
|
||||||
$api_id = 0;
|
|
||||||
$api_hash = '';
|
|
||||||
|
|
||||||
$MadelineProto = new \danog\MadelineProto\API('session.madeline', ['app_info' => ['api_id' => $api_id, 'api_hash' => $api_hash]]);
|
|
||||||
$MadelineProto->start();
|
|
||||||
|
|
||||||
$messages_DhConfig = $MadelineProto->messages->getDhConfig(['version' => int, 'random_length' => int, ]);
|
|
||||||
```
|
|
||||||
|
|
||||||
### [PWRTelegram HTTP API](https://pwrtelegram.xyz) example (NOT FOR MadelineProto):
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### As a user:
|
|
||||||
|
|
||||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getDhConfig`
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
|
|
||||||
version - Json encoded int
|
|
||||||
|
|
||||||
random_length - Json encoded int
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Or, if you're into Lua:
|
|
||||||
|
|
||||||
```
|
|
||||||
messages_DhConfig = messages.getDhConfig({version=int, random_length=int, })
|
|
||||||
```
|
|
||||||
|
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.getDialogs
|
title: messages.getDialogs
|
||||||
description: messages.getDialogs parameters, return type and example
|
description: Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
|
||||||
---
|
---
|
||||||
## Method: messages.getDialogs
|
## Method: messages.getDialogs
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Dialogs](../types/messages_Dialogs.md)
|
### Return type: [messages\_Dialogs](../types/messages_Dialogs.md)
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
---
|
---
|
||||||
title: messages.getHistory
|
title: messages.getHistory
|
||||||
description: messages.getHistory parameters, return type and example
|
description: Get previous messages of a group
|
||||||
---
|
---
|
||||||
## Method: messages.getHistory
|
## Method: messages.getHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get previous messages of a group
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.readHistory
|
title: messages.readHistory
|
||||||
description: messages.readHistory parameters, return type and example
|
description: Mark messages as read
|
||||||
---
|
---
|
||||||
## Method: messages.readHistory
|
## Method: messages.readHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Mark messages as read
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to mark messages as read|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to mark as read|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.receivedMessages
|
title: messages.receivedMessages
|
||||||
description: messages.receivedMessages parameters, return type and example
|
description: Mark messages as read
|
||||||
---
|
---
|
||||||
## Method: messages.receivedMessages
|
## Method: messages.receivedMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Mark messages as read
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to mark as read|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Vector\_of\_int](../types/int.md)
|
### Return type: [Vector\_of\_int](../types/int.md)
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
---
|
---
|
||||||
title: messages.search
|
title: messages.search
|
||||||
description: messages.search parameters, return type and example
|
description: Search peers or messages
|
||||||
---
|
---
|
||||||
## Method: messages.search
|
## Method: messages.search
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Search peers or messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search|
|
||||||
|q|[CLICK ME string](../types/string.md) | Yes|
|
|q|[CLICK ME string](../types/string.md) | Yes|What to search|
|
||||||
|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|
|
|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter|
|
||||||
|min\_date|[CLICK ME int](../types/int.md) | Yes|
|
|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch|
|
||||||
|max\_date|[CLICK ME int](../types/int.md) | Yes|
|
|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id to return|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of results to return|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.sendMedia
|
title: messages.sendMedia
|
||||||
description: messages.sendMedia parameters, return type and example
|
description: Send a media
|
||||||
---
|
---
|
||||||
## Method: messages.sendMedia
|
## Method: messages.sendMedia
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send a media
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to send the media|
|
||||||
|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Yes|
|
|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Yes|Reply to message by ID|
|
||||||
|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|
|
|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md)
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.sendMessage
|
title: messages.sendMessage
|
||||||
description: messages.sendMessage parameters, return type and example
|
description: Send a message
|
||||||
---
|
---
|
||||||
## Method: messages.sendMessage
|
## Method: messages.sendMessage
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send a message
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to send this message|
|
||||||
|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Yes|
|
|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Yes|Reply to message by ID|
|
||||||
|message|[CLICK ME string](../types/string.md) | Yes|
|
|message|[CLICK ME string](../types/string.md) | Yes|The message to send|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_SentMessage](../types/messages_SentMessage.md)
|
### Return type: [messages\_SentMessage](../types/messages_SentMessage.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.setEncryptedTyping
|
title: messages.setEncryptedTyping
|
||||||
description: messages.setEncryptedTyping parameters, return type and example
|
description: Send typing notification to secret chat
|
||||||
---
|
---
|
||||||
## Method: messages.setEncryptedTyping
|
## Method: messages.setEncryptedTyping
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Send typing notification to secret chat
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|
|
|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes||
|
||||||
|typing|[CLICK ME Bool](../types/Bool.md) | Yes|
|
|typing|[CLICK ME Bool](../types/Bool.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.setTyping
|
title: messages.setTyping
|
||||||
description: messages.setTyping parameters, return type and example
|
description: Change typing status
|
||||||
---
|
---
|
||||||
## Method: messages.setTyping
|
## Method: messages.setTyping
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Change typing status
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to change typing status|
|
||||||
|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes|
|
|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes|Typing status|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.addChatUser
|
title: messages.addChatUser
|
||||||
description: messages.addChatUser parameters, return type and example
|
description: Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
||||||
---
|
---
|
||||||
## Method: messages.addChatUser
|
## Method: messages.addChatUser
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to invite users|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to invite|
|
||||||
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|
|
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.createChat
|
title: messages.createChat
|
||||||
description: messages.createChat parameters, return type and example
|
description: Create a chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.createChat
|
## Method: messages.createChat
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Create a chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|
|
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|The users to add to the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|
|
|title|[CLICK ME string](../types/string.md) | Yes|The new chat's title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteChatUser
|
title: messages.deleteChatUser
|
||||||
description: messages.deleteChatUser parameters, return type and example
|
description: Delete a user from a chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.deleteChatUser
|
## Method: messages.deleteChatUser
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete a user from a chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to delete (pass @me to leave the chat)|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteHistory
|
title: messages.deleteHistory
|
||||||
description: messages.deleteHistory parameters, return type and example
|
description: Delete chat history
|
||||||
---
|
---
|
||||||
## Method: messages.deleteHistory
|
## Method: messages.deleteHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete chat history
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.deleteMessages
|
title: messages.deleteMessages
|
||||||
description: messages.deleteMessages parameters, return type and example
|
description: Delete messages
|
||||||
---
|
---
|
||||||
## Method: messages.deleteMessages
|
## Method: messages.deleteMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Delete messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|IDs of messages to delete, use channels->deleteMessages for supergroups|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.editChatPhoto
|
title: messages.editChatPhoto
|
||||||
description: messages.editChatPhoto parameters, return type and example
|
description: Edit the photo of a normal chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.editChatPhoto
|
## Method: messages.editChatPhoto
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Edit the photo of a normal chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|
|
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|The new phto|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.editChatTitle
|
title: messages.editChatTitle
|
||||||
description: messages.editChatTitle parameters, return type and example
|
description: Edit the title of a normal chat (not supergroup)
|
||||||
---
|
---
|
||||||
## Method: messages.editChatTitle
|
## Method: messages.editChatTitle
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Edit the title of a normal chat (not supergroup)
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The MTProto ID of the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|
|
|title|[CLICK ME string](../types/string.md) | Yes|The new title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
title: messages.forwardMessages
|
title: messages.forwardMessages
|
||||||
description: messages.forwardMessages parameters, return type and example
|
description: Forward messages
|
||||||
---
|
---
|
||||||
## Method: messages.forwardMessages
|
## Method: messages.forwardMessages
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Forward messages
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional||
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
title: messages.getChats
|
title: messages.getChats
|
||||||
description: messages.getChats parameters, return type and example
|
description: Get info about chats
|
||||||
---
|
---
|
||||||
## Method: messages.getChats
|
## Method: messages.getChats
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get info about chats
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|
|
|id|Array of [CLICK ME int](../types/int.md) | Yes|The MTProto IDs of chats to fetch info about|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Chats](../types/messages_Chats.md)
|
### Return type: [messages\_Chats](../types/messages_Chats.md)
|
||||||
|
@ -1,71 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: messages.getDhConfig
|
title: messages.getDhConfig
|
||||||
description: messages.getDhConfig parameters, return type and example
|
description: You cannot use this method directly, instead use $MadelineProto->get_dh_config();
|
||||||
---
|
---
|
||||||
## Method: messages.getDhConfig
|
## Method: messages.getDhConfig
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
### Parameters:
|
**You cannot use this method directly, instead use $MadelineProto->get_dh_config();**
|
||||||
|
|
||||||
| Name | Type | Required |
|
|
||||||
|----------|---------------|----------|
|
|
||||||
|version|[CLICK ME int](../types/int.md) | Yes|
|
|
||||||
|random\_length|[CLICK ME int](../types/int.md) | Yes|
|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_DhConfig](../types/messages_DhConfig.md)
|
|
||||||
|
|
||||||
### Can bots use this method: **NO**
|
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|RANDOM_LENGTH_INVALID|Random length invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
if (!file_exists('madeline.php')) {
|
|
||||||
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
|
|
||||||
}
|
|
||||||
include 'madeline.php';
|
|
||||||
|
|
||||||
// !!! This API id/API hash combination will not work !!!
|
|
||||||
// !!! You must get your own @ my.telegram.org !!!
|
|
||||||
$api_id = 0;
|
|
||||||
$api_hash = '';
|
|
||||||
|
|
||||||
$MadelineProto = new \danog\MadelineProto\API('session.madeline', ['app_info' => ['api_id' => $api_id, 'api_hash' => $api_hash]]);
|
|
||||||
$MadelineProto->start();
|
|
||||||
|
|
||||||
$messages_DhConfig = $MadelineProto->messages->getDhConfig(['version' => int, 'random_length' => int, ]);
|
|
||||||
```
|
|
||||||
|
|
||||||
### [PWRTelegram HTTP API](https://pwrtelegram.xyz) example (NOT FOR MadelineProto):
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### As a user:
|
|
||||||
|
|
||||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getDhConfig`
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
|
|
||||||
version - Json encoded int
|
|
||||||
|
|
||||||
random_length - Json encoded int
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Or, if you're into Lua:
|
|
||||||
|
|
||||||
```
|
|
||||||
messages_DhConfig = messages.getDhConfig({version=int, random_length=int, })
|
|
||||||
```
|
|
||||||
|
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.getDialogs
|
title: messages.getDialogs
|
||||||
description: messages.getDialogs parameters, return type and example
|
description: Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
|
||||||
---
|
---
|
||||||
## Method: messages.getDialogs
|
## Method: messages.getDialogs
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Dialogs](../types/messages_Dialogs.md)
|
### Return type: [messages\_Dialogs](../types/messages_Dialogs.md)
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
---
|
---
|
||||||
title: messages.getHistory
|
title: messages.getHistory
|
||||||
description: messages.getHistory parameters, return type and example
|
description: Get previous messages of a group
|
||||||
---
|
---
|
||||||
## Method: messages.getHistory
|
## Method: messages.getHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Get previous messages of a group
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|
|
|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
### Return type: [messages\_Messages](../types/messages_Messages.md)
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
---
|
---
|
||||||
title: messages.readHistory
|
title: messages.readHistory
|
||||||
description: messages.readHistory parameters, return type and example
|
description: Mark messages as read
|
||||||
---
|
---
|
||||||
## Method: messages.readHistory
|
## Method: messages.readHistory
|
||||||
[Back to methods index](index.md)
|
[Back to methods index](index.md)
|
||||||
|
|
||||||
|
|
||||||
|
Mark messages as read
|
||||||
|
|
||||||
### Parameters:
|
### Parameters:
|
||||||
|
|
||||||
| Name | Type | Required |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to mark messages as read|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|
|
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to mark as read|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|
|
|offset|[CLICK ME int](../types/int.md) | Yes||
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user