diff --git a/docs/API_docs/methods/contacts_getTopPeers.md b/docs/API_docs/methods/contacts_getTopPeers.md index 7fa3e931..226d3aa0 100644 --- a/docs/API_docs/methods/contacts_getTopPeers.md +++ b/docs/API_docs/methods/contacts_getTopPeers.md @@ -20,7 +20,7 @@ Get most used chats |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'];`| |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) diff --git a/docs/API_docs/methods/contacts_resetSaved.md b/docs/API_docs/methods/contacts_resetSaved.md index eb07f34c..50034ace 100644 --- a/docs/API_docs/methods/contacts_resetSaved.md +++ b/docs/API_docs/methods/contacts_resetSaved.md @@ -1,11 +1,13 @@ --- title: contacts.resetSaved -description: contacts.resetSaved parameters, return type and example +description: Reset saved contacts --- ## Method: contacts.resetSaved [Back to methods index](index.md) +Reset saved contacts + ### Return type: [Bool](../types/Bool.md) diff --git a/docs/API_docs/methods/messages_addChatUser.md b/docs/API_docs/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/docs/API_docs/methods/messages_addChatUser.md +++ b/docs/API_docs/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/docs/API_docs/methods/messages_createChat.md b/docs/API_docs/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/docs/API_docs/methods/messages_createChat.md +++ b/docs/API_docs/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/docs/API_docs/methods/messages_deleteChatUser.md b/docs/API_docs/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/docs/API_docs/methods/messages_deleteChatUser.md +++ b/docs/API_docs/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/docs/API_docs/methods/messages_deleteHistory.md b/docs/API_docs/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/docs/API_docs/methods/messages_deleteHistory.md +++ b/docs/API_docs/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/docs/API_docs/methods/messages_deleteMessages.md b/docs/API_docs/methods/messages_deleteMessages.md index f2926938..0da41180 100644 --- a/docs/API_docs/methods/messages_deleteMessages.md +++ b/docs/API_docs/methods/messages_deleteMessages.md @@ -1,17 +1,19 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|revoke|[CLICK ME Bool](../types/Bool.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?| +|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) diff --git a/docs/API_docs/methods/messages_editChatPhoto.md b/docs/API_docs/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/docs/API_docs/methods/messages_editChatPhoto.md +++ b/docs/API_docs/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/docs/API_docs/methods/messages_editChatTitle.md b/docs/API_docs/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/docs/API_docs/methods/messages_editChatTitle.md +++ b/docs/API_docs/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/docs/API_docs/methods/messages_editInlineBotMessage.md b/docs/API_docs/methods/messages_editInlineBotMessage.md index 46ff9536..9c4ef8d8 100644 --- a/docs/API_docs/methods/messages_editInlineBotMessage.md +++ b/docs/API_docs/methods/messages_editInlineBotMessage.md @@ -16,7 +16,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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| diff --git a/docs/API_docs/methods/messages_editMessage.md b/docs/API_docs/methods/messages_editMessage.md index b97fe1c6..6953a15f 100644 --- a/docs/API_docs/methods/messages_editMessage.md +++ b/docs/API_docs/methods/messages_editMessage.md @@ -17,7 +17,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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| diff --git a/docs/API_docs/methods/messages_forwardMessages.md b/docs/API_docs/methods/messages_forwardMessages.md index 9f67e471..11dfd921 100644 --- a/docs/API_docs/methods/messages_forwardMessages.md +++ b/docs/API_docs/methods/messages_forwardMessages.md @@ -1,22 +1,24 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional| -|grouped|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|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|Set to true if forwarding albums| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/docs/API_docs/methods/messages_getChats.md b/docs/API_docs/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/docs/API_docs/methods/messages_getChats.md +++ b/docs/API_docs/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/docs/API_docs/methods/messages_getDhConfig.md b/docs/API_docs/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/docs/API_docs/methods/messages_getDhConfig.md +++ b/docs/API_docs/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/docs/API_docs/methods/messages_getDialogs.md b/docs/API_docs/methods/messages_getDialogs.md index 34bc4c30..e100228b 100644 --- a/docs/API_docs/methods/messages_getDialogs.md +++ b/docs/API_docs/methods/messages_getDialogs.md @@ -1,20 +1,22 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|Do not fetch pinned chats| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/docs/API_docs/methods/messages_getHistory.md b/docs/API_docs/methods/messages_getHistory.md index b145426a..687ab6a8 100644 --- a/docs/API_docs/methods/messages_getHistory.md +++ b/docs/API_docs/methods/messages_getHistory.md @@ -1,23 +1,25 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| -|hash|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| +|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) diff --git a/docs/API_docs/methods/messages_getPeerSettings.md b/docs/API_docs/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/docs/API_docs/methods/messages_getPeerSettings.md +++ b/docs/API_docs/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/docs/API_docs/methods/messages_getWebPagePreview.md b/docs/API_docs/methods/messages_getWebPagePreview.md index 11764118..e7221d0f 100644 --- a/docs/API_docs/methods/messages_getWebPagePreview.md +++ b/docs/API_docs/methods/messages_getWebPagePreview.md @@ -12,7 +12,7 @@ description: messages.getWebPagePreview parameters, return type and example |----------|---------------|----------| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/docs/API_docs/methods/messages_hideReportSpam.md b/docs/API_docs/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/docs/API_docs/methods/messages_hideReportSpam.md +++ b/docs/API_docs/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/docs/API_docs/methods/messages_readHistory.md b/docs/API_docs/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/docs/API_docs/methods/messages_readHistory.md +++ b/docs/API_docs/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/docs/API_docs/methods/messages_receivedMessages.md b/docs/API_docs/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/docs/API_docs/methods/messages_receivedMessages.md +++ b/docs/API_docs/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/docs/API_docs/methods/messages_reportSpam.md b/docs/API_docs/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/docs/API_docs/methods/messages_reportSpam.md +++ b/docs/API_docs/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/docs/API_docs/methods/messages_saveDraft.md b/docs/API_docs/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/docs/API_docs/methods/messages_saveDraft.md +++ b/docs/API_docs/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/docs/API_docs/methods/messages_search.md b/docs/API_docs/methods/messages_search.md index 67178dac..9cab5783 100644 --- a/docs/API_docs/methods/messages_search.md +++ b/docs/API_docs/methods/messages_search.md @@ -1,26 +1,28 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|from\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|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|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|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 | +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of results to return| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id to return| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message id to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/docs/API_docs/methods/messages_sendMedia.md b/docs/API_docs/methods/messages_sendMedia.md index 389b3444..4c67daf0 100644 --- a/docs/API_docs/methods/messages_sendMedia.md +++ b/docs/API_docs/methods/messages_sendMedia.md @@ -1,25 +1,27 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|message|[CLICK ME string](../types/string.md) | Yes|The caption| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities for styled text| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/docs/API_docs/methods/messages_sendMessage.md b/docs/API_docs/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/docs/API_docs/methods/messages_sendMessage.md +++ b/docs/API_docs/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/docs/API_docs/methods/messages_setEncryptedTyping.md b/docs/API_docs/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/docs/API_docs/methods/messages_setEncryptedTyping.md +++ b/docs/API_docs/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/docs/API_docs/methods/messages_setTyping.md b/docs/API_docs/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/docs/API_docs/methods/messages_setTyping.md +++ b/docs/API_docs/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v18/methods/messages_addChatUser.md b/old_docs/API_docs_v18/methods/messages_addChatUser.md index 2332446d..29a87261 100644 --- a/old_docs/API_docs_v18/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v18/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|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) diff --git a/old_docs/API_docs_v18/methods/messages_createChat.md b/old_docs/API_docs_v18/methods/messages_createChat.md index b5f0a4fc..d37a9768 100644 --- a/old_docs/API_docs_v18/methods/messages_createChat.md +++ b/old_docs/API_docs_v18/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v18/methods/messages_deleteChatUser.md b/old_docs/API_docs_v18/methods/messages_deleteChatUser.md index e610ac80..d5f7f835 100644 --- a/old_docs/API_docs_v18/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v18/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v18/methods/messages_deleteHistory.md b/old_docs/API_docs_v18/methods/messages_deleteHistory.md index 96263ff6..036bd178 100644 --- a/old_docs/API_docs_v18/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v18/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v18/methods/messages_deleteMessages.md b/old_docs/API_docs_v18/methods/messages_deleteMessages.md index 0df7903b..94614f99 100644 --- a/old_docs/API_docs_v18/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v18/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v18/methods/messages_editChatPhoto.md b/old_docs/API_docs_v18/methods/messages_editChatPhoto.md index 275109c9..4e5907aa 100644 --- a/old_docs/API_docs_v18/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v18/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v18/methods/messages_editChatTitle.md b/old_docs/API_docs_v18/methods/messages_editChatTitle.md index d39de10e..5cfbea8b 100644 --- a/old_docs/API_docs_v18/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v18/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v18/methods/messages_forwardMessages.md b/old_docs/API_docs_v18/methods/messages_forwardMessages.md index 3c908222..80db3fc0 100644 --- a/old_docs/API_docs_v18/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v18/methods/messages_forwardMessages.md @@ -1,17 +1,19 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|| +|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs| ### Return type: [messages\_StatedMessages](../types/messages_StatedMessages.md) diff --git a/old_docs/API_docs_v18/methods/messages_getChats.md b/old_docs/API_docs_v18/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v18/methods/messages_getChats.md +++ b/old_docs/API_docs_v18/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v18/methods/messages_getDhConfig.md b/old_docs/API_docs_v18/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v18/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v18/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v18/methods/messages_getDialogs.md b/old_docs/API_docs_v18/methods/messages_getDialogs.md index db7a5932..7acf3d6c 100644 --- a/old_docs/API_docs_v18/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v18/methods/messages_getDialogs.md @@ -1,18 +1,20 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset|[CLICK ME int](../types/int.md) | Yes|| +|max\_id|[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) diff --git a/old_docs/API_docs_v18/methods/messages_getHistory.md b/old_docs/API_docs_v18/methods/messages_getHistory.md index d3684cd1..d83079c9 100644 --- a/old_docs/API_docs_v18/methods/messages_getHistory.md +++ b/old_docs/API_docs_v18/methods/messages_getHistory.md @@ -1,19 +1,21 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset|[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|Number of messages to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v18/methods/messages_readHistory.md b/old_docs/API_docs_v18/methods/messages_readHistory.md index cbd911d3..eeff9faa 100644 --- a/old_docs/API_docs_v18/methods/messages_readHistory.md +++ b/old_docs/API_docs_v18/methods/messages_readHistory.md @@ -1,19 +1,21 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|read\_contents|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| +|offset|[CLICK ME int](../types/int.md) | Yes|| +|read\_contents|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v18/methods/messages_receivedMessages.md b/old_docs/API_docs_v18/methods/messages_receivedMessages.md index 74c522cd..47bbb78e 100644 --- a/old_docs/API_docs_v18/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v18/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v18/methods/messages_reportSpam.md b/old_docs/API_docs_v18/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v18/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v18/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v18/methods/messages_search.md b/old_docs/API_docs_v18/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v18/methods/messages_search.md +++ b/old_docs/API_docs_v18/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v18/methods/messages_sendMedia.md b/old_docs/API_docs_v18/methods/messages_sendMedia.md index e029e707..dfa58f63 100644 --- a/old_docs/API_docs_v18/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v18/methods/messages_sendMedia.md @@ -1,17 +1,19 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The media to send| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v18/methods/messages_sendMessage.md b/old_docs/API_docs_v18/methods/messages_sendMessage.md index 8837ddda..0d915ae3 100644 --- a/old_docs/API_docs_v18/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v18/methods/messages_sendMessage.md @@ -1,17 +1,19 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The message to send| ### Return type: [messages\_SentMessage](../types/messages_SentMessage.md) diff --git a/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v18/methods/messages_setTyping.md b/old_docs/API_docs_v18/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v18/methods/messages_setTyping.md +++ b/old_docs/API_docs_v18/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v23/methods/messages_addChatUser.md b/old_docs/API_docs_v23/methods/messages_addChatUser.md index 2332446d..29a87261 100644 --- a/old_docs/API_docs_v23/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v23/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|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) diff --git a/old_docs/API_docs_v23/methods/messages_createChat.md b/old_docs/API_docs_v23/methods/messages_createChat.md index b5f0a4fc..d37a9768 100644 --- a/old_docs/API_docs_v23/methods/messages_createChat.md +++ b/old_docs/API_docs_v23/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v23/methods/messages_deleteChatUser.md b/old_docs/API_docs_v23/methods/messages_deleteChatUser.md index e610ac80..d5f7f835 100644 --- a/old_docs/API_docs_v23/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v23/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v23/methods/messages_deleteHistory.md b/old_docs/API_docs_v23/methods/messages_deleteHistory.md index 96263ff6..036bd178 100644 --- a/old_docs/API_docs_v23/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v23/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v23/methods/messages_deleteMessages.md b/old_docs/API_docs_v23/methods/messages_deleteMessages.md index 0df7903b..94614f99 100644 --- a/old_docs/API_docs_v23/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v23/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v23/methods/messages_editChatPhoto.md b/old_docs/API_docs_v23/methods/messages_editChatPhoto.md index 275109c9..4e5907aa 100644 --- a/old_docs/API_docs_v23/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v23/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v23/methods/messages_editChatTitle.md b/old_docs/API_docs_v23/methods/messages_editChatTitle.md index d39de10e..5cfbea8b 100644 --- a/old_docs/API_docs_v23/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v23/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v23/methods/messages_forwardMessages.md b/old_docs/API_docs_v23/methods/messages_forwardMessages.md index 3c908222..80db3fc0 100644 --- a/old_docs/API_docs_v23/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v23/methods/messages_forwardMessages.md @@ -1,17 +1,19 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|| +|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs| ### Return type: [messages\_StatedMessages](../types/messages_StatedMessages.md) diff --git a/old_docs/API_docs_v23/methods/messages_getChats.md b/old_docs/API_docs_v23/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v23/methods/messages_getChats.md +++ b/old_docs/API_docs_v23/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v23/methods/messages_getDhConfig.md b/old_docs/API_docs_v23/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v23/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v23/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v23/methods/messages_getDialogs.md b/old_docs/API_docs_v23/methods/messages_getDialogs.md index db7a5932..7acf3d6c 100644 --- a/old_docs/API_docs_v23/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v23/methods/messages_getDialogs.md @@ -1,18 +1,20 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset|[CLICK ME int](../types/int.md) | Yes|| +|max\_id|[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) diff --git a/old_docs/API_docs_v23/methods/messages_getHistory.md b/old_docs/API_docs_v23/methods/messages_getHistory.md index d3684cd1..d83079c9 100644 --- a/old_docs/API_docs_v23/methods/messages_getHistory.md +++ b/old_docs/API_docs_v23/methods/messages_getHistory.md @@ -1,19 +1,21 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset|[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|Number of messages to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v23/methods/messages_readHistory.md b/old_docs/API_docs_v23/methods/messages_readHistory.md index cbd911d3..eeff9faa 100644 --- a/old_docs/API_docs_v23/methods/messages_readHistory.md +++ b/old_docs/API_docs_v23/methods/messages_readHistory.md @@ -1,19 +1,21 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|read\_contents|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| +|offset|[CLICK ME int](../types/int.md) | Yes|| +|read\_contents|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v23/methods/messages_receivedMessages.md b/old_docs/API_docs_v23/methods/messages_receivedMessages.md index 74c522cd..47bbb78e 100644 --- a/old_docs/API_docs_v23/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v23/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v23/methods/messages_reportSpam.md b/old_docs/API_docs_v23/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v23/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v23/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v23/methods/messages_search.md b/old_docs/API_docs_v23/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v23/methods/messages_search.md +++ b/old_docs/API_docs_v23/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v23/methods/messages_sendMedia.md b/old_docs/API_docs_v23/methods/messages_sendMedia.md index e029e707..dfa58f63 100644 --- a/old_docs/API_docs_v23/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v23/methods/messages_sendMedia.md @@ -1,17 +1,19 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The media to send| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v23/methods/messages_sendMessage.md b/old_docs/API_docs_v23/methods/messages_sendMessage.md index 8837ddda..0d915ae3 100644 --- a/old_docs/API_docs_v23/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v23/methods/messages_sendMessage.md @@ -1,17 +1,19 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The message to send| ### Return type: [messages\_SentMessage](../types/messages_SentMessage.md) diff --git a/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v23/methods/messages_setTyping.md b/old_docs/API_docs_v23/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v23/methods/messages_setTyping.md +++ b/old_docs/API_docs_v23/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v25/methods/messages_addChatUser.md b/old_docs/API_docs_v25/methods/messages_addChatUser.md index 2332446d..29a87261 100644 --- a/old_docs/API_docs_v25/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v25/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|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) diff --git a/old_docs/API_docs_v25/methods/messages_createChat.md b/old_docs/API_docs_v25/methods/messages_createChat.md index b5f0a4fc..d37a9768 100644 --- a/old_docs/API_docs_v25/methods/messages_createChat.md +++ b/old_docs/API_docs_v25/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v25/methods/messages_deleteChatUser.md b/old_docs/API_docs_v25/methods/messages_deleteChatUser.md index e610ac80..d5f7f835 100644 --- a/old_docs/API_docs_v25/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v25/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v25/methods/messages_deleteHistory.md b/old_docs/API_docs_v25/methods/messages_deleteHistory.md index 96263ff6..036bd178 100644 --- a/old_docs/API_docs_v25/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v25/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v25/methods/messages_deleteMessages.md b/old_docs/API_docs_v25/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v25/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v25/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v25/methods/messages_editChatPhoto.md b/old_docs/API_docs_v25/methods/messages_editChatPhoto.md index 275109c9..4e5907aa 100644 --- a/old_docs/API_docs_v25/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v25/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v25/methods/messages_editChatTitle.md b/old_docs/API_docs_v25/methods/messages_editChatTitle.md index d39de10e..5cfbea8b 100644 --- a/old_docs/API_docs_v25/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v25/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v25/methods/messages_forwardMessages.md b/old_docs/API_docs_v25/methods/messages_forwardMessages.md index 3c908222..80db3fc0 100644 --- a/old_docs/API_docs_v25/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v25/methods/messages_forwardMessages.md @@ -1,17 +1,19 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|| +|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs| ### Return type: [messages\_StatedMessages](../types/messages_StatedMessages.md) diff --git a/old_docs/API_docs_v25/methods/messages_getChats.md b/old_docs/API_docs_v25/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v25/methods/messages_getChats.md +++ b/old_docs/API_docs_v25/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v25/methods/messages_getDhConfig.md b/old_docs/API_docs_v25/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v25/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v25/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v25/methods/messages_getDialogs.md b/old_docs/API_docs_v25/methods/messages_getDialogs.md index db7a5932..7acf3d6c 100644 --- a/old_docs/API_docs_v25/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v25/methods/messages_getDialogs.md @@ -1,18 +1,20 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset|[CLICK ME int](../types/int.md) | Yes|| +|max\_id|[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) diff --git a/old_docs/API_docs_v25/methods/messages_getHistory.md b/old_docs/API_docs_v25/methods/messages_getHistory.md index d3684cd1..d83079c9 100644 --- a/old_docs/API_docs_v25/methods/messages_getHistory.md +++ b/old_docs/API_docs_v25/methods/messages_getHistory.md @@ -1,19 +1,21 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset|[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|Number of messages to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v25/methods/messages_readHistory.md b/old_docs/API_docs_v25/methods/messages_readHistory.md index 9c49aa22..099c4c24 100644 --- a/old_docs/API_docs_v25/methods/messages_readHistory.md +++ b/old_docs/API_docs_v25/methods/messages_readHistory.md @@ -1,18 +1,20 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v25/methods/messages_receivedMessages.md b/old_docs/API_docs_v25/methods/messages_receivedMessages.md index 74c522cd..47bbb78e 100644 --- a/old_docs/API_docs_v25/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v25/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v25/methods/messages_search.md b/old_docs/API_docs_v25/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v25/methods/messages_search.md +++ b/old_docs/API_docs_v25/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v25/methods/messages_sendMedia.md b/old_docs/API_docs_v25/methods/messages_sendMedia.md index 0bab592d..3048d3c9 100644 --- a/old_docs/API_docs_v25/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v25/methods/messages_sendMedia.md @@ -1,18 +1,20 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Yes| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| ### Return type: [messages\_StatedMessage](../types/messages_StatedMessage.md) diff --git a/old_docs/API_docs_v25/methods/messages_sendMessage.md b/old_docs/API_docs_v25/methods/messages_sendMessage.md index 0a2e5f1c..0c13703b 100644 --- a/old_docs/API_docs_v25/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v25/methods/messages_sendMessage.md @@ -1,18 +1,20 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Yes| -|message|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| ### Return type: [messages\_SentMessage](../types/messages_SentMessage.md) diff --git a/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v25/methods/messages_setTyping.md b/old_docs/API_docs_v25/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v25/methods/messages_setTyping.md +++ b/old_docs/API_docs_v25/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v27/methods/messages_addChatUser.md b/old_docs/API_docs_v27/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v27/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v27/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v27/methods/messages_createChat.md b/old_docs/API_docs_v27/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v27/methods/messages_createChat.md +++ b/old_docs/API_docs_v27/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v27/methods/messages_deleteChatUser.md b/old_docs/API_docs_v27/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v27/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v27/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v27/methods/messages_deleteHistory.md b/old_docs/API_docs_v27/methods/messages_deleteHistory.md index 96263ff6..036bd178 100644 --- a/old_docs/API_docs_v27/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v27/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v27/methods/messages_deleteMessages.md b/old_docs/API_docs_v27/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v27/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v27/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v27/methods/messages_editChatPhoto.md b/old_docs/API_docs_v27/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v27/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v27/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v27/methods/messages_editChatTitle.md b/old_docs/API_docs_v27/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v27/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v27/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v27/methods/messages_forwardMessages.md b/old_docs/API_docs_v27/methods/messages_forwardMessages.md index 5d9c6a90..9f37e5dd 100644 --- a/old_docs/API_docs_v27/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v27/methods/messages_forwardMessages.md @@ -1,17 +1,19 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|| +|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v27/methods/messages_getChats.md b/old_docs/API_docs_v27/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v27/methods/messages_getChats.md +++ b/old_docs/API_docs_v27/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v27/methods/messages_getDhConfig.md b/old_docs/API_docs_v27/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v27/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v27/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v27/methods/messages_getDialogs.md b/old_docs/API_docs_v27/methods/messages_getDialogs.md index db7a5932..7acf3d6c 100644 --- a/old_docs/API_docs_v27/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v27/methods/messages_getDialogs.md @@ -1,18 +1,20 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset|[CLICK ME int](../types/int.md) | Yes|| +|max\_id|[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) diff --git a/old_docs/API_docs_v27/methods/messages_getHistory.md b/old_docs/API_docs_v27/methods/messages_getHistory.md index d3684cd1..d83079c9 100644 --- a/old_docs/API_docs_v27/methods/messages_getHistory.md +++ b/old_docs/API_docs_v27/methods/messages_getHistory.md @@ -1,19 +1,21 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset|[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|Number of messages to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v27/methods/messages_readHistory.md b/old_docs/API_docs_v27/methods/messages_readHistory.md index 9c49aa22..099c4c24 100644 --- a/old_docs/API_docs_v27/methods/messages_readHistory.md +++ b/old_docs/API_docs_v27/methods/messages_readHistory.md @@ -1,18 +1,20 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v27/methods/messages_receivedMessages.md b/old_docs/API_docs_v27/methods/messages_receivedMessages.md index 74c522cd..47bbb78e 100644 --- a/old_docs/API_docs_v27/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v27/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v27/methods/messages_search.md b/old_docs/API_docs_v27/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v27/methods/messages_search.md +++ b/old_docs/API_docs_v27/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v27/methods/messages_sendMedia.md b/old_docs/API_docs_v27/methods/messages_sendMedia.md index 3e20cc23..30b6b621 100644 --- a/old_docs/API_docs_v27/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v27/methods/messages_sendMedia.md @@ -1,18 +1,20 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v27/methods/messages_sendMessage.md b/old_docs/API_docs_v27/methods/messages_sendMessage.md index 7bed9305..7e4afc53 100644 --- a/old_docs/API_docs_v27/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v27/methods/messages_sendMessage.md @@ -1,18 +1,20 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| ### Return type: [messages\_SentMessage](../types/messages_SentMessage.md) diff --git a/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v27/methods/messages_setTyping.md b/old_docs/API_docs_v27/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v27/methods/messages_setTyping.md +++ b/old_docs/API_docs_v27/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v33/methods/messages_addChatUser.md b/old_docs/API_docs_v33/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v33/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v33/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v33/methods/messages_createChat.md b/old_docs/API_docs_v33/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v33/methods/messages_createChat.md +++ b/old_docs/API_docs_v33/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v33/methods/messages_deleteChatUser.md b/old_docs/API_docs_v33/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v33/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v33/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v33/methods/messages_deleteHistory.md b/old_docs/API_docs_v33/methods/messages_deleteHistory.md index 96263ff6..036bd178 100644 --- a/old_docs/API_docs_v33/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v33/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v33/methods/messages_deleteMessages.md b/old_docs/API_docs_v33/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v33/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v33/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v33/methods/messages_editChatPhoto.md b/old_docs/API_docs_v33/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v33/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v33/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v33/methods/messages_editChatTitle.md b/old_docs/API_docs_v33/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v33/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v33/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v33/methods/messages_forwardMessages.md b/old_docs/API_docs_v33/methods/messages_forwardMessages.md index 5d9c6a90..9f37e5dd 100644 --- a/old_docs/API_docs_v33/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v33/methods/messages_forwardMessages.md @@ -1,17 +1,19 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|| +|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v33/methods/messages_getChats.md b/old_docs/API_docs_v33/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v33/methods/messages_getChats.md +++ b/old_docs/API_docs_v33/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v33/methods/messages_getDhConfig.md b/old_docs/API_docs_v33/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v33/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v33/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v33/methods/messages_getDialogs.md b/old_docs/API_docs_v33/methods/messages_getDialogs.md index db7a5932..7acf3d6c 100644 --- a/old_docs/API_docs_v33/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v33/methods/messages_getDialogs.md @@ -1,18 +1,20 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset|[CLICK ME int](../types/int.md) | Yes|| +|max\_id|[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) diff --git a/old_docs/API_docs_v33/methods/messages_getHistory.md b/old_docs/API_docs_v33/methods/messages_getHistory.md index d3684cd1..d83079c9 100644 --- a/old_docs/API_docs_v33/methods/messages_getHistory.md +++ b/old_docs/API_docs_v33/methods/messages_getHistory.md @@ -1,19 +1,21 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset|[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|Number of messages to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v33/methods/messages_readHistory.md b/old_docs/API_docs_v33/methods/messages_readHistory.md index 9c49aa22..099c4c24 100644 --- a/old_docs/API_docs_v33/methods/messages_readHistory.md +++ b/old_docs/API_docs_v33/methods/messages_readHistory.md @@ -1,18 +1,20 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v33/methods/messages_receivedMessages.md b/old_docs/API_docs_v33/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v33/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v33/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v33/methods/messages_search.md b/old_docs/API_docs_v33/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v33/methods/messages_search.md +++ b/old_docs/API_docs_v33/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v33/methods/messages_sendMedia.md b/old_docs/API_docs_v33/methods/messages_sendMedia.md index 23ae6a9b..1319a408 100644 --- a/old_docs/API_docs_v33/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v33/methods/messages_sendMedia.md @@ -1,19 +1,21 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v33/methods/messages_sendMessage.md b/old_docs/API_docs_v33/methods/messages_sendMessage.md index de851a3d..1ed5ee98 100644 --- a/old_docs/API_docs_v33/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v33/methods/messages_sendMessage.md @@ -1,19 +1,21 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [messages\_SentMessage](../types/messages_SentMessage.md) diff --git a/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v33/methods/messages_setTyping.md b/old_docs/API_docs_v33/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v33/methods/messages_setTyping.md +++ b/old_docs/API_docs_v33/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v38/methods/messages_addChatUser.md b/old_docs/API_docs_v38/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v38/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v38/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v38/methods/messages_createChat.md b/old_docs/API_docs_v38/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v38/methods/messages_createChat.md +++ b/old_docs/API_docs_v38/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v38/methods/messages_deleteChatUser.md b/old_docs/API_docs_v38/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v38/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v38/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v38/methods/messages_deleteHistory.md b/old_docs/API_docs_v38/methods/messages_deleteHistory.md index 96263ff6..036bd178 100644 --- a/old_docs/API_docs_v38/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v38/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v38/methods/messages_deleteMessages.md b/old_docs/API_docs_v38/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v38/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v38/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v38/methods/messages_editChatPhoto.md b/old_docs/API_docs_v38/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v38/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v38/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v38/methods/messages_editChatTitle.md b/old_docs/API_docs_v38/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v38/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v38/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v38/methods/messages_forwardMessages.md b/old_docs/API_docs_v38/methods/messages_forwardMessages.md index 186f7bb0..cea56141 100644 --- a/old_docs/API_docs_v38/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v38/methods/messages_forwardMessages.md @@ -1,18 +1,20 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v38/methods/messages_getChats.md b/old_docs/API_docs_v38/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v38/methods/messages_getChats.md +++ b/old_docs/API_docs_v38/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v38/methods/messages_getDhConfig.md b/old_docs/API_docs_v38/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v38/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v38/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v38/methods/messages_getDialogs.md b/old_docs/API_docs_v38/methods/messages_getDialogs.md index 70d285ff..af9f6922 100644 --- a/old_docs/API_docs_v38/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v38/methods/messages_getDialogs.md @@ -1,17 +1,19 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset|[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) diff --git a/old_docs/API_docs_v38/methods/messages_getHistory.md b/old_docs/API_docs_v38/methods/messages_getHistory.md index 37093c17..dd61853d 100644 --- a/old_docs/API_docs_v38/methods/messages_getHistory.md +++ b/old_docs/API_docs_v38/methods/messages_getHistory.md @@ -1,21 +1,23 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset\_id|[CLICK ME int](../types/int.md) | Yes|The last fetched message ID, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v38/methods/messages_readHistory.md b/old_docs/API_docs_v38/methods/messages_readHistory.md index 9c49aa22..099c4c24 100644 --- a/old_docs/API_docs_v38/methods/messages_readHistory.md +++ b/old_docs/API_docs_v38/methods/messages_readHistory.md @@ -1,18 +1,20 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v38/methods/messages_receivedMessages.md b/old_docs/API_docs_v38/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v38/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v38/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v38/methods/messages_reportSpam.md b/old_docs/API_docs_v38/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v38/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v38/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v38/methods/messages_search.md b/old_docs/API_docs_v38/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v38/methods/messages_search.md +++ b/old_docs/API_docs_v38/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v38/methods/messages_sendMedia.md b/old_docs/API_docs_v38/methods/messages_sendMedia.md index 23ae6a9b..1319a408 100644 --- a/old_docs/API_docs_v38/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v38/methods/messages_sendMedia.md @@ -1,19 +1,21 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v38/methods/messages_sendMessage.md b/old_docs/API_docs_v38/methods/messages_sendMessage.md index 4ded7f6b..d654647d 100644 --- a/old_docs/API_docs_v38/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v38/methods/messages_sendMessage.md @@ -1,21 +1,23 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v38/methods/messages_setTyping.md b/old_docs/API_docs_v38/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v38/methods/messages_setTyping.md +++ b/old_docs/API_docs_v38/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v40/methods/messages_addChatUser.md b/old_docs/API_docs_v40/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v40/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v40/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v40/methods/messages_createChat.md b/old_docs/API_docs_v40/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v40/methods/messages_createChat.md +++ b/old_docs/API_docs_v40/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v40/methods/messages_deleteChatUser.md b/old_docs/API_docs_v40/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v40/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v40/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v40/methods/messages_deleteHistory.md b/old_docs/API_docs_v40/methods/messages_deleteHistory.md index 96263ff6..036bd178 100644 --- a/old_docs/API_docs_v40/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v40/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v40/methods/messages_deleteMessages.md b/old_docs/API_docs_v40/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v40/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v40/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v40/methods/messages_editChatPhoto.md b/old_docs/API_docs_v40/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v40/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v40/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v40/methods/messages_editChatTitle.md b/old_docs/API_docs_v40/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v40/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v40/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v40/methods/messages_forwardMessages.md b/old_docs/API_docs_v40/methods/messages_forwardMessages.md index 5d9c6a90..9f37e5dd 100644 --- a/old_docs/API_docs_v40/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v40/methods/messages_forwardMessages.md @@ -1,17 +1,19 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|| +|id|Array of [CLICK ME int](../types/int.md) | Yes|The message IDs| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v40/methods/messages_getChats.md b/old_docs/API_docs_v40/methods/messages_getChats.md index 4baf4978..68132894 100644 --- a/old_docs/API_docs_v40/methods/messages_getChats.md +++ b/old_docs/API_docs_v40/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME InputChat](../types/InputChat.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|id|Array of [CLICK ME InputChat](../types/InputChat.md) | Yes|The MTProto IDs of chats to fetch info about| ### Return type: [messages\_Chats](../types/messages_Chats.md) diff --git a/old_docs/API_docs_v40/methods/messages_getDhConfig.md b/old_docs/API_docs_v40/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v40/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v40/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v40/methods/messages_getDialogs.md b/old_docs/API_docs_v40/methods/messages_getDialogs.md index 70d285ff..af9f6922 100644 --- a/old_docs/API_docs_v40/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v40/methods/messages_getDialogs.md @@ -1,17 +1,19 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset|[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) diff --git a/old_docs/API_docs_v40/methods/messages_getHistory.md b/old_docs/API_docs_v40/methods/messages_getHistory.md index f01ad90a..a0014b81 100644 --- a/old_docs/API_docs_v40/methods/messages_getHistory.md +++ b/old_docs/API_docs_v40/methods/messages_getHistory.md @@ -1,20 +1,22 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset|[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|Minumum message ID to fetch| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v40/methods/messages_readHistory.md b/old_docs/API_docs_v40/methods/messages_readHistory.md index 9c49aa22..099c4c24 100644 --- a/old_docs/API_docs_v40/methods/messages_readHistory.md +++ b/old_docs/API_docs_v40/methods/messages_readHistory.md @@ -1,18 +1,20 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| +|offset|[CLICK ME int](../types/int.md) | Yes|| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v40/methods/messages_receivedMessages.md b/old_docs/API_docs_v40/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v40/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v40/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v40/methods/messages_search.md b/old_docs/API_docs_v40/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v40/methods/messages_search.md +++ b/old_docs/API_docs_v40/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v40/methods/messages_sendMedia.md b/old_docs/API_docs_v40/methods/messages_sendMedia.md index 23ae6a9b..1319a408 100644 --- a/old_docs/API_docs_v40/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v40/methods/messages_sendMedia.md @@ -1,19 +1,21 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v40/methods/messages_sendMessage.md b/old_docs/API_docs_v40/methods/messages_sendMessage.md index 4ded7f6b..d654647d 100644 --- a/old_docs/API_docs_v40/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v40/methods/messages_sendMessage.md @@ -1,21 +1,23 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v40/methods/messages_setTyping.md b/old_docs/API_docs_v40/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v40/methods/messages_setTyping.md +++ b/old_docs/API_docs_v40/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v41/methods/messages_addChatUser.md b/old_docs/API_docs_v41/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v41/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v41/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v41/methods/messages_createChat.md b/old_docs/API_docs_v41/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v41/methods/messages_createChat.md +++ b/old_docs/API_docs_v41/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v41/methods/messages_deleteChatUser.md b/old_docs/API_docs_v41/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v41/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v41/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v41/methods/messages_deleteHistory.md b/old_docs/API_docs_v41/methods/messages_deleteHistory.md index b7f374f5..d883a9ad 100644 --- a/old_docs/API_docs_v41/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v41/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v41/methods/messages_deleteMessages.md b/old_docs/API_docs_v41/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v41/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v41/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v41/methods/messages_editChatPhoto.md b/old_docs/API_docs_v41/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v41/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v41/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v41/methods/messages_editChatTitle.md b/old_docs/API_docs_v41/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v41/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v41/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v41/methods/messages_forwardMessages.md b/old_docs/API_docs_v41/methods/messages_forwardMessages.md index c3f27aa7..225edb42 100644 --- a/old_docs/API_docs_v41/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v41/methods/messages_forwardMessages.md @@ -1,19 +1,21 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[CLICK ME Bool](../types/Bool.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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v41/methods/messages_getChats.md b/old_docs/API_docs_v41/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v41/methods/messages_getChats.md +++ b/old_docs/API_docs_v41/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v41/methods/messages_getDhConfig.md b/old_docs/API_docs_v41/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v41/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v41/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v41/methods/messages_getDialogs.md b/old_docs/API_docs_v41/methods/messages_getDialogs.md index 70d285ff..af9f6922 100644 --- a/old_docs/API_docs_v41/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v41/methods/messages_getDialogs.md @@ -1,17 +1,19 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset|[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) diff --git a/old_docs/API_docs_v41/methods/messages_getHistory.md b/old_docs/API_docs_v41/methods/messages_getHistory.md index 37093c17..dd61853d 100644 --- a/old_docs/API_docs_v41/methods/messages_getHistory.md +++ b/old_docs/API_docs_v41/methods/messages_getHistory.md @@ -1,21 +1,23 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset\_id|[CLICK ME int](../types/int.md) | Yes|The last fetched message ID, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v41/methods/messages_readHistory.md b/old_docs/API_docs_v41/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v41/methods/messages_readHistory.md +++ b/old_docs/API_docs_v41/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v41/methods/messages_receivedMessages.md b/old_docs/API_docs_v41/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v41/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v41/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v41/methods/messages_reportSpam.md b/old_docs/API_docs_v41/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v41/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v41/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v41/methods/messages_search.md b/old_docs/API_docs_v41/methods/messages_search.md index bed6f4c1..2e62934b 100644 --- a/old_docs/API_docs_v41/methods/messages_search.md +++ b/old_docs/API_docs_v41/methods/messages_search.md @@ -1,24 +1,26 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|important\_only|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|important\_only|[CLICK ME Bool](../types/Bool.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|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v41/methods/messages_sendMedia.md b/old_docs/API_docs_v41/methods/messages_sendMedia.md index aeb09d5e..1aa36649 100644 --- a/old_docs/API_docs_v41/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v41/methods/messages_sendMedia.md @@ -1,20 +1,22 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[CLICK ME Bool](../types/Bool.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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v41/methods/messages_sendMessage.md b/old_docs/API_docs_v41/methods/messages_sendMessage.md index 3c19ccdf..47e8b01e 100644 --- a/old_docs/API_docs_v41/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v41/methods/messages_sendMessage.md @@ -1,23 +1,25 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|broadcast|[CLICK ME Bool](../types/Bool.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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v41/methods/messages_setTyping.md b/old_docs/API_docs_v41/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v41/methods/messages_setTyping.md +++ b/old_docs/API_docs_v41/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v42/methods/messages_addChatUser.md b/old_docs/API_docs_v42/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v42/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v42/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v42/methods/messages_createChat.md b/old_docs/API_docs_v42/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v42/methods/messages_createChat.md +++ b/old_docs/API_docs_v42/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v42/methods/messages_deleteChatUser.md b/old_docs/API_docs_v42/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v42/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v42/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v42/methods/messages_deleteHistory.md b/old_docs/API_docs_v42/methods/messages_deleteHistory.md index b7f374f5..d883a9ad 100644 --- a/old_docs/API_docs_v42/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v42/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v42/methods/messages_deleteMessages.md b/old_docs/API_docs_v42/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v42/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v42/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v42/methods/messages_editChatPhoto.md b/old_docs/API_docs_v42/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v42/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v42/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v42/methods/messages_editChatTitle.md b/old_docs/API_docs_v42/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v42/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v42/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v42/methods/messages_forwardMessages.md b/old_docs/API_docs_v42/methods/messages_forwardMessages.md index c3f27aa7..225edb42 100644 --- a/old_docs/API_docs_v42/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v42/methods/messages_forwardMessages.md @@ -1,19 +1,21 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[CLICK ME Bool](../types/Bool.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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v42/methods/messages_getChats.md b/old_docs/API_docs_v42/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v42/methods/messages_getChats.md +++ b/old_docs/API_docs_v42/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v42/methods/messages_getDhConfig.md b/old_docs/API_docs_v42/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v42/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v42/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v42/methods/messages_getDialogs.md b/old_docs/API_docs_v42/methods/messages_getDialogs.md index b22a7306..7a28bd83 100644 --- a/old_docs/API_docs_v42/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v42/methods/messages_getDialogs.md @@ -1,19 +1,21 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v42/methods/messages_getHistory.md b/old_docs/API_docs_v42/methods/messages_getHistory.md index 37093c17..dd61853d 100644 --- a/old_docs/API_docs_v42/methods/messages_getHistory.md +++ b/old_docs/API_docs_v42/methods/messages_getHistory.md @@ -1,21 +1,23 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset\_id|[CLICK ME int](../types/int.md) | Yes|The last fetched message ID, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v42/methods/messages_readHistory.md b/old_docs/API_docs_v42/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v42/methods/messages_readHistory.md +++ b/old_docs/API_docs_v42/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v42/methods/messages_receivedMessages.md b/old_docs/API_docs_v42/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v42/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v42/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v42/methods/messages_reportSpam.md b/old_docs/API_docs_v42/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v42/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v42/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v42/methods/messages_search.md b/old_docs/API_docs_v42/methods/messages_search.md index bed6f4c1..2e62934b 100644 --- a/old_docs/API_docs_v42/methods/messages_search.md +++ b/old_docs/API_docs_v42/methods/messages_search.md @@ -1,24 +1,26 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|important\_only|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|important\_only|[CLICK ME Bool](../types/Bool.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|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v42/methods/messages_sendMedia.md b/old_docs/API_docs_v42/methods/messages_sendMedia.md index aeb09d5e..1aa36649 100644 --- a/old_docs/API_docs_v42/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v42/methods/messages_sendMedia.md @@ -1,20 +1,22 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[CLICK ME Bool](../types/Bool.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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v42/methods/messages_sendMessage.md b/old_docs/API_docs_v42/methods/messages_sendMessage.md index 3c19ccdf..47e8b01e 100644 --- a/old_docs/API_docs_v42/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v42/methods/messages_sendMessage.md @@ -1,23 +1,25 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|broadcast|[CLICK ME Bool](../types/Bool.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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v42/methods/messages_setTyping.md b/old_docs/API_docs_v42/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v42/methods/messages_setTyping.md +++ b/old_docs/API_docs_v42/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v44/methods/messages_addChatUser.md b/old_docs/API_docs_v44/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v44/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v44/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v44/methods/messages_createChat.md b/old_docs/API_docs_v44/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v44/methods/messages_createChat.md +++ b/old_docs/API_docs_v44/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v44/methods/messages_deleteChatUser.md b/old_docs/API_docs_v44/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v44/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v44/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v44/methods/messages_deleteHistory.md b/old_docs/API_docs_v44/methods/messages_deleteHistory.md index b7f374f5..d883a9ad 100644 --- a/old_docs/API_docs_v44/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v44/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v44/methods/messages_deleteMessages.md b/old_docs/API_docs_v44/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v44/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v44/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v44/methods/messages_editChatPhoto.md b/old_docs/API_docs_v44/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v44/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v44/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v44/methods/messages_editChatTitle.md b/old_docs/API_docs_v44/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v44/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v44/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v44/methods/messages_forwardMessages.md b/old_docs/API_docs_v44/methods/messages_forwardMessages.md index c3f27aa7..225edb42 100644 --- a/old_docs/API_docs_v44/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v44/methods/messages_forwardMessages.md @@ -1,19 +1,21 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[CLICK ME Bool](../types/Bool.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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v44/methods/messages_getChats.md b/old_docs/API_docs_v44/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v44/methods/messages_getChats.md +++ b/old_docs/API_docs_v44/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v44/methods/messages_getDhConfig.md b/old_docs/API_docs_v44/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v44/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v44/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v44/methods/messages_getDialogs.md b/old_docs/API_docs_v44/methods/messages_getDialogs.md index b22a7306..7a28bd83 100644 --- a/old_docs/API_docs_v44/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v44/methods/messages_getDialogs.md @@ -1,19 +1,21 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v44/methods/messages_getHistory.md b/old_docs/API_docs_v44/methods/messages_getHistory.md index 37093c17..dd61853d 100644 --- a/old_docs/API_docs_v44/methods/messages_getHistory.md +++ b/old_docs/API_docs_v44/methods/messages_getHistory.md @@ -1,21 +1,23 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset\_id|[CLICK ME int](../types/int.md) | Yes|The last fetched message ID, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v44/methods/messages_readHistory.md b/old_docs/API_docs_v44/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v44/methods/messages_readHistory.md +++ b/old_docs/API_docs_v44/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v44/methods/messages_receivedMessages.md b/old_docs/API_docs_v44/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v44/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v44/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v44/methods/messages_reportSpam.md b/old_docs/API_docs_v44/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v44/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v44/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v44/methods/messages_search.md b/old_docs/API_docs_v44/methods/messages_search.md index bed6f4c1..2e62934b 100644 --- a/old_docs/API_docs_v44/methods/messages_search.md +++ b/old_docs/API_docs_v44/methods/messages_search.md @@ -1,24 +1,26 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|important\_only|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|important\_only|[CLICK ME Bool](../types/Bool.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|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v44/methods/messages_sendMedia.md b/old_docs/API_docs_v44/methods/messages_sendMedia.md index aeb09d5e..1aa36649 100644 --- a/old_docs/API_docs_v44/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v44/methods/messages_sendMedia.md @@ -1,20 +1,22 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[CLICK ME Bool](../types/Bool.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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v44/methods/messages_sendMessage.md b/old_docs/API_docs_v44/methods/messages_sendMessage.md index 3c19ccdf..47e8b01e 100644 --- a/old_docs/API_docs_v44/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v44/methods/messages_sendMessage.md @@ -1,23 +1,25 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|broadcast|[CLICK ME Bool](../types/Bool.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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v44/methods/messages_setTyping.md b/old_docs/API_docs_v44/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v44/methods/messages_setTyping.md +++ b/old_docs/API_docs_v44/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v45/methods/messages_addChatUser.md b/old_docs/API_docs_v45/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v45/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v45/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v45/methods/messages_createChat.md b/old_docs/API_docs_v45/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v45/methods/messages_createChat.md +++ b/old_docs/API_docs_v45/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v45/methods/messages_deleteChatUser.md b/old_docs/API_docs_v45/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v45/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v45/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v45/methods/messages_deleteHistory.md b/old_docs/API_docs_v45/methods/messages_deleteHistory.md index b7f374f5..d883a9ad 100644 --- a/old_docs/API_docs_v45/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v45/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v45/methods/messages_deleteMessages.md b/old_docs/API_docs_v45/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v45/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v45/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v45/methods/messages_editChatPhoto.md b/old_docs/API_docs_v45/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v45/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v45/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v45/methods/messages_editChatTitle.md b/old_docs/API_docs_v45/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v45/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v45/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v45/methods/messages_forwardMessages.md b/old_docs/API_docs_v45/methods/messages_forwardMessages.md index c3f27aa7..225edb42 100644 --- a/old_docs/API_docs_v45/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v45/methods/messages_forwardMessages.md @@ -1,19 +1,21 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[CLICK ME Bool](../types/Bool.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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v45/methods/messages_getChats.md b/old_docs/API_docs_v45/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v45/methods/messages_getChats.md +++ b/old_docs/API_docs_v45/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v45/methods/messages_getDhConfig.md b/old_docs/API_docs_v45/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v45/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v45/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v45/methods/messages_getDialogs.md b/old_docs/API_docs_v45/methods/messages_getDialogs.md index b22a7306..7a28bd83 100644 --- a/old_docs/API_docs_v45/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v45/methods/messages_getDialogs.md @@ -1,19 +1,21 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v45/methods/messages_getHistory.md b/old_docs/API_docs_v45/methods/messages_getHistory.md index 37093c17..dd61853d 100644 --- a/old_docs/API_docs_v45/methods/messages_getHistory.md +++ b/old_docs/API_docs_v45/methods/messages_getHistory.md @@ -1,21 +1,23 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset\_id|[CLICK ME int](../types/int.md) | Yes|The last fetched message ID, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v45/methods/messages_readHistory.md b/old_docs/API_docs_v45/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v45/methods/messages_readHistory.md +++ b/old_docs/API_docs_v45/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v45/methods/messages_receivedMessages.md b/old_docs/API_docs_v45/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v45/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v45/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v45/methods/messages_reportSpam.md b/old_docs/API_docs_v45/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v45/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v45/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v45/methods/messages_search.md b/old_docs/API_docs_v45/methods/messages_search.md index bed6f4c1..2e62934b 100644 --- a/old_docs/API_docs_v45/methods/messages_search.md +++ b/old_docs/API_docs_v45/methods/messages_search.md @@ -1,24 +1,26 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|important\_only|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|important\_only|[CLICK ME Bool](../types/Bool.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|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v45/methods/messages_sendMedia.md b/old_docs/API_docs_v45/methods/messages_sendMedia.md index aeb09d5e..1aa36649 100644 --- a/old_docs/API_docs_v45/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v45/methods/messages_sendMedia.md @@ -1,20 +1,22 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[CLICK ME Bool](../types/Bool.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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v45/methods/messages_sendMessage.md b/old_docs/API_docs_v45/methods/messages_sendMessage.md index 3c19ccdf..47e8b01e 100644 --- a/old_docs/API_docs_v45/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v45/methods/messages_sendMessage.md @@ -1,23 +1,25 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|broadcast|[CLICK ME Bool](../types/Bool.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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v45/methods/messages_setTyping.md b/old_docs/API_docs_v45/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v45/methods/messages_setTyping.md +++ b/old_docs/API_docs_v45/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v46/methods/messages_addChatUser.md b/old_docs/API_docs_v46/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v46/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v46/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v46/methods/messages_createChat.md b/old_docs/API_docs_v46/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v46/methods/messages_createChat.md +++ b/old_docs/API_docs_v46/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v46/methods/messages_deleteChatUser.md b/old_docs/API_docs_v46/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v46/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v46/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v46/methods/messages_deleteHistory.md b/old_docs/API_docs_v46/methods/messages_deleteHistory.md index b7f374f5..d883a9ad 100644 --- a/old_docs/API_docs_v46/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v46/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v46/methods/messages_deleteMessages.md b/old_docs/API_docs_v46/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v46/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v46/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v46/methods/messages_editChatPhoto.md b/old_docs/API_docs_v46/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v46/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v46/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v46/methods/messages_editChatTitle.md b/old_docs/API_docs_v46/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v46/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v46/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v46/methods/messages_forwardMessages.md b/old_docs/API_docs_v46/methods/messages_forwardMessages.md index c3f27aa7..225edb42 100644 --- a/old_docs/API_docs_v46/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v46/methods/messages_forwardMessages.md @@ -1,19 +1,21 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[CLICK ME Bool](../types/Bool.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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v46/methods/messages_getChats.md b/old_docs/API_docs_v46/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v46/methods/messages_getChats.md +++ b/old_docs/API_docs_v46/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v46/methods/messages_getDhConfig.md b/old_docs/API_docs_v46/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v46/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v46/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v46/methods/messages_getDialogs.md b/old_docs/API_docs_v46/methods/messages_getDialogs.md index b22a7306..7a28bd83 100644 --- a/old_docs/API_docs_v46/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v46/methods/messages_getDialogs.md @@ -1,19 +1,21 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v46/methods/messages_getHistory.md b/old_docs/API_docs_v46/methods/messages_getHistory.md index 37093c17..dd61853d 100644 --- a/old_docs/API_docs_v46/methods/messages_getHistory.md +++ b/old_docs/API_docs_v46/methods/messages_getHistory.md @@ -1,21 +1,23 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|offset\_id|[CLICK ME int](../types/int.md) | Yes|The last fetched message ID, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v46/methods/messages_readHistory.md b/old_docs/API_docs_v46/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v46/methods/messages_readHistory.md +++ b/old_docs/API_docs_v46/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v46/methods/messages_receivedMessages.md b/old_docs/API_docs_v46/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v46/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v46/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v46/methods/messages_reportSpam.md b/old_docs/API_docs_v46/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v46/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v46/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v46/methods/messages_search.md b/old_docs/API_docs_v46/methods/messages_search.md index bed6f4c1..2e62934b 100644 --- a/old_docs/API_docs_v46/methods/messages_search.md +++ b/old_docs/API_docs_v46/methods/messages_search.md @@ -1,24 +1,26 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|important\_only|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|important\_only|[CLICK ME Bool](../types/Bool.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|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v46/methods/messages_sendMedia.md b/old_docs/API_docs_v46/methods/messages_sendMedia.md index aeb09d5e..1aa36649 100644 --- a/old_docs/API_docs_v46/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v46/methods/messages_sendMedia.md @@ -1,20 +1,22 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[CLICK ME Bool](../types/Bool.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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v46/methods/messages_sendMessage.md b/old_docs/API_docs_v46/methods/messages_sendMessage.md index 3c19ccdf..47e8b01e 100644 --- a/old_docs/API_docs_v46/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v46/methods/messages_sendMessage.md @@ -1,23 +1,25 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|broadcast|[CLICK ME Bool](../types/Bool.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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v46/methods/messages_setTyping.md b/old_docs/API_docs_v46/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v46/methods/messages_setTyping.md +++ b/old_docs/API_docs_v46/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v51/methods/messages_addChatUser.md b/old_docs/API_docs_v51/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v51/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v51/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v51/methods/messages_createChat.md b/old_docs/API_docs_v51/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v51/methods/messages_createChat.md +++ b/old_docs/API_docs_v51/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v51/methods/messages_deleteChatUser.md b/old_docs/API_docs_v51/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v51/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v51/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v51/methods/messages_deleteHistory.md b/old_docs/API_docs_v51/methods/messages_deleteHistory.md index b7f374f5..d883a9ad 100644 --- a/old_docs/API_docs_v51/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v51/methods/messages_deleteHistory.md @@ -1,17 +1,19 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v51/methods/messages_deleteMessages.md b/old_docs/API_docs_v51/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v51/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v51/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v51/methods/messages_editChatPhoto.md b/old_docs/API_docs_v51/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v51/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v51/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v51/methods/messages_editChatTitle.md b/old_docs/API_docs_v51/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v51/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v51/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v51/methods/messages_editMessage.md b/old_docs/API_docs_v51/methods/messages_editMessage.md index 7ea847ed..2e98318d 100644 --- a/old_docs/API_docs_v51/methods/messages_editMessage.md +++ b/old_docs/API_docs_v51/methods/messages_editMessage.md @@ -16,7 +16,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v51/methods/messages_forwardMessages.md b/old_docs/API_docs_v51/methods/messages_forwardMessages.md index 032bf5a7..91bc40cc 100644 --- a/old_docs/API_docs_v51/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v51/methods/messages_forwardMessages.md @@ -1,21 +1,23 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[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|Disable background notifications| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v51/methods/messages_getChats.md b/old_docs/API_docs_v51/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v51/methods/messages_getChats.md +++ b/old_docs/API_docs_v51/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v51/methods/messages_getDhConfig.md b/old_docs/API_docs_v51/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v51/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v51/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v51/methods/messages_getDialogs.md b/old_docs/API_docs_v51/methods/messages_getDialogs.md index b22a7306..7a28bd83 100644 --- a/old_docs/API_docs_v51/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v51/methods/messages_getDialogs.md @@ -1,19 +1,21 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v51/methods/messages_getHistory.md b/old_docs/API_docs_v51/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v51/methods/messages_getHistory.md +++ b/old_docs/API_docs_v51/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v51/methods/messages_getPeerSettings.md b/old_docs/API_docs_v51/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v51/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v51/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v51/methods/messages_hideReportSpam.md b/old_docs/API_docs_v51/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v51/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v51/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v51/methods/messages_readHistory.md b/old_docs/API_docs_v51/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v51/methods/messages_readHistory.md +++ b/old_docs/API_docs_v51/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v51/methods/messages_receivedMessages.md b/old_docs/API_docs_v51/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v51/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v51/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v51/methods/messages_reportSpam.md b/old_docs/API_docs_v51/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v51/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v51/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v51/methods/messages_search.md b/old_docs/API_docs_v51/methods/messages_search.md index bed6f4c1..2e62934b 100644 --- a/old_docs/API_docs_v51/methods/messages_search.md +++ b/old_docs/API_docs_v51/methods/messages_search.md @@ -1,24 +1,26 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|important\_only|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|important\_only|[CLICK ME Bool](../types/Bool.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|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v51/methods/messages_sendMedia.md b/old_docs/API_docs_v51/methods/messages_sendMedia.md index bef89cc6..41150977 100644 --- a/old_docs/API_docs_v51/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v51/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|broadcast|[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|Disable background notifications?| +|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 message by ID| +|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v51/methods/messages_sendMessage.md b/old_docs/API_docs_v51/methods/messages_sendMessage.md index e082bdae..0701370b 100644 --- a/old_docs/API_docs_v51/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v51/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|broadcast|[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|Disable background notifications?| +|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 message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v51/methods/messages_setTyping.md b/old_docs/API_docs_v51/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v51/methods/messages_setTyping.md +++ b/old_docs/API_docs_v51/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v53/methods/contacts_getTopPeers.md b/old_docs/API_docs_v53/methods/contacts_getTopPeers.md index 462f8425..2bad9a2a 100644 --- a/old_docs/API_docs_v53/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v53/methods/contacts_getTopPeers.md @@ -19,7 +19,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v53/methods/messages_addChatUser.md b/old_docs/API_docs_v53/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v53/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v53/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v53/methods/messages_createChat.md b/old_docs/API_docs_v53/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v53/methods/messages_createChat.md +++ b/old_docs/API_docs_v53/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v53/methods/messages_deleteChatUser.md b/old_docs/API_docs_v53/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v53/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v53/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v53/methods/messages_deleteHistory.md b/old_docs/API_docs_v53/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v53/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v53/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v53/methods/messages_deleteMessages.md b/old_docs/API_docs_v53/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v53/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v53/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v53/methods/messages_editChatPhoto.md b/old_docs/API_docs_v53/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v53/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v53/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v53/methods/messages_editChatTitle.md b/old_docs/API_docs_v53/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v53/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v53/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v53/methods/messages_editMessage.md b/old_docs/API_docs_v53/methods/messages_editMessage.md index 7ea847ed..2e98318d 100644 --- a/old_docs/API_docs_v53/methods/messages_editMessage.md +++ b/old_docs/API_docs_v53/methods/messages_editMessage.md @@ -16,7 +16,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v53/methods/messages_forwardMessages.md b/old_docs/API_docs_v53/methods/messages_forwardMessages.md index 139f6e9a..88893539 100644 --- a/old_docs/API_docs_v53/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v53/methods/messages_forwardMessages.md @@ -1,20 +1,22 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v53/methods/messages_getChats.md b/old_docs/API_docs_v53/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v53/methods/messages_getChats.md +++ b/old_docs/API_docs_v53/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v53/methods/messages_getDhConfig.md b/old_docs/API_docs_v53/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v53/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v53/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v53/methods/messages_getDialogs.md b/old_docs/API_docs_v53/methods/messages_getDialogs.md index b22a7306..7a28bd83 100644 --- a/old_docs/API_docs_v53/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v53/methods/messages_getDialogs.md @@ -1,19 +1,21 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v53/methods/messages_getHistory.md b/old_docs/API_docs_v53/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v53/methods/messages_getHistory.md +++ b/old_docs/API_docs_v53/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v53/methods/messages_getPeerSettings.md b/old_docs/API_docs_v53/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v53/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v53/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v53/methods/messages_hideReportSpam.md b/old_docs/API_docs_v53/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v53/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v53/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v53/methods/messages_readHistory.md b/old_docs/API_docs_v53/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v53/methods/messages_readHistory.md +++ b/old_docs/API_docs_v53/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v53/methods/messages_receivedMessages.md b/old_docs/API_docs_v53/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v53/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v53/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v53/methods/messages_reportSpam.md b/old_docs/API_docs_v53/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v53/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v53/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v53/methods/messages_saveDraft.md b/old_docs/API_docs_v53/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v53/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v53/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v53/methods/messages_search.md b/old_docs/API_docs_v53/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v53/methods/messages_search.md +++ b/old_docs/API_docs_v53/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v53/methods/messages_sendMedia.md b/old_docs/API_docs_v53/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v53/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v53/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v53/methods/messages_sendMessage.md b/old_docs/API_docs_v53/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v53/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v53/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v53/methods/messages_setTyping.md b/old_docs/API_docs_v53/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v53/methods/messages_setTyping.md +++ b/old_docs/API_docs_v53/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v55/methods/contacts_getTopPeers.md b/old_docs/API_docs_v55/methods/contacts_getTopPeers.md index 462f8425..2bad9a2a 100644 --- a/old_docs/API_docs_v55/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v55/methods/contacts_getTopPeers.md @@ -19,7 +19,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v55/methods/messages_addChatUser.md b/old_docs/API_docs_v55/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v55/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v55/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v55/methods/messages_createChat.md b/old_docs/API_docs_v55/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v55/methods/messages_createChat.md +++ b/old_docs/API_docs_v55/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v55/methods/messages_deleteChatUser.md b/old_docs/API_docs_v55/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v55/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v55/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v55/methods/messages_deleteHistory.md b/old_docs/API_docs_v55/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v55/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v55/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v55/methods/messages_deleteMessages.md b/old_docs/API_docs_v55/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v55/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v55/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v55/methods/messages_editChatPhoto.md b/old_docs/API_docs_v55/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v55/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v55/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v55/methods/messages_editChatTitle.md b/old_docs/API_docs_v55/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v55/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v55/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v55/methods/messages_editMessage.md b/old_docs/API_docs_v55/methods/messages_editMessage.md index 7ea847ed..2e98318d 100644 --- a/old_docs/API_docs_v55/methods/messages_editMessage.md +++ b/old_docs/API_docs_v55/methods/messages_editMessage.md @@ -16,7 +16,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v55/methods/messages_forwardMessages.md b/old_docs/API_docs_v55/methods/messages_forwardMessages.md index 139f6e9a..88893539 100644 --- a/old_docs/API_docs_v55/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v55/methods/messages_forwardMessages.md @@ -1,20 +1,22 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v55/methods/messages_getChats.md b/old_docs/API_docs_v55/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v55/methods/messages_getChats.md +++ b/old_docs/API_docs_v55/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v55/methods/messages_getDhConfig.md b/old_docs/API_docs_v55/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v55/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v55/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v55/methods/messages_getDialogs.md b/old_docs/API_docs_v55/methods/messages_getDialogs.md index b22a7306..7a28bd83 100644 --- a/old_docs/API_docs_v55/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v55/methods/messages_getDialogs.md @@ -1,19 +1,21 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v55/methods/messages_getHistory.md b/old_docs/API_docs_v55/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v55/methods/messages_getHistory.md +++ b/old_docs/API_docs_v55/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v55/methods/messages_getPeerSettings.md b/old_docs/API_docs_v55/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v55/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v55/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v55/methods/messages_hideReportSpam.md b/old_docs/API_docs_v55/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v55/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v55/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v55/methods/messages_readHistory.md b/old_docs/API_docs_v55/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v55/methods/messages_readHistory.md +++ b/old_docs/API_docs_v55/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v55/methods/messages_receivedMessages.md b/old_docs/API_docs_v55/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v55/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v55/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v55/methods/messages_reportSpam.md b/old_docs/API_docs_v55/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v55/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v55/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v55/methods/messages_saveDraft.md b/old_docs/API_docs_v55/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v55/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v55/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v55/methods/messages_search.md b/old_docs/API_docs_v55/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v55/methods/messages_search.md +++ b/old_docs/API_docs_v55/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v55/methods/messages_sendMedia.md b/old_docs/API_docs_v55/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v55/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v55/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v55/methods/messages_sendMessage.md b/old_docs/API_docs_v55/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v55/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v55/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v55/methods/messages_setTyping.md b/old_docs/API_docs_v55/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v55/methods/messages_setTyping.md +++ b/old_docs/API_docs_v55/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v57/methods/contacts_getTopPeers.md b/old_docs/API_docs_v57/methods/contacts_getTopPeers.md index 462f8425..2bad9a2a 100644 --- a/old_docs/API_docs_v57/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v57/methods/contacts_getTopPeers.md @@ -19,7 +19,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v57/methods/messages_addChatUser.md b/old_docs/API_docs_v57/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v57/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v57/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v57/methods/messages_createChat.md b/old_docs/API_docs_v57/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v57/methods/messages_createChat.md +++ b/old_docs/API_docs_v57/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v57/methods/messages_deleteChatUser.md b/old_docs/API_docs_v57/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v57/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v57/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v57/methods/messages_deleteHistory.md b/old_docs/API_docs_v57/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v57/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v57/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v57/methods/messages_deleteMessages.md b/old_docs/API_docs_v57/methods/messages_deleteMessages.md index 8df8b1ee..41570996 100644 --- a/old_docs/API_docs_v57/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v57/methods/messages_deleteMessages.md @@ -1,16 +1,18 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v57/methods/messages_editChatPhoto.md b/old_docs/API_docs_v57/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v57/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v57/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v57/methods/messages_editChatTitle.md b/old_docs/API_docs_v57/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v57/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v57/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v57/methods/messages_editMessage.md b/old_docs/API_docs_v57/methods/messages_editMessage.md index 7ea847ed..2e98318d 100644 --- a/old_docs/API_docs_v57/methods/messages_editMessage.md +++ b/old_docs/API_docs_v57/methods/messages_editMessage.md @@ -16,7 +16,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v57/methods/messages_forwardMessages.md b/old_docs/API_docs_v57/methods/messages_forwardMessages.md index c8e90c10..efe58e67 100644 --- a/old_docs/API_docs_v57/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v57/methods/messages_forwardMessages.md @@ -1,21 +1,23 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional|If forwarding a game, forward your score, too| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v57/methods/messages_getChats.md b/old_docs/API_docs_v57/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v57/methods/messages_getChats.md +++ b/old_docs/API_docs_v57/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v57/methods/messages_getDhConfig.md b/old_docs/API_docs_v57/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v57/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v57/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v57/methods/messages_getDialogs.md b/old_docs/API_docs_v57/methods/messages_getDialogs.md index b22a7306..7a28bd83 100644 --- a/old_docs/API_docs_v57/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v57/methods/messages_getDialogs.md @@ -1,19 +1,21 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v57/methods/messages_getHistory.md b/old_docs/API_docs_v57/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v57/methods/messages_getHistory.md +++ b/old_docs/API_docs_v57/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v57/methods/messages_getPeerSettings.md b/old_docs/API_docs_v57/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v57/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v57/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v57/methods/messages_hideReportSpam.md b/old_docs/API_docs_v57/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v57/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v57/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v57/methods/messages_readHistory.md b/old_docs/API_docs_v57/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v57/methods/messages_readHistory.md +++ b/old_docs/API_docs_v57/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v57/methods/messages_receivedMessages.md b/old_docs/API_docs_v57/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v57/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v57/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v57/methods/messages_reportSpam.md b/old_docs/API_docs_v57/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v57/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v57/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v57/methods/messages_saveDraft.md b/old_docs/API_docs_v57/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v57/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v57/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v57/methods/messages_search.md b/old_docs/API_docs_v57/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v57/methods/messages_search.md +++ b/old_docs/API_docs_v57/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v57/methods/messages_sendMedia.md b/old_docs/API_docs_v57/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v57/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v57/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v57/methods/messages_sendMessage.md b/old_docs/API_docs_v57/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v57/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v57/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v57/methods/messages_setTyping.md b/old_docs/API_docs_v57/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v57/methods/messages_setTyping.md +++ b/old_docs/API_docs_v57/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v62/methods/contacts_getTopPeers.md b/old_docs/API_docs_v62/methods/contacts_getTopPeers.md index 462f8425..2bad9a2a 100644 --- a/old_docs/API_docs_v62/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v62/methods/contacts_getTopPeers.md @@ -19,7 +19,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v62/methods/messages_addChatUser.md b/old_docs/API_docs_v62/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v62/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v62/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v62/methods/messages_createChat.md b/old_docs/API_docs_v62/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v62/methods/messages_createChat.md +++ b/old_docs/API_docs_v62/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v62/methods/messages_deleteChatUser.md b/old_docs/API_docs_v62/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v62/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v62/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v62/methods/messages_deleteHistory.md b/old_docs/API_docs_v62/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v62/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v62/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v62/methods/messages_deleteMessages.md b/old_docs/API_docs_v62/methods/messages_deleteMessages.md index f2926938..0da41180 100644 --- a/old_docs/API_docs_v62/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v62/methods/messages_deleteMessages.md @@ -1,17 +1,19 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|revoke|[CLICK ME Bool](../types/Bool.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?| +|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) diff --git a/old_docs/API_docs_v62/methods/messages_editChatPhoto.md b/old_docs/API_docs_v62/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v62/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v62/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v62/methods/messages_editChatTitle.md b/old_docs/API_docs_v62/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v62/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v62/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v62/methods/messages_editMessage.md b/old_docs/API_docs_v62/methods/messages_editMessage.md index 7ea847ed..2e98318d 100644 --- a/old_docs/API_docs_v62/methods/messages_editMessage.md +++ b/old_docs/API_docs_v62/methods/messages_editMessage.md @@ -16,7 +16,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v62/methods/messages_forwardMessages.md b/old_docs/API_docs_v62/methods/messages_forwardMessages.md index c8e90c10..efe58e67 100644 --- a/old_docs/API_docs_v62/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v62/methods/messages_forwardMessages.md @@ -1,21 +1,23 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional|If forwarding a game, forward your score, too| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v62/methods/messages_getChats.md b/old_docs/API_docs_v62/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v62/methods/messages_getChats.md +++ b/old_docs/API_docs_v62/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v62/methods/messages_getDhConfig.md b/old_docs/API_docs_v62/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v62/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v62/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v62/methods/messages_getDialogs.md b/old_docs/API_docs_v62/methods/messages_getDialogs.md index 34bc4c30..e100228b 100644 --- a/old_docs/API_docs_v62/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v62/methods/messages_getDialogs.md @@ -1,20 +1,22 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|Do not fetch pinned chats| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v62/methods/messages_getHistory.md b/old_docs/API_docs_v62/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v62/methods/messages_getHistory.md +++ b/old_docs/API_docs_v62/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v62/methods/messages_getPeerSettings.md b/old_docs/API_docs_v62/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v62/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v62/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v62/methods/messages_hideReportSpam.md b/old_docs/API_docs_v62/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v62/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v62/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v62/methods/messages_readHistory.md b/old_docs/API_docs_v62/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v62/methods/messages_readHistory.md +++ b/old_docs/API_docs_v62/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v62/methods/messages_receivedMessages.md b/old_docs/API_docs_v62/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v62/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v62/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v62/methods/messages_reportSpam.md b/old_docs/API_docs_v62/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v62/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v62/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v62/methods/messages_saveDraft.md b/old_docs/API_docs_v62/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v62/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v62/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v62/methods/messages_search.md b/old_docs/API_docs_v62/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v62/methods/messages_search.md +++ b/old_docs/API_docs_v62/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v62/methods/messages_sendMedia.md b/old_docs/API_docs_v62/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v62/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v62/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v62/methods/messages_sendMessage.md b/old_docs/API_docs_v62/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v62/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v62/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v62/methods/messages_setTyping.md b/old_docs/API_docs_v62/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v62/methods/messages_setTyping.md +++ b/old_docs/API_docs_v62/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v65/methods/contacts_getTopPeers.md b/old_docs/API_docs_v65/methods/contacts_getTopPeers.md index 462f8425..2bad9a2a 100644 --- a/old_docs/API_docs_v65/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v65/methods/contacts_getTopPeers.md @@ -19,7 +19,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v65/methods/messages_addChatUser.md b/old_docs/API_docs_v65/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v65/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v65/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v65/methods/messages_createChat.md b/old_docs/API_docs_v65/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v65/methods/messages_createChat.md +++ b/old_docs/API_docs_v65/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v65/methods/messages_deleteChatUser.md b/old_docs/API_docs_v65/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v65/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v65/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v65/methods/messages_deleteHistory.md b/old_docs/API_docs_v65/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v65/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v65/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v65/methods/messages_deleteMessages.md b/old_docs/API_docs_v65/methods/messages_deleteMessages.md index f2926938..0da41180 100644 --- a/old_docs/API_docs_v65/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v65/methods/messages_deleteMessages.md @@ -1,17 +1,19 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|revoke|[CLICK ME Bool](../types/Bool.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?| +|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) diff --git a/old_docs/API_docs_v65/methods/messages_editChatPhoto.md b/old_docs/API_docs_v65/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v65/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v65/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v65/methods/messages_editChatTitle.md b/old_docs/API_docs_v65/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v65/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v65/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v65/methods/messages_editMessage.md b/old_docs/API_docs_v65/methods/messages_editMessage.md index 7ea847ed..2e98318d 100644 --- a/old_docs/API_docs_v65/methods/messages_editMessage.md +++ b/old_docs/API_docs_v65/methods/messages_editMessage.md @@ -16,7 +16,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v65/methods/messages_forwardMessages.md b/old_docs/API_docs_v65/methods/messages_forwardMessages.md index c8e90c10..efe58e67 100644 --- a/old_docs/API_docs_v65/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v65/methods/messages_forwardMessages.md @@ -1,21 +1,23 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional|If forwarding a game, forward your score, too| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v65/methods/messages_getChats.md b/old_docs/API_docs_v65/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v65/methods/messages_getChats.md +++ b/old_docs/API_docs_v65/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v65/methods/messages_getDhConfig.md b/old_docs/API_docs_v65/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v65/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v65/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v65/methods/messages_getDialogs.md b/old_docs/API_docs_v65/methods/messages_getDialogs.md index 34bc4c30..e100228b 100644 --- a/old_docs/API_docs_v65/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v65/methods/messages_getDialogs.md @@ -1,20 +1,22 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|Do not fetch pinned chats| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v65/methods/messages_getHistory.md b/old_docs/API_docs_v65/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v65/methods/messages_getHistory.md +++ b/old_docs/API_docs_v65/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v65/methods/messages_getPeerSettings.md b/old_docs/API_docs_v65/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v65/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v65/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v65/methods/messages_hideReportSpam.md b/old_docs/API_docs_v65/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v65/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v65/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v65/methods/messages_readHistory.md b/old_docs/API_docs_v65/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v65/methods/messages_readHistory.md +++ b/old_docs/API_docs_v65/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v65/methods/messages_receivedMessages.md b/old_docs/API_docs_v65/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v65/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v65/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v65/methods/messages_reportSpam.md b/old_docs/API_docs_v65/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v65/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v65/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v65/methods/messages_saveDraft.md b/old_docs/API_docs_v65/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v65/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v65/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v65/methods/messages_search.md b/old_docs/API_docs_v65/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v65/methods/messages_search.md +++ b/old_docs/API_docs_v65/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v65/methods/messages_sendMedia.md b/old_docs/API_docs_v65/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v65/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v65/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v65/methods/messages_sendMessage.md b/old_docs/API_docs_v65/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v65/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v65/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v65/methods/messages_setTyping.md b/old_docs/API_docs_v65/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v65/methods/messages_setTyping.md +++ b/old_docs/API_docs_v65/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v66/methods/contacts_getTopPeers.md b/old_docs/API_docs_v66/methods/contacts_getTopPeers.md index 462f8425..2bad9a2a 100644 --- a/old_docs/API_docs_v66/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v66/methods/contacts_getTopPeers.md @@ -19,7 +19,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v66/methods/messages_addChatUser.md b/old_docs/API_docs_v66/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v66/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v66/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v66/methods/messages_createChat.md b/old_docs/API_docs_v66/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v66/methods/messages_createChat.md +++ b/old_docs/API_docs_v66/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v66/methods/messages_deleteChatUser.md b/old_docs/API_docs_v66/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v66/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v66/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v66/methods/messages_deleteHistory.md b/old_docs/API_docs_v66/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v66/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v66/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v66/methods/messages_deleteMessages.md b/old_docs/API_docs_v66/methods/messages_deleteMessages.md index f2926938..0da41180 100644 --- a/old_docs/API_docs_v66/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v66/methods/messages_deleteMessages.md @@ -1,17 +1,19 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|revoke|[CLICK ME Bool](../types/Bool.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?| +|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) diff --git a/old_docs/API_docs_v66/methods/messages_editChatPhoto.md b/old_docs/API_docs_v66/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v66/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v66/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v66/methods/messages_editChatTitle.md b/old_docs/API_docs_v66/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v66/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v66/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v66/methods/messages_editMessage.md b/old_docs/API_docs_v66/methods/messages_editMessage.md index 7ea847ed..2e98318d 100644 --- a/old_docs/API_docs_v66/methods/messages_editMessage.md +++ b/old_docs/API_docs_v66/methods/messages_editMessage.md @@ -16,7 +16,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v66/methods/messages_forwardMessages.md b/old_docs/API_docs_v66/methods/messages_forwardMessages.md index c8e90c10..efe58e67 100644 --- a/old_docs/API_docs_v66/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v66/methods/messages_forwardMessages.md @@ -1,21 +1,23 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional|If forwarding a game, forward your score, too| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v66/methods/messages_getChats.md b/old_docs/API_docs_v66/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v66/methods/messages_getChats.md +++ b/old_docs/API_docs_v66/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v66/methods/messages_getDhConfig.md b/old_docs/API_docs_v66/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v66/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v66/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v66/methods/messages_getDialogs.md b/old_docs/API_docs_v66/methods/messages_getDialogs.md index 34bc4c30..e100228b 100644 --- a/old_docs/API_docs_v66/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v66/methods/messages_getDialogs.md @@ -1,20 +1,22 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|Do not fetch pinned chats| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v66/methods/messages_getHistory.md b/old_docs/API_docs_v66/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v66/methods/messages_getHistory.md +++ b/old_docs/API_docs_v66/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v66/methods/messages_getPeerSettings.md b/old_docs/API_docs_v66/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v66/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v66/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v66/methods/messages_hideReportSpam.md b/old_docs/API_docs_v66/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v66/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v66/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v66/methods/messages_readHistory.md b/old_docs/API_docs_v66/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v66/methods/messages_readHistory.md +++ b/old_docs/API_docs_v66/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v66/methods/messages_receivedMessages.md b/old_docs/API_docs_v66/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v66/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v66/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v66/methods/messages_reportSpam.md b/old_docs/API_docs_v66/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v66/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v66/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v66/methods/messages_saveDraft.md b/old_docs/API_docs_v66/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v66/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v66/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v66/methods/messages_search.md b/old_docs/API_docs_v66/methods/messages_search.md index 5fe59e8a..126d61bd 100644 --- a/old_docs/API_docs_v66/methods/messages_search.md +++ b/old_docs/API_docs_v66/methods/messages_search.md @@ -1,23 +1,25 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v66/methods/messages_sendMedia.md b/old_docs/API_docs_v66/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v66/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v66/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v66/methods/messages_sendMessage.md b/old_docs/API_docs_v66/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v66/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v66/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v66/methods/messages_setTyping.md b/old_docs/API_docs_v66/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v66/methods/messages_setTyping.md +++ b/old_docs/API_docs_v66/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v68/methods/contacts_getTopPeers.md b/old_docs/API_docs_v68/methods/contacts_getTopPeers.md index 7fa3e931..226d3aa0 100644 --- a/old_docs/API_docs_v68/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v68/methods/contacts_getTopPeers.md @@ -20,7 +20,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v68/methods/messages_addChatUser.md b/old_docs/API_docs_v68/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v68/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v68/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v68/methods/messages_createChat.md b/old_docs/API_docs_v68/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v68/methods/messages_createChat.md +++ b/old_docs/API_docs_v68/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v68/methods/messages_deleteChatUser.md b/old_docs/API_docs_v68/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v68/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v68/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v68/methods/messages_deleteHistory.md b/old_docs/API_docs_v68/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v68/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v68/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v68/methods/messages_deleteMessages.md b/old_docs/API_docs_v68/methods/messages_deleteMessages.md index f2926938..0da41180 100644 --- a/old_docs/API_docs_v68/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v68/methods/messages_deleteMessages.md @@ -1,17 +1,19 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|revoke|[CLICK ME Bool](../types/Bool.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?| +|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) diff --git a/old_docs/API_docs_v68/methods/messages_editChatPhoto.md b/old_docs/API_docs_v68/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v68/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v68/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v68/methods/messages_editChatTitle.md b/old_docs/API_docs_v68/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v68/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v68/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v68/methods/messages_editMessage.md b/old_docs/API_docs_v68/methods/messages_editMessage.md index 7ea847ed..2e98318d 100644 --- a/old_docs/API_docs_v68/methods/messages_editMessage.md +++ b/old_docs/API_docs_v68/methods/messages_editMessage.md @@ -16,7 +16,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v68/methods/messages_forwardMessages.md b/old_docs/API_docs_v68/methods/messages_forwardMessages.md index c8e90c10..efe58e67 100644 --- a/old_docs/API_docs_v68/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v68/methods/messages_forwardMessages.md @@ -1,21 +1,23 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional|If forwarding a game, forward your score, too| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v68/methods/messages_getChats.md b/old_docs/API_docs_v68/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v68/methods/messages_getChats.md +++ b/old_docs/API_docs_v68/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v68/methods/messages_getDhConfig.md b/old_docs/API_docs_v68/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v68/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v68/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v68/methods/messages_getDialogs.md b/old_docs/API_docs_v68/methods/messages_getDialogs.md index 34bc4c30..e100228b 100644 --- a/old_docs/API_docs_v68/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v68/methods/messages_getDialogs.md @@ -1,20 +1,22 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|Do not fetch pinned chats| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v68/methods/messages_getHistory.md b/old_docs/API_docs_v68/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v68/methods/messages_getHistory.md +++ b/old_docs/API_docs_v68/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v68/methods/messages_getPeerSettings.md b/old_docs/API_docs_v68/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v68/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v68/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v68/methods/messages_hideReportSpam.md b/old_docs/API_docs_v68/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v68/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v68/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v68/methods/messages_readHistory.md b/old_docs/API_docs_v68/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v68/methods/messages_readHistory.md +++ b/old_docs/API_docs_v68/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v68/methods/messages_receivedMessages.md b/old_docs/API_docs_v68/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v68/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v68/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v68/methods/messages_reportSpam.md b/old_docs/API_docs_v68/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v68/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v68/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v68/methods/messages_saveDraft.md b/old_docs/API_docs_v68/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v68/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v68/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v68/methods/messages_search.md b/old_docs/API_docs_v68/methods/messages_search.md index 7b58095a..1cc029bf 100644 --- a/old_docs/API_docs_v68/methods/messages_search.md +++ b/old_docs/API_docs_v68/methods/messages_search.md @@ -1,24 +1,26 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|from\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|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|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v68/methods/messages_sendMedia.md b/old_docs/API_docs_v68/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v68/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v68/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v68/methods/messages_sendMessage.md b/old_docs/API_docs_v68/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v68/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v68/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v68/methods/messages_setTyping.md b/old_docs/API_docs_v68/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v68/methods/messages_setTyping.md +++ b/old_docs/API_docs_v68/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v70/methods/contacts_getTopPeers.md b/old_docs/API_docs_v70/methods/contacts_getTopPeers.md index 7fa3e931..226d3aa0 100644 --- a/old_docs/API_docs_v70/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v70/methods/contacts_getTopPeers.md @@ -20,7 +20,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v70/methods/messages_addChatUser.md b/old_docs/API_docs_v70/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v70/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v70/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v70/methods/messages_createChat.md b/old_docs/API_docs_v70/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v70/methods/messages_createChat.md +++ b/old_docs/API_docs_v70/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v70/methods/messages_deleteChatUser.md b/old_docs/API_docs_v70/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v70/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v70/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v70/methods/messages_deleteHistory.md b/old_docs/API_docs_v70/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v70/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v70/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v70/methods/messages_deleteMessages.md b/old_docs/API_docs_v70/methods/messages_deleteMessages.md index f2926938..0da41180 100644 --- a/old_docs/API_docs_v70/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v70/methods/messages_deleteMessages.md @@ -1,17 +1,19 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|revoke|[CLICK ME Bool](../types/Bool.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?| +|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) diff --git a/old_docs/API_docs_v70/methods/messages_editChatPhoto.md b/old_docs/API_docs_v70/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v70/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v70/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v70/methods/messages_editChatTitle.md b/old_docs/API_docs_v70/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v70/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v70/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v70/methods/messages_editMessage.md b/old_docs/API_docs_v70/methods/messages_editMessage.md index 7ea847ed..2e98318d 100644 --- a/old_docs/API_docs_v70/methods/messages_editMessage.md +++ b/old_docs/API_docs_v70/methods/messages_editMessage.md @@ -16,7 +16,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v70/methods/messages_forwardMessages.md b/old_docs/API_docs_v70/methods/messages_forwardMessages.md index c8e90c10..efe58e67 100644 --- a/old_docs/API_docs_v70/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v70/methods/messages_forwardMessages.md @@ -1,21 +1,23 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional|If forwarding a game, forward your score, too| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v70/methods/messages_getChats.md b/old_docs/API_docs_v70/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v70/methods/messages_getChats.md +++ b/old_docs/API_docs_v70/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v70/methods/messages_getDhConfig.md b/old_docs/API_docs_v70/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v70/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v70/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v70/methods/messages_getDialogs.md b/old_docs/API_docs_v70/methods/messages_getDialogs.md index 34bc4c30..e100228b 100644 --- a/old_docs/API_docs_v70/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v70/methods/messages_getDialogs.md @@ -1,20 +1,22 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|Do not fetch pinned chats| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v70/methods/messages_getHistory.md b/old_docs/API_docs_v70/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v70/methods/messages_getHistory.md +++ b/old_docs/API_docs_v70/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v70/methods/messages_getPeerSettings.md b/old_docs/API_docs_v70/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v70/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v70/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v70/methods/messages_hideReportSpam.md b/old_docs/API_docs_v70/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v70/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v70/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v70/methods/messages_readHistory.md b/old_docs/API_docs_v70/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v70/methods/messages_readHistory.md +++ b/old_docs/API_docs_v70/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v70/methods/messages_receivedMessages.md b/old_docs/API_docs_v70/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v70/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v70/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v70/methods/messages_reportSpam.md b/old_docs/API_docs_v70/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v70/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v70/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v70/methods/messages_saveDraft.md b/old_docs/API_docs_v70/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v70/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v70/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v70/methods/messages_search.md b/old_docs/API_docs_v70/methods/messages_search.md index 7b58095a..1cc029bf 100644 --- a/old_docs/API_docs_v70/methods/messages_search.md +++ b/old_docs/API_docs_v70/methods/messages_search.md @@ -1,24 +1,26 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|from\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|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|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|max\_date|[CLICK ME int](../types/int.md) | Yes|Maximum date of results to fetch| +|offset|[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|Number of results to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v70/methods/messages_sendMedia.md b/old_docs/API_docs_v70/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v70/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v70/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v70/methods/messages_sendMessage.md b/old_docs/API_docs_v70/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v70/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v70/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v70/methods/messages_setTyping.md b/old_docs/API_docs_v70/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v70/methods/messages_setTyping.md +++ b/old_docs/API_docs_v70/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v71/methods/contacts_getTopPeers.md b/old_docs/API_docs_v71/methods/contacts_getTopPeers.md index 7fa3e931..226d3aa0 100644 --- a/old_docs/API_docs_v71/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v71/methods/contacts_getTopPeers.md @@ -20,7 +20,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v71/methods/contacts_resetSaved.md b/old_docs/API_docs_v71/methods/contacts_resetSaved.md index eb07f34c..50034ace 100644 --- a/old_docs/API_docs_v71/methods/contacts_resetSaved.md +++ b/old_docs/API_docs_v71/methods/contacts_resetSaved.md @@ -1,11 +1,13 @@ --- title: contacts.resetSaved -description: contacts.resetSaved parameters, return type and example +description: Reset saved contacts --- ## Method: contacts.resetSaved [Back to methods index](index.md) +Reset saved contacts + ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v71/methods/messages_addChatUser.md b/old_docs/API_docs_v71/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v71/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v71/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v71/methods/messages_createChat.md b/old_docs/API_docs_v71/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v71/methods/messages_createChat.md +++ b/old_docs/API_docs_v71/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v71/methods/messages_deleteChatUser.md b/old_docs/API_docs_v71/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v71/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v71/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v71/methods/messages_deleteHistory.md b/old_docs/API_docs_v71/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v71/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v71/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v71/methods/messages_deleteMessages.md b/old_docs/API_docs_v71/methods/messages_deleteMessages.md index f2926938..0da41180 100644 --- a/old_docs/API_docs_v71/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v71/methods/messages_deleteMessages.md @@ -1,17 +1,19 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|revoke|[CLICK ME Bool](../types/Bool.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?| +|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) diff --git a/old_docs/API_docs_v71/methods/messages_editChatPhoto.md b/old_docs/API_docs_v71/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v71/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v71/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v71/methods/messages_editChatTitle.md b/old_docs/API_docs_v71/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v71/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v71/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v71/methods/messages_editMessage.md b/old_docs/API_docs_v71/methods/messages_editMessage.md index 7ea847ed..2e98318d 100644 --- a/old_docs/API_docs_v71/methods/messages_editMessage.md +++ b/old_docs/API_docs_v71/methods/messages_editMessage.md @@ -16,7 +16,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v71/methods/messages_forwardMessages.md b/old_docs/API_docs_v71/methods/messages_forwardMessages.md index c8e90c10..efe58e67 100644 --- a/old_docs/API_docs_v71/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v71/methods/messages_forwardMessages.md @@ -1,21 +1,23 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional|If forwarding a game, forward your score, too| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v71/methods/messages_getChats.md b/old_docs/API_docs_v71/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v71/methods/messages_getChats.md +++ b/old_docs/API_docs_v71/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v71/methods/messages_getDhConfig.md b/old_docs/API_docs_v71/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v71/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v71/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v71/methods/messages_getDialogs.md b/old_docs/API_docs_v71/methods/messages_getDialogs.md index 34bc4c30..e100228b 100644 --- a/old_docs/API_docs_v71/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v71/methods/messages_getDialogs.md @@ -1,20 +1,22 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|Do not fetch pinned chats| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v71/methods/messages_getHistory.md b/old_docs/API_docs_v71/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v71/methods/messages_getHistory.md +++ b/old_docs/API_docs_v71/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v71/methods/messages_getPeerSettings.md b/old_docs/API_docs_v71/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v71/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v71/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v71/methods/messages_hideReportSpam.md b/old_docs/API_docs_v71/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v71/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v71/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v71/methods/messages_readHistory.md b/old_docs/API_docs_v71/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v71/methods/messages_readHistory.md +++ b/old_docs/API_docs_v71/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v71/methods/messages_receivedMessages.md b/old_docs/API_docs_v71/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v71/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v71/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v71/methods/messages_reportSpam.md b/old_docs/API_docs_v71/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v71/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v71/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v71/methods/messages_saveDraft.md b/old_docs/API_docs_v71/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v71/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v71/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v71/methods/messages_search.md b/old_docs/API_docs_v71/methods/messages_search.md index 67178dac..9cab5783 100644 --- a/old_docs/API_docs_v71/methods/messages_search.md +++ b/old_docs/API_docs_v71/methods/messages_search.md @@ -1,26 +1,28 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|from\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|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|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|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 | +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of results to return| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id to return| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message id to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v71/methods/messages_sendMedia.md b/old_docs/API_docs_v71/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v71/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v71/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v71/methods/messages_sendMessage.md b/old_docs/API_docs_v71/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v71/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v71/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v71/methods/messages_setTyping.md b/old_docs/API_docs_v71/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v71/methods/messages_setTyping.md +++ b/old_docs/API_docs_v71/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v72/methods/contacts_getTopPeers.md b/old_docs/API_docs_v72/methods/contacts_getTopPeers.md index 7fa3e931..226d3aa0 100644 --- a/old_docs/API_docs_v72/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v72/methods/contacts_getTopPeers.md @@ -20,7 +20,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v72/methods/contacts_resetSaved.md b/old_docs/API_docs_v72/methods/contacts_resetSaved.md index eb07f34c..50034ace 100644 --- a/old_docs/API_docs_v72/methods/contacts_resetSaved.md +++ b/old_docs/API_docs_v72/methods/contacts_resetSaved.md @@ -1,11 +1,13 @@ --- title: contacts.resetSaved -description: contacts.resetSaved parameters, return type and example +description: Reset saved contacts --- ## Method: contacts.resetSaved [Back to methods index](index.md) +Reset saved contacts + ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v72/methods/messages_addChatUser.md b/old_docs/API_docs_v72/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v72/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v72/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v72/methods/messages_createChat.md b/old_docs/API_docs_v72/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v72/methods/messages_createChat.md +++ b/old_docs/API_docs_v72/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v72/methods/messages_deleteChatUser.md b/old_docs/API_docs_v72/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v72/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v72/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v72/methods/messages_deleteHistory.md b/old_docs/API_docs_v72/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v72/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v72/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v72/methods/messages_deleteMessages.md b/old_docs/API_docs_v72/methods/messages_deleteMessages.md index f2926938..0da41180 100644 --- a/old_docs/API_docs_v72/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v72/methods/messages_deleteMessages.md @@ -1,17 +1,19 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|revoke|[CLICK ME Bool](../types/Bool.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?| +|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) diff --git a/old_docs/API_docs_v72/methods/messages_editChatPhoto.md b/old_docs/API_docs_v72/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v72/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v72/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v72/methods/messages_editChatTitle.md b/old_docs/API_docs_v72/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v72/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v72/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v72/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v72/methods/messages_editInlineBotMessage.md index 201736cc..c0d06614 100644 --- a/old_docs/API_docs_v72/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v72/methods/messages_editInlineBotMessage.md @@ -15,7 +15,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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) diff --git a/old_docs/API_docs_v72/methods/messages_editMessage.md b/old_docs/API_docs_v72/methods/messages_editMessage.md index b97fe1c6..6953a15f 100644 --- a/old_docs/API_docs_v72/methods/messages_editMessage.md +++ b/old_docs/API_docs_v72/methods/messages_editMessage.md @@ -17,7 +17,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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| diff --git a/old_docs/API_docs_v72/methods/messages_forwardMessages.md b/old_docs/API_docs_v72/methods/messages_forwardMessages.md index c8e90c10..efe58e67 100644 --- a/old_docs/API_docs_v72/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v72/methods/messages_forwardMessages.md @@ -1,21 +1,23 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional|If forwarding a game, forward your score, too| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v72/methods/messages_getChats.md b/old_docs/API_docs_v72/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v72/methods/messages_getChats.md +++ b/old_docs/API_docs_v72/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v72/methods/messages_getDhConfig.md b/old_docs/API_docs_v72/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v72/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v72/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v72/methods/messages_getDialogs.md b/old_docs/API_docs_v72/methods/messages_getDialogs.md index 34bc4c30..e100228b 100644 --- a/old_docs/API_docs_v72/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v72/methods/messages_getDialogs.md @@ -1,20 +1,22 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|Do not fetch pinned chats| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v72/methods/messages_getHistory.md b/old_docs/API_docs_v72/methods/messages_getHistory.md index 62feee28..dfae66e6 100644 --- a/old_docs/API_docs_v72/methods/messages_getHistory.md +++ b/old_docs/API_docs_v72/methods/messages_getHistory.md @@ -1,22 +1,24 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v72/methods/messages_getPeerSettings.md b/old_docs/API_docs_v72/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v72/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v72/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v72/methods/messages_hideReportSpam.md b/old_docs/API_docs_v72/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v72/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v72/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v72/methods/messages_readHistory.md b/old_docs/API_docs_v72/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v72/methods/messages_readHistory.md +++ b/old_docs/API_docs_v72/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v72/methods/messages_receivedMessages.md b/old_docs/API_docs_v72/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v72/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v72/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v72/methods/messages_reportSpam.md b/old_docs/API_docs_v72/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v72/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v72/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v72/methods/messages_saveDraft.md b/old_docs/API_docs_v72/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v72/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v72/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v72/methods/messages_search.md b/old_docs/API_docs_v72/methods/messages_search.md index 67178dac..9cab5783 100644 --- a/old_docs/API_docs_v72/methods/messages_search.md +++ b/old_docs/API_docs_v72/methods/messages_search.md @@ -1,26 +1,28 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|from\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|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|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|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 | +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of results to return| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id to return| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message id to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v72/methods/messages_sendMedia.md b/old_docs/API_docs_v72/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v72/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v72/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v72/methods/messages_sendMessage.md b/old_docs/API_docs_v72/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v72/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v72/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v72/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v72/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v72/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v72/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v72/methods/messages_setTyping.md b/old_docs/API_docs_v72/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v72/methods/messages_setTyping.md +++ b/old_docs/API_docs_v72/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v73/methods/contacts_getTopPeers.md b/old_docs/API_docs_v73/methods/contacts_getTopPeers.md index 7fa3e931..226d3aa0 100644 --- a/old_docs/API_docs_v73/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v73/methods/contacts_getTopPeers.md @@ -20,7 +20,7 @@ Get most used chats |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'];`| |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) diff --git a/old_docs/API_docs_v73/methods/contacts_resetSaved.md b/old_docs/API_docs_v73/methods/contacts_resetSaved.md index eb07f34c..50034ace 100644 --- a/old_docs/API_docs_v73/methods/contacts_resetSaved.md +++ b/old_docs/API_docs_v73/methods/contacts_resetSaved.md @@ -1,11 +1,13 @@ --- title: contacts.resetSaved -description: contacts.resetSaved parameters, return type and example +description: Reset saved contacts --- ## Method: contacts.resetSaved [Back to methods index](index.md) +Reset saved contacts + ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v73/methods/messages_addChatUser.md b/old_docs/API_docs_v73/methods/messages_addChatUser.md index f7b6d3ed..3e4c5ccc 100644 --- a/old_docs/API_docs_v73/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v73/methods/messages_addChatUser.md @@ -1,18 +1,20 @@ --- 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 [Back to methods index](index.md) +Add a user to a normal chat (use channels->inviteToChannel for supergroups) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|fwd\_limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to invite| +|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v73/methods/messages_createChat.md b/old_docs/API_docs_v73/methods/messages_createChat.md index 70aaad74..68c0263a 100644 --- a/old_docs/API_docs_v73/methods/messages_createChat.md +++ b/old_docs/API_docs_v73/methods/messages_createChat.md @@ -1,17 +1,19 @@ --- title: messages.createChat -description: messages.createChat parameters, return type and example +description: Create a chat (not supergroup) --- ## Method: messages.createChat [Back to methods index](index.md) +Create a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new chat's title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v73/methods/messages_deleteChatUser.md b/old_docs/API_docs_v73/methods/messages_deleteChatUser.md index 872a13f6..a71f4aaf 100644 --- a/old_docs/API_docs_v73/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v73/methods/messages_deleteChatUser.md @@ -1,17 +1,19 @@ --- title: messages.deleteChatUser -description: messages.deleteChatUser parameters, return type and example +description: Delete a user from a chat (not supergroup) --- ## Method: messages.deleteChatUser [Back to methods index](index.md) +Delete a user from a chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The user to delete (pass @me to leave the chat)| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v73/methods/messages_deleteHistory.md b/old_docs/API_docs_v73/methods/messages_deleteHistory.md index 4bd5a015..e44433c1 100644 --- a/old_docs/API_docs_v73/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v73/methods/messages_deleteHistory.md @@ -1,18 +1,20 @@ --- title: messages.deleteHistory -description: messages.deleteHistory parameters, return type and example +description: Delete chat history --- ## Method: messages.deleteHistory [Back to methods index](index.md) +Delete chat history + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Where to clear it| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete| ### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md) diff --git a/old_docs/API_docs_v73/methods/messages_deleteMessages.md b/old_docs/API_docs_v73/methods/messages_deleteMessages.md index f2926938..0da41180 100644 --- a/old_docs/API_docs_v73/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v73/methods/messages_deleteMessages.md @@ -1,17 +1,19 @@ --- title: messages.deleteMessages -description: messages.deleteMessages parameters, return type and example +description: Delete messages --- ## Method: messages.deleteMessages [Back to methods index](index.md) +Delete messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|revoke|[CLICK ME Bool](../types/Bool.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?| +|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) diff --git a/old_docs/API_docs_v73/methods/messages_editChatPhoto.md b/old_docs/API_docs_v73/methods/messages_editChatPhoto.md index 08262838..8848eca7 100644 --- a/old_docs/API_docs_v73/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v73/methods/messages_editChatPhoto.md @@ -1,17 +1,19 @@ --- title: messages.editChatPhoto -description: messages.editChatPhoto parameters, return type and example +description: Edit the photo of a normal chat (not supergroup) --- ## Method: messages.editChatPhoto [Back to methods index](index.md) +Edit the photo of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new phto| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v73/methods/messages_editChatTitle.md b/old_docs/API_docs_v73/methods/messages_editChatTitle.md index c472293b..1c1c7a16 100644 --- a/old_docs/API_docs_v73/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v73/methods/messages_editChatTitle.md @@ -1,17 +1,19 @@ --- title: messages.editChatTitle -description: messages.editChatTitle parameters, return type and example +description: Edit the title of a normal chat (not supergroup) --- ## Method: messages.editChatTitle [Back to methods index](index.md) +Edit the title of a normal chat (not supergroup) + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|title|[CLICK ME string](../types/string.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|The new title| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v73/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v73/methods/messages_editInlineBotMessage.md index 46ff9536..9c4ef8d8 100644 --- a/old_docs/API_docs_v73/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v73/methods/messages_editInlineBotMessage.md @@ -16,7 +16,7 @@ description: messages.editInlineBotMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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| diff --git a/old_docs/API_docs_v73/methods/messages_editMessage.md b/old_docs/API_docs_v73/methods/messages_editMessage.md index b97fe1c6..6953a15f 100644 --- a/old_docs/API_docs_v73/methods/messages_editMessage.md +++ b/old_docs/API_docs_v73/methods/messages_editMessage.md @@ -17,7 +17,7 @@ description: messages.editMessage parameters, return type and example |message|[CLICK ME string](../types/string.md) | Optional| |reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.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| diff --git a/old_docs/API_docs_v73/methods/messages_forwardMessages.md b/old_docs/API_docs_v73/methods/messages_forwardMessages.md index 9f67e471..11dfd921 100644 --- a/old_docs/API_docs_v73/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v73/methods/messages_forwardMessages.md @@ -1,22 +1,24 @@ --- title: messages.forwardMessages -description: messages.forwardMessages parameters, return type and example +description: Forward messages --- ## Method: messages.forwardMessages [Back to methods index](index.md) +Forward messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|with\_my\_score|[CLICK ME Bool](../types/Bool.md) | Optional| -|grouped|[CLICK ME Bool](../types/Bool.md) | Optional| -|from\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|id|Array of [CLICK ME int](../types/int.md) | Yes| -|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications| +|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|Set to true if forwarding albums| +|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|The message IDs| +|to\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to forward the messages| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v73/methods/messages_getChats.md b/old_docs/API_docs_v73/methods/messages_getChats.md index d55b5e0d..290438a1 100644 --- a/old_docs/API_docs_v73/methods/messages_getChats.md +++ b/old_docs/API_docs_v73/methods/messages_getChats.md @@ -1,16 +1,18 @@ --- title: messages.getChats -description: messages.getChats parameters, return type and example +description: Get info about chats --- ## Method: messages.getChats [Back to methods index](index.md) +Get info about chats + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|id|Array of [CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v73/methods/messages_getDhConfig.md b/old_docs/API_docs_v73/methods/messages_getDhConfig.md index 685e24ba..7f0cdf5e 100644 --- a/old_docs/API_docs_v73/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v73/methods/messages_getDhConfig.md @@ -1,71 +1,13 @@ --- 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 [Back to methods index](index.md) -### Parameters: - -| 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 +**You cannot use this method directly, instead use $MadelineProto->get_dh_config();** -Or, if you're into Lua: - -``` -messages_DhConfig = messages.getDhConfig({version=int, random_length=int, }) -``` - diff --git a/old_docs/API_docs_v73/methods/messages_getDialogs.md b/old_docs/API_docs_v73/methods/messages_getDialogs.md index 34bc4c30..e100228b 100644 --- a/old_docs/API_docs_v73/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v73/methods/messages_getDialogs.md @@ -1,20 +1,22 @@ --- 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 [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: -| Name | Type | Required | -|----------|---------------|----------| -|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|limit|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|exclude\_pinned|[CLICK ME Bool](../types/Bool.md) | Optional|Do not fetch pinned chats| +|offset\_date|[CLICK ME int](../types/int.md) | Yes|end($res['messages'])['date'];| +|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|end($res['dialogs'])['peer'];| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of dialogs to fetch| ### Return type: [messages\_Dialogs](../types/messages_Dialogs.md) diff --git a/old_docs/API_docs_v73/methods/messages_getHistory.md b/old_docs/API_docs_v73/methods/messages_getHistory.md index b145426a..687ab6a8 100644 --- a/old_docs/API_docs_v73/methods/messages_getHistory.md +++ b/old_docs/API_docs_v73/methods/messages_getHistory.md @@ -1,23 +1,25 @@ --- title: messages.getHistory -description: messages.getHistory parameters, return type and example +description: Get previous messages of a group --- ## Method: messages.getHistory [Back to methods index](index.md) +Get previous messages of a group + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|offset\_date|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| -|hash|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat| +|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|The date of the last previously fetched message, initially 0| +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of messages to fetch| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to fetch| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message ID to fetch| +|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) diff --git a/old_docs/API_docs_v73/methods/messages_getPeerSettings.md b/old_docs/API_docs_v73/methods/messages_getPeerSettings.md index c269edac..f1f2a3bb 100644 --- a/old_docs/API_docs_v73/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v73/methods/messages_getPeerSettings.md @@ -1,16 +1,18 @@ --- title: messages.getPeerSettings -description: messages.getPeerSettings parameters, return type and example +description: Get the settings of apeer --- ## Method: messages.getPeerSettings [Back to methods index](index.md) +Get the settings of apeer + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer| ### Return type: [PeerSettings](../types/PeerSettings.md) diff --git a/old_docs/API_docs_v73/methods/messages_hideReportSpam.md b/old_docs/API_docs_v73/methods/messages_hideReportSpam.md index 2cca8302..856770cb 100644 --- a/old_docs/API_docs_v73/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v73/methods/messages_hideReportSpam.md @@ -1,16 +1,18 @@ --- title: messages.hideReportSpam -description: messages.hideReportSpam parameters, return type and example +description: Hide report spam popup --- ## Method: messages.hideReportSpam [Back to methods index](index.md) +Hide report spam popup + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to hide the popup| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v73/methods/messages_readHistory.md b/old_docs/API_docs_v73/methods/messages_readHistory.md index 7dfad39b..3de17061 100644 --- a/old_docs/API_docs_v73/methods/messages_readHistory.md +++ b/old_docs/API_docs_v73/methods/messages_readHistory.md @@ -1,17 +1,19 @@ --- title: messages.readHistory -description: messages.readHistory parameters, return type and example +description: Mark messages as read --- ## Method: messages.readHistory [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Maximum message ID to mark as read| ### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md) diff --git a/old_docs/API_docs_v73/methods/messages_receivedMessages.md b/old_docs/API_docs_v73/methods/messages_receivedMessages.md index 5baae5db..7aab635f 100644 --- a/old_docs/API_docs_v73/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v73/methods/messages_receivedMessages.md @@ -1,16 +1,18 @@ --- title: messages.receivedMessages -description: messages.receivedMessages parameters, return type and example +description: Mark messages as read --- ## Method: messages.receivedMessages [Back to methods index](index.md) +Mark messages as read + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|max\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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) diff --git a/old_docs/API_docs_v73/methods/messages_reportSpam.md b/old_docs/API_docs_v73/methods/messages_reportSpam.md index e53bdafa..2e2b1177 100644 --- a/old_docs/API_docs_v73/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v73/methods/messages_reportSpam.md @@ -1,16 +1,18 @@ --- title: messages.reportSpam -description: messages.reportSpam parameters, return type and example +description: Report a peer for spam --- ## Method: messages.reportSpam [Back to methods index](index.md) +Report a peer for spam + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v73/methods/messages_saveDraft.md b/old_docs/API_docs_v73/methods/messages_saveDraft.md index e1bcb5d5..9104df33 100644 --- a/old_docs/API_docs_v73/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v73/methods/messages_saveDraft.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| |message|[CLICK ME string](../types/string.md) | Yes| |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) diff --git a/old_docs/API_docs_v73/methods/messages_search.md b/old_docs/API_docs_v73/methods/messages_search.md index 67178dac..9cab5783 100644 --- a/old_docs/API_docs_v73/methods/messages_search.md +++ b/old_docs/API_docs_v73/methods/messages_search.md @@ -1,26 +1,28 @@ --- title: messages.search -description: messages.search parameters, return type and example +description: Search peers or messages --- ## Method: messages.search [Back to methods index](index.md) +Search peers or messages + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|q|[CLICK ME string](../types/string.md) | Yes| -|from\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional| -|filter|[CLICK ME MessagesFilter](../types/MessagesFilter.md) | Yes| -|min\_date|[CLICK ME int](../types/int.md) | Yes| -|max\_date|[CLICK ME int](../types/int.md) | Yes| -|offset\_id|[CLICK ME int](../types/int.md) | Yes| -|add\_offset|[CLICK ME int](../types/int.md) | Yes| -|limit|[CLICK ME int](../types/int.md) | Yes| -|max\_id|[CLICK ME int](../types/int.md) | Yes| -|min\_id|[CLICK ME int](../types/int.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to search| +|q|[CLICK ME string](../types/string.md) | Yes|What to search| +|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|Message filter| +|min\_date|[CLICK ME int](../types/int.md) | Yes|Minumum date of results to fetch| +|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 | +|add\_offset|[CLICK ME int](../types/int.md) | Yes|Additional offset, can be 0| +|limit|[CLICK ME int](../types/int.md) | Yes|Number of results to return| +|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id to return| +|min\_id|[CLICK ME int](../types/int.md) | Yes|Minumum message id to return| ### Return type: [messages\_Messages](../types/messages_Messages.md) diff --git a/old_docs/API_docs_v73/methods/messages_sendMedia.md b/old_docs/API_docs_v73/methods/messages_sendMedia.md index c915b3af..0b5cf9b6 100644 --- a/old_docs/API_docs_v73/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v73/methods/messages_sendMedia.md @@ -1,22 +1,24 @@ --- title: messages.sendMedia -description: messages.sendMedia parameters, return type and example +description: Send a media --- ## Method: messages.sendMedia [Back to methods index](index.md) +Send a media + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|media|[MessageMedia, Update, Message or InputMedia](../types/InputMedia.md) | Optional| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|Where to send the media| +|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|The media to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v73/methods/messages_sendMessage.md b/old_docs/API_docs_v73/methods/messages_sendMessage.md index c1b218a0..c4dc8894 100644 --- a/old_docs/API_docs_v73/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v73/methods/messages_sendMessage.md @@ -1,25 +1,27 @@ --- title: messages.sendMessage -description: messages.sendMessage parameters, return type and example +description: Send a message --- ## Method: messages.sendMessage [Back to methods index](index.md) +Send a message + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional| -|silent|[CLICK ME Bool](../types/Bool.md) | Optional| -|background|[CLICK ME Bool](../types/Bool.md) | Optional| -|clear\_draft|[CLICK ME Bool](../types/Bool.md) | Optional| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional| -|message|[CLICK ME string](../types/string.md) | Yes| -|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional| -|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional| -|parse\_mode| [string](../types/string.md) | Optional | +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview?| +|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Disable notifications?| +|background|[CLICK ME Bool](../types/Bool.md) | Optional|Disable background notifications?| +|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|The chat where to send this message| +|reply\_to\_msg\_id|[CLICK ME int](../types/int.md) | Optional|Reply to message by ID| +|message|[CLICK ME string](../types/string.md) | Yes|The message to send| +|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|Keyboards to send| +|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|Entities to send (for styled text)| +|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| ### Return type: [Updates](../types/Updates.md) diff --git a/old_docs/API_docs_v73/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v73/methods/messages_setEncryptedTyping.md index b51295cc..3183fedf 100644 --- a/old_docs/API_docs_v73/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v73/methods/messages_setEncryptedTyping.md @@ -1,17 +1,19 @@ --- title: messages.setEncryptedTyping -description: messages.setEncryptedTyping parameters, return type and example +description: Send typing notification to secret chat --- ## Method: messages.setEncryptedTyping [Back to methods index](index.md) +Send typing notification to secret chat + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|typing|[CLICK ME Bool](../types/Bool.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | Yes|| +|typing|[CLICK ME Bool](../types/Bool.md) | Yes|| ### Return type: [Bool](../types/Bool.md) diff --git a/old_docs/API_docs_v73/methods/messages_setTyping.md b/old_docs/API_docs_v73/methods/messages_setTyping.md index f8fdd8d5..bea4982b 100644 --- a/old_docs/API_docs_v73/methods/messages_setTyping.md +++ b/old_docs/API_docs_v73/methods/messages_setTyping.md @@ -1,17 +1,19 @@ --- title: messages.setTyping -description: messages.setTyping parameters, return type and example +description: Change typing status --- ## Method: messages.setTyping [Back to methods index](index.md) +Change typing status + ### Parameters: -| Name | Type | Required | -|----------|---------------|----------| -|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional| -|action|[CLICK ME SendMessageAction](../types/SendMessageAction.md) | Yes| +| Name | Type | Required | Description | +|----------|---------------|----------|-------------| +|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|Typing status| ### Return type: [Bool](../types/Bool.md) diff --git a/src/danog/MadelineProto/DocsBuilder/Methods.php b/src/danog/MadelineProto/DocsBuilder/Methods.php index 5c0d4aa6..2ea3b30c 100644 --- a/src/danog/MadelineProto/DocsBuilder/Methods.php +++ b/src/danog/MadelineProto/DocsBuilder/Methods.php @@ -153,7 +153,7 @@ trait Methods } if ($param['name'] === 'entities') { $hasentities = true; - $table .= '|parse\\_mode| [string](../types/string.md) | Optional | + $table .= '|parse\\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message| '; $params .= "'parse_mode' => 'string', "; $lua_params .= "parse_mode='string', "; diff --git a/src/danog/MadelineProto/Lang.php b/src/danog/MadelineProto/Lang.php index cd7a4306..ef92768f 100644 --- a/src/danog/MadelineProto/Lang.php +++ b/src/danog/MadelineProto/Lang.php @@ -507,112 +507,112 @@ class Lang 'method_contacts.getTopPeers_param_channels_type_true' => 'Fetch channels and supergroups?', 'method_contacts.getTopPeers_param_offset_type_int' => 'Initially 0, then `$offset += $contacts_TopPeers[\'categories\'][\'count\'];`', 'method_contacts.getTopPeers_param_limit_type_int' => 'How many results to fetch', - 'method_contacts.getTopPeers_param_hash_type_int' => '', + 'method_contacts.getTopPeers_param_hash_type_int' => '$MadelineProto->gen_vector_hash(previously fetched peer ids);', 'method_contacts.resetTopPeerRating' => 'Reset top peer rating for a certain category/peer', 'method_contacts.resetTopPeerRating_param_category_type_TopPeerCategory' => 'The category ', 'method_contacts.resetTopPeerRating_param_peer_type_InputPeer' => 'The peer', - 'method_contacts.resetSaved' => '', + 'method_contacts.resetSaved' => 'Reset saved contacts', 'method_messages.getMessages' => 'Get messages', 'method_messages.getMessages_param_id_type_Vector t' => 'The IDs of messages to fetch (only for users and normal groups)', - 'method_messages.getDialogs' => '', - 'method_messages.getDialogs_param_exclude_pinned_type_true' => '', - 'method_messages.getDialogs_param_offset_date_type_int' => '', - 'method_messages.getDialogs_param_offset_id_type_int' => '', - 'method_messages.getDialogs_param_offset_peer_type_InputPeer' => '', - 'method_messages.getDialogs_param_limit_type_int' => '', - 'method_messages.getHistory' => '', - 'method_messages.getHistory_param_peer_type_InputPeer' => '', - 'method_messages.getHistory_param_offset_id_type_int' => '', - 'method_messages.getHistory_param_offset_date_type_int' => '', - 'method_messages.getHistory_param_add_offset_type_int' => '', - 'method_messages.getHistory_param_limit_type_int' => '', - 'method_messages.getHistory_param_max_id_type_int' => '', - 'method_messages.getHistory_param_min_id_type_int' => '', - 'method_messages.getHistory_param_hash_type_int' => '', - 'method_messages.search' => '', - 'method_messages.search_param_peer_type_InputPeer' => '', - 'method_messages.search_param_q_type_string' => '', - 'method_messages.search_param_from_id_type_InputUser' => '', - 'method_messages.search_param_filter_type_MessagesFilter' => '', - 'method_messages.search_param_min_date_type_int' => '', - 'method_messages.search_param_max_date_type_int' => '', - 'method_messages.search_param_offset_id_type_int' => '', - 'method_messages.search_param_add_offset_type_int' => '', - 'method_messages.search_param_limit_type_int' => '', - 'method_messages.search_param_max_id_type_int' => '', - 'method_messages.search_param_min_id_type_int' => '', - 'method_messages.readHistory' => '', - 'method_messages.readHistory_param_peer_type_InputPeer' => '', - 'method_messages.readHistory_param_max_id_type_int' => '', - 'method_messages.deleteHistory' => '', - 'method_messages.deleteHistory_param_just_clear_type_true' => '', - 'method_messages.deleteHistory_param_peer_type_InputPeer' => '', - 'method_messages.deleteHistory_param_max_id_type_int' => '', - 'method_messages.deleteMessages' => '', - 'method_messages.deleteMessages_param_revoke_type_true' => '', - 'method_messages.deleteMessages_param_id_type_Vector t' => '', - 'method_messages.receivedMessages' => '', - 'method_messages.receivedMessages_param_max_id_type_int' => '', - 'method_messages.setTyping' => '', - 'method_messages.setTyping_param_peer_type_InputPeer' => '', - 'method_messages.setTyping_param_action_type_SendMessageAction' => '', - 'method_messages.sendMessage' => '', - 'method_messages.sendMessage_param_no_webpage_type_true' => '', - 'method_messages.sendMessage_param_silent_type_true' => '', - 'method_messages.sendMessage_param_background_type_true' => '', - 'method_messages.sendMessage_param_clear_draft_type_true' => '', - 'method_messages.sendMessage_param_peer_type_InputPeer' => '', - 'method_messages.sendMessage_param_reply_to_msg_id_type_int' => '', - 'method_messages.sendMessage_param_message_type_string' => '', - 'method_messages.sendMessage_param_reply_markup_type_ReplyMarkup' => '', - 'method_messages.sendMessage_param_entities_type_Vector t' => '', - 'method_messages.sendMedia' => '', - 'method_messages.sendMedia_param_silent_type_true' => '', - 'method_messages.sendMedia_param_background_type_true' => '', - 'method_messages.sendMedia_param_clear_draft_type_true' => '', - 'method_messages.sendMedia_param_peer_type_InputPeer' => '', - 'method_messages.sendMedia_param_reply_to_msg_id_type_int' => '', - 'method_messages.sendMedia_param_media_type_InputMedia' => '', - 'method_messages.sendMedia_param_message_type_string' => '', - 'method_messages.sendMedia_param_reply_markup_type_ReplyMarkup' => '', - 'method_messages.sendMedia_param_entities_type_Vector t' => '', - 'method_messages.forwardMessages' => '', - 'method_messages.forwardMessages_param_silent_type_true' => '', - 'method_messages.forwardMessages_param_background_type_true' => '', - 'method_messages.forwardMessages_param_with_my_score_type_true' => '', - 'method_messages.forwardMessages_param_grouped_type_true' => '', - 'method_messages.forwardMessages_param_from_peer_type_InputPeer' => '', - 'method_messages.forwardMessages_param_id_type_Vector t' => '', - 'method_messages.forwardMessages_param_to_peer_type_InputPeer' => '', - 'method_messages.reportSpam' => '', - 'method_messages.reportSpam_param_peer_type_InputPeer' => '', - 'method_messages.hideReportSpam' => '', - 'method_messages.hideReportSpam_param_peer_type_InputPeer' => '', - 'method_messages.getPeerSettings' => '', - 'method_messages.getPeerSettings_param_peer_type_InputPeer' => '', - 'method_messages.getChats' => '', - 'method_messages.getChats_param_id_type_Vector t' => '', + 'method_messages.getDialogs' => 'Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html', + 'method_messages.getDialogs_param_exclude_pinned_type_true' => 'Do not fetch pinned chats', + 'method_messages.getDialogs_param_offset_date_type_int' => 'end($res[\'messages\'])[\'date\'];', + 'method_messages.getDialogs_param_offset_id_type_int' => 'end($res[\'messages\'])[\'id\'];', + 'method_messages.getDialogs_param_offset_peer_type_InputPeer' => 'end($res[\'dialogs\'])[\'peer\'];', + 'method_messages.getDialogs_param_limit_type_int' => 'Number of dialogs to fetch', + 'method_messages.getHistory' => 'Get previous messages of a group', + 'method_messages.getHistory_param_peer_type_InputPeer' => 'The chat', + 'method_messages.getHistory_param_offset_id_type_int' => 'The last fetched message ID, initially 0', + 'method_messages.getHistory_param_offset_date_type_int' => 'The date of the last previously fetched message, initially 0', + 'method_messages.getHistory_param_add_offset_type_int' => 'Additional offset, can be 0', + 'method_messages.getHistory_param_limit_type_int' => 'Number of messages to fetch', + 'method_messages.getHistory_param_max_id_type_int' => 'Maximum message ID to fetch', + 'method_messages.getHistory_param_min_id_type_int' => 'Minumum message ID to fetch', + 'method_messages.getHistory_param_hash_type_int' => 'hash of old messages, $MadelineProto->gen_vector_hash($parsedMessageIds)', + 'method_messages.search' => 'Search peers or messages', + 'method_messages.search_param_peer_type_InputPeer' => 'Where to search', + 'method_messages.search_param_q_type_string' => 'What to search', + 'method_messages.search_param_from_id_type_InputUser' => 'Show only messages from a certain user?', + 'method_messages.search_param_filter_type_MessagesFilter' => 'Message filter', + 'method_messages.search_param_min_date_type_int' => 'Minumum date of results to fetch', + 'method_messages.search_param_max_date_type_int' => 'Maximum date of results to fetch', + 'method_messages.search_param_offset_id_type_int' => 'Offset ', + 'method_messages.search_param_add_offset_type_int' => 'Additional offset, can be 0', + 'method_messages.search_param_limit_type_int' => 'Number of results to return', + 'method_messages.search_param_max_id_type_int' => 'Maximum message id to return', + 'method_messages.search_param_min_id_type_int' => 'Minumum message id to return', + 'method_messages.readHistory' => 'Mark messages as read', + 'method_messages.readHistory_param_peer_type_InputPeer' => 'Where to mark messages as read', + 'method_messages.readHistory_param_max_id_type_int' => 'Maximum message ID to mark as read', + 'method_messages.deleteHistory' => 'Delete chat history', + 'method_messages.deleteHistory_param_just_clear_type_true' => 'Only clear it from your side', + 'method_messages.deleteHistory_param_peer_type_InputPeer' => 'Where to clear it', + 'method_messages.deleteHistory_param_max_id_type_int' => 'Maximum message id of messages to delete', + 'method_messages.deleteMessages' => 'Delete messages', + 'method_messages.deleteMessages_param_revoke_type_true' => 'Delete the messages for everyone?', + 'method_messages.deleteMessages_param_id_type_Vector t' => 'IDs of messages to delete, use channels->deleteMessages for supergroups', + 'method_messages.receivedMessages' => 'Mark messages as read', + 'method_messages.receivedMessages_param_max_id_type_int' => 'Maximum message id of messages to mark as read', + 'method_messages.setTyping' => 'Change typing status', + 'method_messages.setTyping_param_peer_type_InputPeer' => 'Where to change typing status', + 'method_messages.setTyping_param_action_type_SendMessageAction' => 'Typing status', + 'method_messages.sendMessage' => 'Send a message', + 'method_messages.sendMessage_param_no_webpage_type_true' => 'Disable webpage preview?', + 'method_messages.sendMessage_param_silent_type_true' => 'Disable notifications?', + 'method_messages.sendMessage_param_background_type_true' => 'Disable background notifications?', + 'method_messages.sendMessage_param_clear_draft_type_true' => 'Clear the message draft of this chat?', + 'method_messages.sendMessage_param_peer_type_InputPeer' => 'The chat where to send this message', + 'method_messages.sendMessage_param_reply_to_msg_id_type_int' => 'Reply to message by ID', + 'method_messages.sendMessage_param_message_type_string' => 'The message to send', + 'method_messages.sendMessage_param_reply_markup_type_ReplyMarkup' => 'Keyboards to send', + 'method_messages.sendMessage_param_entities_type_Vector t' => 'Entities to send (for styled text)', + 'method_messages.sendMedia' => 'Send a media', + 'method_messages.sendMedia_param_silent_type_true' => 'Disable notifications?', + 'method_messages.sendMedia_param_background_type_true' => 'Disable background notifications?', + 'method_messages.sendMedia_param_clear_draft_type_true' => 'Clear the message draft of this chat?', + 'method_messages.sendMedia_param_peer_type_InputPeer' => 'Where to send the media', + 'method_messages.sendMedia_param_reply_to_msg_id_type_int' => 'Reply to message by ID', + 'method_messages.sendMedia_param_media_type_InputMedia' => 'The media to send', + 'method_messages.sendMedia_param_message_type_string' => 'The caption', + 'method_messages.sendMedia_param_reply_markup_type_ReplyMarkup' => 'Keyboards to send', + 'method_messages.sendMedia_param_entities_type_Vector t' => 'Entities for styled text', + 'method_messages.forwardMessages' => 'Forward messages', + 'method_messages.forwardMessages_param_silent_type_true' => 'Disable notifications', + 'method_messages.forwardMessages_param_background_type_true' => 'Disable background notifications', + 'method_messages.forwardMessages_param_with_my_score_type_true' => 'If forwarding a game, forward your score, too', + 'method_messages.forwardMessages_param_grouped_type_true' => 'Set to true if forwarding albums', + 'method_messages.forwardMessages_param_from_peer_type_InputPeer' => 'From where to forward the messages', + 'method_messages.forwardMessages_param_id_type_Vector t' => 'The message IDs', + 'method_messages.forwardMessages_param_to_peer_type_InputPeer' => 'Where to forward the messages', + 'method_messages.reportSpam' => 'Report a peer for spam', + 'method_messages.reportSpam_param_peer_type_InputPeer' => 'The peer to report', + 'method_messages.hideReportSpam' => 'Hide report spam popup', + 'method_messages.hideReportSpam_param_peer_type_InputPeer' => 'Where to hide the popup', + 'method_messages.getPeerSettings' => 'Get the settings of apeer', + 'method_messages.getPeerSettings_param_peer_type_InputPeer' => 'The peer', + 'method_messages.getChats' => 'Get info about chats', + 'method_messages.getChats_param_id_type_Vector t' => 'The MTProto IDs of chats to fetch info about', 'method_messages.getFullChat' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'method_messages.getFullChat_param_chat_id_type_InputPeer' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', - 'method_messages.editChatTitle' => '', - 'method_messages.editChatTitle_param_chat_id_type_InputPeer' => '', - 'method_messages.editChatTitle_param_title_type_string' => '', - 'method_messages.editChatPhoto' => '', - 'method_messages.editChatPhoto_param_chat_id_type_InputPeer' => '', - 'method_messages.editChatPhoto_param_photo_type_InputChatPhoto' => '', - 'method_messages.addChatUser' => '', - 'method_messages.addChatUser_param_chat_id_type_InputPeer' => '', - 'method_messages.addChatUser_param_user_id_type_InputUser' => '', - 'method_messages.addChatUser_param_fwd_limit_type_int' => '', - 'method_messages.deleteChatUser' => '', - 'method_messages.deleteChatUser_param_chat_id_type_InputPeer' => '', - 'method_messages.deleteChatUser_param_user_id_type_InputUser' => '', - 'method_messages.createChat' => '', - 'method_messages.createChat_param_users_type_Vector t' => '', - 'method_messages.createChat_param_title_type_string' => '', - 'method_messages.getDhConfig' => '', - 'method_messages.getDhConfig_param_version_type_int' => '', - 'method_messages.getDhConfig_param_random_length_type_int' => '', + 'method_messages.editChatTitle' => 'Edit the title of a normal chat (not supergroup)', + 'method_messages.editChatTitle_param_chat_id_type_InputPeer' => 'The MTProto ID of the chat', + 'method_messages.editChatTitle_param_title_type_string' => 'The new title', + 'method_messages.editChatPhoto' => 'Edit the photo of a normal chat (not supergroup)', + 'method_messages.editChatPhoto_param_chat_id_type_InputPeer' => 'The MTProto ID of the chat', + 'method_messages.editChatPhoto_param_photo_type_InputChatPhoto' => 'The new phto', + 'method_messages.addChatUser' => 'Add a user to a normal chat (use channels->inviteToChannel for supergroups)', + 'method_messages.addChatUser_param_chat_id_type_InputPeer' => 'The chat where to invite users', + 'method_messages.addChatUser_param_user_id_type_InputUser' => 'The user to invite', + 'method_messages.addChatUser_param_fwd_limit_type_int' => 'Number of old messages the user will see', + 'method_messages.deleteChatUser' => 'Delete a user from a chat (not supergroup)', + 'method_messages.deleteChatUser_param_chat_id_type_InputPeer' => 'The MTProto ID of the chat', + 'method_messages.deleteChatUser_param_user_id_type_InputUser' => 'The user to delete (pass @me to leave the chat)', + 'method_messages.createChat' => 'Create a chat (not supergroup)', + 'method_messages.createChat_param_users_type_Vector t' => 'The users to add to the chat', + 'method_messages.createChat_param_title_type_string' => 'The new chat\'s title', + 'method_messages.getDhConfig' => 'You cannot use this method directly, instead use $MadelineProto->get_dh_config();', + 'method_messages.getDhConfig_param_version_type_int' => 'You cannot use this method directly, instead use $MadelineProto->get_dh_config();', + 'method_messages.getDhConfig_param_random_length_type_int' => 'You cannot use this method directly, instead use $MadelineProto->get_dh_config();', 'method_messages.requestEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'method_messages.requestEncryption_param_user_id_type_InputUser' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'method_messages.requestEncryption_param_g_a_type_bytes' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', @@ -622,7 +622,7 @@ class Lang 'method_messages.acceptEncryption_param_key_fingerprint_type_long' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'method_messages.discardEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'method_messages.discardEncryption_param_chat_id_type_int' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', - 'method_messages.setEncryptedTyping' => '', + 'method_messages.setEncryptedTyping' => 'Send typing notification to secret chat', 'method_messages.setEncryptedTyping_param_peer_type_InputEncryptedChat' => '', 'method_messages.setEncryptedTyping_param_typing_type_Bool' => '', 'method_messages.readEncryptedHistory' => '', @@ -4461,112 +4461,112 @@ class Lang 'method_contacts.getTopPeers_param_channels_type_true' => 'Fetch channels and supergroups?', 'method_contacts.getTopPeers_param_offset_type_int' => 'Initially 0, then `$offset += $contacts_TopPeers[\'categories\'][\'count\'];`', 'method_contacts.getTopPeers_param_limit_type_int' => 'How many results to fetch', - 'method_contacts.getTopPeers_param_hash_type_int' => '', + 'method_contacts.getTopPeers_param_hash_type_int' => '$MadelineProto->gen_vector_hash(previously fetched peer ids);', 'method_contacts.resetTopPeerRating' => 'Reset top peer rating for a certain category/peer', 'method_contacts.resetTopPeerRating_param_category_type_TopPeerCategory' => 'The category ', 'method_contacts.resetTopPeerRating_param_peer_type_InputPeer' => 'The peer', - 'method_contacts.resetSaved' => '', + 'method_contacts.resetSaved' => 'Reset saved contacts', 'method_messages.getMessages' => 'Get messages', 'method_messages.getMessages_param_id_type_Vector t' => 'The IDs of messages to fetch (only for users and normal groups)', - 'method_messages.getDialogs' => '', - 'method_messages.getDialogs_param_exclude_pinned_type_true' => '', - 'method_messages.getDialogs_param_offset_date_type_int' => '', - 'method_messages.getDialogs_param_offset_id_type_int' => '', - 'method_messages.getDialogs_param_offset_peer_type_InputPeer' => '', - 'method_messages.getDialogs_param_limit_type_int' => '', - 'method_messages.getHistory' => '', - 'method_messages.getHistory_param_peer_type_InputPeer' => '', - 'method_messages.getHistory_param_offset_id_type_int' => '', - 'method_messages.getHistory_param_offset_date_type_int' => '', - 'method_messages.getHistory_param_add_offset_type_int' => '', - 'method_messages.getHistory_param_limit_type_int' => '', - 'method_messages.getHistory_param_max_id_type_int' => '', - 'method_messages.getHistory_param_min_id_type_int' => '', - 'method_messages.getHistory_param_hash_type_int' => '', - 'method_messages.search' => '', - 'method_messages.search_param_peer_type_InputPeer' => '', - 'method_messages.search_param_q_type_string' => '', - 'method_messages.search_param_from_id_type_InputUser' => '', - 'method_messages.search_param_filter_type_MessagesFilter' => '', - 'method_messages.search_param_min_date_type_int' => '', - 'method_messages.search_param_max_date_type_int' => '', - 'method_messages.search_param_offset_id_type_int' => '', - 'method_messages.search_param_add_offset_type_int' => '', - 'method_messages.search_param_limit_type_int' => '', - 'method_messages.search_param_max_id_type_int' => '', - 'method_messages.search_param_min_id_type_int' => '', - 'method_messages.readHistory' => '', - 'method_messages.readHistory_param_peer_type_InputPeer' => '', - 'method_messages.readHistory_param_max_id_type_int' => '', - 'method_messages.deleteHistory' => '', - 'method_messages.deleteHistory_param_just_clear_type_true' => '', - 'method_messages.deleteHistory_param_peer_type_InputPeer' => '', - 'method_messages.deleteHistory_param_max_id_type_int' => '', - 'method_messages.deleteMessages' => '', - 'method_messages.deleteMessages_param_revoke_type_true' => '', - 'method_messages.deleteMessages_param_id_type_Vector t' => '', - 'method_messages.receivedMessages' => '', - 'method_messages.receivedMessages_param_max_id_type_int' => '', - 'method_messages.setTyping' => '', - 'method_messages.setTyping_param_peer_type_InputPeer' => '', - 'method_messages.setTyping_param_action_type_SendMessageAction' => '', - 'method_messages.sendMessage' => '', - 'method_messages.sendMessage_param_no_webpage_type_true' => '', - 'method_messages.sendMessage_param_silent_type_true' => '', - 'method_messages.sendMessage_param_background_type_true' => '', - 'method_messages.sendMessage_param_clear_draft_type_true' => '', - 'method_messages.sendMessage_param_peer_type_InputPeer' => '', - 'method_messages.sendMessage_param_reply_to_msg_id_type_int' => '', - 'method_messages.sendMessage_param_message_type_string' => '', - 'method_messages.sendMessage_param_reply_markup_type_ReplyMarkup' => '', - 'method_messages.sendMessage_param_entities_type_Vector t' => '', - 'method_messages.sendMedia' => '', - 'method_messages.sendMedia_param_silent_type_true' => '', - 'method_messages.sendMedia_param_background_type_true' => '', - 'method_messages.sendMedia_param_clear_draft_type_true' => '', - 'method_messages.sendMedia_param_peer_type_InputPeer' => '', - 'method_messages.sendMedia_param_reply_to_msg_id_type_int' => '', - 'method_messages.sendMedia_param_media_type_InputMedia' => '', - 'method_messages.sendMedia_param_message_type_string' => '', - 'method_messages.sendMedia_param_reply_markup_type_ReplyMarkup' => '', - 'method_messages.sendMedia_param_entities_type_Vector t' => '', - 'method_messages.forwardMessages' => '', - 'method_messages.forwardMessages_param_silent_type_true' => '', - 'method_messages.forwardMessages_param_background_type_true' => '', - 'method_messages.forwardMessages_param_with_my_score_type_true' => '', - 'method_messages.forwardMessages_param_grouped_type_true' => '', - 'method_messages.forwardMessages_param_from_peer_type_InputPeer' => '', - 'method_messages.forwardMessages_param_id_type_Vector t' => '', - 'method_messages.forwardMessages_param_to_peer_type_InputPeer' => '', - 'method_messages.reportSpam' => '', - 'method_messages.reportSpam_param_peer_type_InputPeer' => '', - 'method_messages.hideReportSpam' => '', - 'method_messages.hideReportSpam_param_peer_type_InputPeer' => '', - 'method_messages.getPeerSettings' => '', - 'method_messages.getPeerSettings_param_peer_type_InputPeer' => '', - 'method_messages.getChats' => '', - 'method_messages.getChats_param_id_type_Vector t' => '', + 'method_messages.getDialogs' => 'Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html', + 'method_messages.getDialogs_param_exclude_pinned_type_true' => 'Do not fetch pinned chats', + 'method_messages.getDialogs_param_offset_date_type_int' => 'end($res[\'messages\'])[\'date\'];', + 'method_messages.getDialogs_param_offset_id_type_int' => 'end($res[\'messages\'])[\'id\'];', + 'method_messages.getDialogs_param_offset_peer_type_InputPeer' => 'end($res[\'dialogs\'])[\'peer\'];', + 'method_messages.getDialogs_param_limit_type_int' => 'Number of dialogs to fetch', + 'method_messages.getHistory' => 'Get previous messages of a group', + 'method_messages.getHistory_param_peer_type_InputPeer' => 'The chat', + 'method_messages.getHistory_param_offset_id_type_int' => 'The last fetched message ID, initially 0', + 'method_messages.getHistory_param_offset_date_type_int' => 'The date of the last previously fetched message, initially 0', + 'method_messages.getHistory_param_add_offset_type_int' => 'Additional offset, can be 0', + 'method_messages.getHistory_param_limit_type_int' => 'Number of messages to fetch', + 'method_messages.getHistory_param_max_id_type_int' => 'Maximum message ID to fetch', + 'method_messages.getHistory_param_min_id_type_int' => 'Minumum message ID to fetch', + 'method_messages.getHistory_param_hash_type_int' => 'hash of old messages, $MadelineProto->gen_vector_hash($parsedMessageIds)', + 'method_messages.search' => 'Search peers or messages', + 'method_messages.search_param_peer_type_InputPeer' => 'Where to search', + 'method_messages.search_param_q_type_string' => 'What to search', + 'method_messages.search_param_from_id_type_InputUser' => 'Show only messages from a certain user?', + 'method_messages.search_param_filter_type_MessagesFilter' => 'Message filter', + 'method_messages.search_param_min_date_type_int' => 'Minumum date of results to fetch', + 'method_messages.search_param_max_date_type_int' => 'Maximum date of results to fetch', + 'method_messages.search_param_offset_id_type_int' => 'Offset ', + 'method_messages.search_param_add_offset_type_int' => 'Additional offset, can be 0', + 'method_messages.search_param_limit_type_int' => 'Number of results to return', + 'method_messages.search_param_max_id_type_int' => 'Maximum message id to return', + 'method_messages.search_param_min_id_type_int' => 'Minumum message id to return', + 'method_messages.readHistory' => 'Mark messages as read', + 'method_messages.readHistory_param_peer_type_InputPeer' => 'Where to mark messages as read', + 'method_messages.readHistory_param_max_id_type_int' => 'Maximum message ID to mark as read', + 'method_messages.deleteHistory' => 'Delete chat history', + 'method_messages.deleteHistory_param_just_clear_type_true' => 'Only clear it from your side', + 'method_messages.deleteHistory_param_peer_type_InputPeer' => 'Where to clear it', + 'method_messages.deleteHistory_param_max_id_type_int' => 'Maximum message id of messages to delete', + 'method_messages.deleteMessages' => 'Delete messages', + 'method_messages.deleteMessages_param_revoke_type_true' => 'Delete the messages for everyone?', + 'method_messages.deleteMessages_param_id_type_Vector t' => 'IDs of messages to delete, use channels->deleteMessages for supergroups', + 'method_messages.receivedMessages' => 'Mark messages as read', + 'method_messages.receivedMessages_param_max_id_type_int' => 'Maximum message id of messages to mark as read', + 'method_messages.setTyping' => 'Change typing status', + 'method_messages.setTyping_param_peer_type_InputPeer' => 'Where to change typing status', + 'method_messages.setTyping_param_action_type_SendMessageAction' => 'Typing status', + 'method_messages.sendMessage' => 'Send a message', + 'method_messages.sendMessage_param_no_webpage_type_true' => 'Disable webpage preview?', + 'method_messages.sendMessage_param_silent_type_true' => 'Disable notifications?', + 'method_messages.sendMessage_param_background_type_true' => 'Disable background notifications?', + 'method_messages.sendMessage_param_clear_draft_type_true' => 'Clear the message draft of this chat?', + 'method_messages.sendMessage_param_peer_type_InputPeer' => 'The chat where to send this message', + 'method_messages.sendMessage_param_reply_to_msg_id_type_int' => 'Reply to message by ID', + 'method_messages.sendMessage_param_message_type_string' => 'The message to send', + 'method_messages.sendMessage_param_reply_markup_type_ReplyMarkup' => 'Keyboards to send', + 'method_messages.sendMessage_param_entities_type_Vector t' => 'Entities to send (for styled text)', + 'method_messages.sendMedia' => 'Send a media', + 'method_messages.sendMedia_param_silent_type_true' => 'Disable notifications?', + 'method_messages.sendMedia_param_background_type_true' => 'Disable background notifications?', + 'method_messages.sendMedia_param_clear_draft_type_true' => 'Clear the message draft of this chat?', + 'method_messages.sendMedia_param_peer_type_InputPeer' => 'Where to send the media', + 'method_messages.sendMedia_param_reply_to_msg_id_type_int' => 'Reply to message by ID', + 'method_messages.sendMedia_param_media_type_InputMedia' => 'The media to send', + 'method_messages.sendMedia_param_message_type_string' => 'The caption', + 'method_messages.sendMedia_param_reply_markup_type_ReplyMarkup' => 'Keyboards to send', + 'method_messages.sendMedia_param_entities_type_Vector t' => 'Entities for styled text', + 'method_messages.forwardMessages' => 'Forward messages', + 'method_messages.forwardMessages_param_silent_type_true' => 'Disable notifications', + 'method_messages.forwardMessages_param_background_type_true' => 'Disable background notifications', + 'method_messages.forwardMessages_param_with_my_score_type_true' => 'If forwarding a game, forward your score, too', + 'method_messages.forwardMessages_param_grouped_type_true' => 'Set to true if forwarding albums', + 'method_messages.forwardMessages_param_from_peer_type_InputPeer' => 'From where to forward the messages', + 'method_messages.forwardMessages_param_id_type_Vector t' => 'The message IDs', + 'method_messages.forwardMessages_param_to_peer_type_InputPeer' => 'Where to forward the messages', + 'method_messages.reportSpam' => 'Report a peer for spam', + 'method_messages.reportSpam_param_peer_type_InputPeer' => 'The peer to report', + 'method_messages.hideReportSpam' => 'Hide report spam popup', + 'method_messages.hideReportSpam_param_peer_type_InputPeer' => 'Where to hide the popup', + 'method_messages.getPeerSettings' => 'Get the settings of apeer', + 'method_messages.getPeerSettings_param_peer_type_InputPeer' => 'The peer', + 'method_messages.getChats' => 'Get info about chats', + 'method_messages.getChats_param_id_type_Vector t' => 'The MTProto IDs of chats to fetch info about', 'method_messages.getFullChat' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'method_messages.getFullChat_param_chat_id_type_InputPeer' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', - 'method_messages.editChatTitle' => '', - 'method_messages.editChatTitle_param_chat_id_type_InputPeer' => '', - 'method_messages.editChatTitle_param_title_type_string' => '', - 'method_messages.editChatPhoto' => '', - 'method_messages.editChatPhoto_param_chat_id_type_InputPeer' => '', - 'method_messages.editChatPhoto_param_photo_type_InputChatPhoto' => '', - 'method_messages.addChatUser' => '', - 'method_messages.addChatUser_param_chat_id_type_InputPeer' => '', - 'method_messages.addChatUser_param_user_id_type_InputUser' => '', - 'method_messages.addChatUser_param_fwd_limit_type_int' => '', - 'method_messages.deleteChatUser' => '', - 'method_messages.deleteChatUser_param_chat_id_type_InputPeer' => '', - 'method_messages.deleteChatUser_param_user_id_type_InputUser' => '', - 'method_messages.createChat' => '', - 'method_messages.createChat_param_users_type_Vector t' => '', - 'method_messages.createChat_param_title_type_string' => '', - 'method_messages.getDhConfig' => '', - 'method_messages.getDhConfig_param_version_type_int' => '', - 'method_messages.getDhConfig_param_random_length_type_int' => '', + 'method_messages.editChatTitle' => 'Edit the title of a normal chat (not supergroup)', + 'method_messages.editChatTitle_param_chat_id_type_InputPeer' => 'The MTProto ID of the chat', + 'method_messages.editChatTitle_param_title_type_string' => 'The new title', + 'method_messages.editChatPhoto' => 'Edit the photo of a normal chat (not supergroup)', + 'method_messages.editChatPhoto_param_chat_id_type_InputPeer' => 'The MTProto ID of the chat', + 'method_messages.editChatPhoto_param_photo_type_InputChatPhoto' => 'The new phto', + 'method_messages.addChatUser' => 'Add a user to a normal chat (use channels->inviteToChannel for supergroups)', + 'method_messages.addChatUser_param_chat_id_type_InputPeer' => 'The chat where to invite users', + 'method_messages.addChatUser_param_user_id_type_InputUser' => 'The user to invite', + 'method_messages.addChatUser_param_fwd_limit_type_int' => 'Number of old messages the user will see', + 'method_messages.deleteChatUser' => 'Delete a user from a chat (not supergroup)', + 'method_messages.deleteChatUser_param_chat_id_type_InputPeer' => 'The MTProto ID of the chat', + 'method_messages.deleteChatUser_param_user_id_type_InputUser' => 'The user to delete (pass @me to leave the chat)', + 'method_messages.createChat' => 'Create a chat (not supergroup)', + 'method_messages.createChat_param_users_type_Vector t' => 'The users to add to the chat', + 'method_messages.createChat_param_title_type_string' => 'The new chat\'s title', + 'method_messages.getDhConfig' => 'You cannot use this method directly, instead use $MadelineProto->get_dh_config();', + 'method_messages.getDhConfig_param_version_type_int' => 'You cannot use this method directly, instead use $MadelineProto->get_dh_config();', + 'method_messages.getDhConfig_param_random_length_type_int' => 'You cannot use this method directly, instead use $MadelineProto->get_dh_config();', 'method_messages.requestEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'method_messages.requestEncryption_param_user_id_type_InputUser' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'method_messages.requestEncryption_param_g_a_type_bytes' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', @@ -4576,7 +4576,7 @@ class Lang 'method_messages.acceptEncryption_param_key_fingerprint_type_long' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'method_messages.discardEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'method_messages.discardEncryption_param_chat_id_type_int' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', - 'method_messages.setEncryptedTyping' => '', + 'method_messages.setEncryptedTyping' => 'Send typing notification to secret chat', 'method_messages.setEncryptedTyping_param_peer_type_InputEncryptedChat' => '', 'method_messages.setEncryptedTyping_param_typing_type_Bool' => '', 'method_messages.readEncryptedHistory' => '', diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index b4989786..75cbfce5 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -60,7 +60,7 @@ class MTProto const WAITING_SIGNUP = -1; const WAITING_PASSWORD = 2; const LOGGED_IN = 3; - const DISALLOWED_METHODS = ['auth.bindTempAuthKey' => 'You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info', 'auth.exportAuthorization' => 'You cannot use this method directly, use $MadelineProto->export_authorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.importAuthorization' => 'You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.logOut' => 'You cannot use this method directly, use the logout method instead (see https://docs.madelineproto.xyz for more info)', 'auth.importBotAuthorization' => 'You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.sendCode' => 'You cannot use this method directly, use the phone_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signIn' => 'You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info)','auth.checkPassword' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signUp' => 'You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)', 'users.getFullUser' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'channels.getFullChannel' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.getFullChat' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'contacts.resolveUsername' => 'You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.acceptEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.discardEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.requestEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'phone.requestCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.acceptCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.confirmCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.discardCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'updates.getChannelDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getState' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'upload.getCdnFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getCdnFileHashes' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.reuploadCdnFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveFilePart' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveBigFilePart' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info']; + const DISALLOWED_METHODS = ['messages.getDhConfig' => 'You cannot use this method directly, instead use $MadelineProto->get_dh_config();', 'auth.bindTempAuthKey' => 'You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info', 'auth.exportAuthorization' => 'You cannot use this method directly, use $MadelineProto->export_authorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.importAuthorization' => 'You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.logOut' => 'You cannot use this method directly, use the logout method instead (see https://docs.madelineproto.xyz for more info)', 'auth.importBotAuthorization' => 'You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.sendCode' => 'You cannot use this method directly, use the phone_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signIn' => 'You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info)','auth.checkPassword' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signUp' => 'You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)', 'users.getFullUser' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'channels.getFullChannel' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.getFullChat' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'contacts.resolveUsername' => 'You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.acceptEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.discardEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.requestEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'phone.requestCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.acceptCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.confirmCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.discardCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'updates.getChannelDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getState' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'upload.getCdnFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getCdnFileHashes' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.reuploadCdnFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveFilePart' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveBigFilePart' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info']; const BAD_MSG_ERROR_CODES = [16 => 'msg_id too low (most likely, client time is wrong; it would be worthwhile to synchronize it using msg_id notifications and re-send the original message with the “correct” msg_id or wrap it in a container with a new msg_id if the original message had waited too long on the client to be transmitted)', 17 => 'msg_id too high (similar to the previous case, the client time has to be synchronized, and the message re-sent with the correct msg_id)', 18 => 'incorrect two lower order msg_id bits (the server expects client message msg_id to be divisible by 4)', 19 => 'container msg_id is the same as msg_id of a previously received message (this must never happen)', 20 => 'message too old, and it cannot be verified whether the server has received a message with this msg_id or not', 32 => 'msg_seqno too low (the server has already received a message with a lower msg_id but with either a higher or an equal and odd seqno)', 33 => 'msg_seqno too high (similarly, there is a message with a higher msg_id but with either a lower or an equal and odd seqno)', 34 => 'an even msg_seqno expected (irrelevant message), but odd received', 35 => 'odd msg_seqno expected (relevant message), but even received', 48 => 'incorrect server salt (in this case, the bad_server_salt response is received with the correct salt, and the message is to be re-sent with it)', 64 => 'invalid container.']; const MSGS_INFO_FLAGS = [1 => 'nothing is known about the message (msg_id too low, the other party may have forgotten it)', 2 => 'message not received (msg_id falls within the range of stored identifiers; however, the other party has certainly not received a message like that)', 3 => 'message not received (msg_id too high; however, the other party has certainly not received it yet)', 4 => 'message received (note that this response is also at the same time a receipt acknowledgment)', 8 => ' and message already acknowledged', 16 => ' and message not requiring acknowledgment', 32 => ' and RPC query contained in message being processed or processing already complete', 64 => ' and content-related response to message already generated', 128 => ' and other party knows for a fact that message is already received']; const REQUESTED = 0;