{-# LANGUAGE TypeOperators #-} -- | TD API functions (methods) generated by tdlib-gen module TDLib.Generated.Functions where import Polysemy import TDLib.Effect import TDLib.Generated.FunArgs import TDLib.Generated.Types import TDLib.Types.Common -- | Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state getAuthorizationState :: Member TDLib r => GetAuthorizationState -> Sem r (Error ∪ AuthorizationState) getAuthorizationState = runCmd -- | Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters setTdlibParameters :: Member TDLib r => SetTdlibParameters -> Sem r (Error ∪ Ok) setTdlibParameters = runCmd -- | Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey checkDatabaseEncryptionKey :: Member TDLib r => CheckDatabaseEncryptionKey -> Sem r (Error ∪ Ok) checkDatabaseEncryptionKey = runCmd -- | Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, setAuthenticationPhoneNumber :: Member TDLib r => SetAuthenticationPhoneNumber -> Sem r (Error ∪ Ok) setAuthenticationPhoneNumber = runCmd -- | Re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode and the next_code_type of the result is not null resendAuthenticationCode :: Member TDLib r => ResendAuthenticationCode -> Sem r (Error ∪ Ok) resendAuthenticationCode = runCmd -- | Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode checkAuthenticationCode :: Member TDLib r => CheckAuthenticationCode -> Sem r (Error ∪ Ok) checkAuthenticationCode = runCmd -- | Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber requestQrCodeAuthentication :: Member TDLib r => RequestQrCodeAuthentication -> Sem r (Error ∪ Ok) requestQrCodeAuthentication = runCmd -- | Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration registerUser :: Member TDLib r => RegisterUser -> Sem r (Error ∪ Ok) registerUser = runCmd -- | Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword checkAuthenticationPassword :: Member TDLib r => CheckAuthenticationPassword -> Sem r (Error ∪ Ok) checkAuthenticationPassword = runCmd -- | Requests to send a password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword requestAuthenticationPasswordRecovery :: Member TDLib r => RequestAuthenticationPasswordRecovery -> Sem r (Error ∪ Ok) requestAuthenticationPasswordRecovery = runCmd -- | Recovers the password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword recoverAuthenticationPassword :: Member TDLib r => RecoverAuthenticationPassword -> Sem r (Error ∪ Ok) recoverAuthenticationPassword = runCmd -- | Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in checkAuthenticationBotToken :: Member TDLib r => CheckAuthenticationBotToken -> Sem r (Error ∪ Ok) checkAuthenticationBotToken = runCmd -- | Closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent logOut :: Member TDLib r => LogOut -> Sem r (Error ∪ Ok) logOut = runCmd -- | Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent close :: Member TDLib r => Close -> Sem r (Error ∪ Ok) close = runCmd -- | Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent destroy :: Member TDLib r => Destroy -> Sem r (Error ∪ Ok) destroy = runCmd -- | Confirms QR code authentication on another device. Returns created session on success confirmQrCodeAuthentication :: Member TDLib r => ConfirmQrCodeAuthentication -> Sem r (Error ∪ Session) confirmQrCodeAuthentication = runCmd -- | Returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationState/UpdateUser/UpdateNewChat and others. This is especially useful if TDLib is run in a separate process. This is an offline method. Can be called before authorization getCurrentState :: Member TDLib r => GetCurrentState -> Sem r (Error ∪ Updates) getCurrentState = runCmd -- | Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain setDatabaseEncryptionKey :: Member TDLib r => SetDatabaseEncryptionKey -> Sem r (Error ∪ Ok) setDatabaseEncryptionKey = runCmd -- | Returns the current state of 2-step verification getPasswordState :: Member TDLib r => GetPasswordState -> Sem r (Error ∪ PasswordState) getPasswordState = runCmd -- | Changes the password for the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed setPassword :: Member TDLib r => SetPassword -> Sem r (Error ∪ PasswordState) setPassword = runCmd -- | Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user getRecoveryEmailAddress :: Member TDLib r => GetRecoveryEmailAddress -> Sem r (Error ∪ RecoveryEmailAddress) getRecoveryEmailAddress = runCmd -- | Changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. setRecoveryEmailAddress :: Member TDLib r => SetRecoveryEmailAddress -> Sem r (Error ∪ PasswordState) setRecoveryEmailAddress = runCmd -- | Checks the 2-step verification recovery email address verification code checkRecoveryEmailAddressCode :: Member TDLib r => CheckRecoveryEmailAddressCode -> Sem r (Error ∪ PasswordState) checkRecoveryEmailAddressCode = runCmd -- | Resends the 2-step verification recovery email address verification code resendRecoveryEmailAddressCode :: Member TDLib r => ResendRecoveryEmailAddressCode -> Sem r (Error ∪ PasswordState) resendRecoveryEmailAddressCode = runCmd -- | Requests to send a password recovery code to an email address that was previously set up requestPasswordRecovery :: Member TDLib r => RequestPasswordRecovery -> Sem r (Error ∪ EmailAddressAuthenticationCodeInfo) requestPasswordRecovery = runCmd -- | Recovers the password using a recovery code sent to an email address that was previously set up recoverPassword :: Member TDLib r => RecoverPassword -> Sem r (Error ∪ PasswordState) recoverPassword = runCmd -- | Creates a new temporary password for processing payments createTemporaryPassword :: Member TDLib r => CreateTemporaryPassword -> Sem r (Error ∪ TemporaryPasswordState) createTemporaryPassword = runCmd -- | Returns information about the current temporary password getTemporaryPasswordState :: Member TDLib r => GetTemporaryPasswordState -> Sem r (Error ∪ TemporaryPasswordState) getTemporaryPasswordState = runCmd -- | Returns the current user getMe :: Member TDLib r => GetMe -> Sem r (Error ∪ User) getMe = runCmd -- | Returns information about a user by their identifier. This is an offline request if the current user is not a bot getUser :: Member TDLib r => GetUser -> Sem r (Error ∪ User) getUser = runCmd -- | Returns full information about a user by their identifier getUserFullInfo :: Member TDLib r => GetUserFullInfo -> Sem r (Error ∪ UserFullInfo) getUserFullInfo = runCmd -- | Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot getBasicGroup :: Member TDLib r => GetBasicGroup -> Sem r (Error ∪ BasicGroup) getBasicGroup = runCmd -- | Returns full information about a basic group by its identifier getBasicGroupFullInfo :: Member TDLib r => GetBasicGroupFullInfo -> Sem r (Error ∪ BasicGroupFullInfo) getBasicGroupFullInfo = runCmd -- | Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot getSupergroup :: Member TDLib r => GetSupergroup -> Sem r (Error ∪ Supergroup) getSupergroup = runCmd -- | Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute getSupergroupFullInfo :: Member TDLib r => GetSupergroupFullInfo -> Sem r (Error ∪ SupergroupFullInfo) getSupergroupFullInfo = runCmd -- | Returns information about a secret chat by its identifier. This is an offline request getSecretChat :: Member TDLib r => GetSecretChat -> Sem r (Error ∪ SecretChat) getSecretChat = runCmd -- | Returns information about a chat by its identifier, this is an offline request if the current user is not a bot getChat :: Member TDLib r => GetChat -> Sem r (Error ∪ Chat) getChat = runCmd -- | Returns information about a message getMessage :: Member TDLib r => GetMessage -> Sem r (Error ∪ Message) getMessage = runCmd -- | Returns information about a message, if it is available locally without sending network request. This is an offline request getMessageLocally :: Member TDLib r => GetMessageLocally -> Sem r (Error ∪ Message) getMessageLocally = runCmd -- | Returns information about a message that is replied by given message getRepliedMessage :: Member TDLib r => GetRepliedMessage -> Sem r (Error ∪ Message) getRepliedMessage = runCmd -- | Returns information about a pinned chat message getChatPinnedMessage :: Member TDLib r => GetChatPinnedMessage -> Sem r (Error ∪ Message) getChatPinnedMessage = runCmd -- | Returns information about messages. If a message is not found, returns null on the corresponding position of the result getMessages :: Member TDLib r => GetMessages -> Sem r (Error ∪ Messages) getMessages = runCmd -- | Returns information about a file; this is an offline request getFile :: Member TDLib r => GetFile -> Sem r (Error ∪ File) getFile = runCmd -- | Returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. getRemoteFile :: Member TDLib r => GetRemoteFile -> Sem r (Error ∪ File) getRemoteFile = runCmd -- | Returns an ordered list of chats in a chat list. Chats are sorted by the pair (order, chat_id) in decreasing order. (For example, to get a list of chats from the beginning, the offset_order should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1). getChats :: Member TDLib r => GetChats -> Sem r (Error ∪ Chats) getChats = runCmd -- | Searches a public chat by its username. Currently only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned searchPublicChat :: Member TDLib r => SearchPublicChat -> Sem r (Error ∪ Chat) searchPublicChat = runCmd -- | Searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Returns nothing if the length of the searched username prefix is less than 5. Excludes private chats with contacts and chats from the chat list from the results searchPublicChats :: Member TDLib r => SearchPublicChats -> Sem r (Error ∪ Chats) searchPublicChats = runCmd -- | Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the chat list searchChats :: Member TDLib r => SearchChats -> Sem r (Error ∪ Chats) searchChats = runCmd -- | Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the chat list searchChatsOnServer :: Member TDLib r => SearchChatsOnServer -> Sem r (Error ∪ Chats) searchChatsOnServer = runCmd -- | Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request should be sent again every 25 seconds with adjusted location to not miss new chats searchChatsNearby :: Member TDLib r => SearchChatsNearby -> Sem r (Error ∪ ChatsNearby) searchChatsNearby = runCmd -- | Returns a list of frequently used chats. Supported only if the chat info database is enabled getTopChats :: Member TDLib r => GetTopChats -> Sem r (Error ∪ Chats) getTopChats = runCmd -- | Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled removeTopChat :: Member TDLib r => RemoveTopChat -> Sem r (Error ∪ Ok) removeTopChat = runCmd -- | Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first addRecentlyFoundChat :: Member TDLib r => AddRecentlyFoundChat -> Sem r (Error ∪ Ok) addRecentlyFoundChat = runCmd -- | Removes a chat from the list of recently found chats removeRecentlyFoundChat :: Member TDLib r => RemoveRecentlyFoundChat -> Sem r (Error ∪ Ok) removeRecentlyFoundChat = runCmd -- | Clears the list of recently found chats clearRecentlyFoundChats :: Member TDLib r => ClearRecentlyFoundChats -> Sem r (Error ∪ Ok) clearRecentlyFoundChats = runCmd -- | Checks whether a username can be set for a chat checkChatUsername :: Member TDLib r => CheckChatUsername -> Sem r (Error ∪ CheckChatUsernameResult) checkChatUsername = runCmd -- | Returns a list of public chats of the specified type, owned by the user getCreatedPublicChats :: Member TDLib r => GetCreatedPublicChats -> Sem r (Error ∪ Chats) getCreatedPublicChats = runCmd -- | Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached checkCreatedPublicChatsLimit :: Member TDLib r => CheckCreatedPublicChatsLimit -> Sem r (Error ∪ Ok) checkCreatedPublicChatsLimit = runCmd -- | Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Basic group chats need to be first upgraded to supergroups before they can be set as a discussion group getSuitableDiscussionChats :: Member TDLib r => GetSuitableDiscussionChats -> Sem r (Error ∪ Chats) getSuitableDiscussionChats = runCmd -- | Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error getInactiveSupergroupChats :: Member TDLib r => GetInactiveSupergroupChats -> Sem r (Error ∪ Chats) getInactiveSupergroupChats = runCmd -- | Returns a list of common group chats with a given user. Chats are sorted by their type and creation date getGroupsInCommon :: Member TDLib r => GetGroupsInCommon -> Sem r (Error ∪ Chats) getGroupsInCommon = runCmd -- | Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). getChatHistory :: Member TDLib r => GetChatHistory -> Sem r (Error ∪ Messages) getChatHistory = runCmd -- | Deletes all messages in the chat. Use Chat.can_be_deleted_only_for_self and Chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat deleteChatHistory :: Member TDLib r => DeleteChatHistory -> Sem r (Error ∪ Ok) deleteChatHistory = runCmd -- | Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query searchChatMessages :: Member TDLib r => SearchChatMessages -> Sem r (Error ∪ Messages) searchChatMessages = runCmd -- | Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). searchMessages :: Member TDLib r => SearchMessages -> Sem r (Error ∪ Messages) searchMessages = runCmd -- | Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance the number of returned messages is chosen by the library searchSecretMessages :: Member TDLib r => SearchSecretMessages -> Sem r (Error ∪ FoundMessages) searchSecretMessages = runCmd -- | Searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing message_id). For optimal performance the number of returned messages is chosen by the library searchCallMessages :: Member TDLib r => SearchCallMessages -> Sem r (Error ∪ Messages) searchCallMessages = runCmd -- | Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user searchChatRecentLocationMessages :: Member TDLib r => SearchChatRecentLocationMessages -> Sem r (Error ∪ Messages) searchChatRecentLocationMessages = runCmd -- | Returns all active live locations that should be updated by the client. The list is persistent across application restarts only if the message database is used getActiveLiveLocationMessages :: Member TDLib r => GetActiveLiveLocationMessages -> Sem r (Error ∪ Messages) getActiveLiveLocationMessages = runCmd -- | Returns the last message sent in a chat no later than the specified date getChatMessageByDate :: Member TDLib r => GetChatMessageByDate -> Sem r (Error ∪ Message) getChatMessageByDate = runCmd -- | Returns approximate number of messages of the specified type in the chat getChatMessageCount :: Member TDLib r => GetChatMessageCount -> Sem r (Error ∪ Count) getChatMessageCount = runCmd -- | Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id) getChatScheduledMessages :: Member TDLib r => GetChatScheduledMessages -> Sem r (Error ∪ Messages) getChatScheduledMessages = runCmd -- | Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user removeNotification :: Member TDLib r => RemoveNotification -> Sem r (Error ∪ Ok) removeNotification = runCmd -- | Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user removeNotificationGroup :: Member TDLib r => RemoveNotificationGroup -> Sem r (Error ∪ Ok) removeNotificationGroup = runCmd -- | Returns a public HTTPS link to a message. Available only for messages in supergroups and channels with a username getPublicMessageLink :: Member TDLib r => GetPublicMessageLink -> Sem r (Error ∪ PublicMessageLink) getPublicMessageLink = runCmd -- | Returns a private HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels. The link will work only for members of the chat getMessageLink :: Member TDLib r => GetMessageLink -> Sem r (Error ∪ HttpUrl) getMessageLink = runCmd -- | Returns information about a public or private message link getMessageLinkInfo :: Member TDLib r => GetMessageLinkInfo -> Sem r (Error ∪ MessageLinkInfo) getMessageLinkInfo = runCmd -- | Sends a message. Returns the sent message sendMessage :: Member TDLib r => SendMessage -> Sem r (Error ∪ Message) sendMessage = runCmd -- | Sends messages grouped together into an album. Currently only photo and video messages can be grouped into an album. Returns sent messages sendMessageAlbum :: Member TDLib r => SendMessageAlbum -> Sem r (Error ∪ Messages) sendMessageAlbum = runCmd -- | Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message sendBotStartMessage :: Member TDLib r => SendBotStartMessage -> Sem r (Error ∪ Message) sendBotStartMessage = runCmd -- | Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message sendInlineQueryResultMessage :: Member TDLib r => SendInlineQueryResultMessage -> Sem r (Error ∪ Message) sendInlineQueryResultMessage = runCmd -- | Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message forwardMessages :: Member TDLib r => ForwardMessages -> Sem r (Error ∪ Messages) forwardMessages = runCmd -- | Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. resendMessages :: Member TDLib r => ResendMessages -> Sem r (Error ∪ Messages) resendMessages = runCmd -- | Changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message sendChatSetTtlMessage :: Member TDLib r => SendChatSetTtlMessage -> Sem r (Error ∪ Message) sendChatSetTtlMessage = runCmd -- | Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats sendChatScreenshotTakenNotification :: Member TDLib r => SendChatScreenshotTakenNotification -> Sem r (Error ∪ Ok) sendChatScreenshotTakenNotification = runCmd -- | Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message addLocalMessage :: Member TDLib r => AddLocalMessage -> Sem r (Error ∪ Message) addLocalMessage = runCmd -- | Deletes messages deleteMessages :: Member TDLib r => DeleteMessages -> Sem r (Error ∪ Ok) deleteMessages = runCmd -- | Deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires can_delete_messages administrator privileges deleteChatMessagesFromUser :: Member TDLib r => DeleteChatMessagesFromUser -> Sem r (Error ∪ Ok) deleteChatMessagesFromUser = runCmd -- | Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side editMessageText :: Member TDLib r => EditMessageText -> Sem r (Error ∪ Message) editMessageText = runCmd -- | Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side editMessageLiveLocation :: Member TDLib r => EditMessageLiveLocation -> Sem r (Error ∪ Message) editMessageLiveLocation = runCmd -- | Edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side editMessageMedia :: Member TDLib r => EditMessageMedia -> Sem r (Error ∪ Message) editMessageMedia = runCmd -- | Edits the message content caption. Returns the edited message after the edit is completed on the server side editMessageCaption :: Member TDLib r => EditMessageCaption -> Sem r (Error ∪ Message) editMessageCaption = runCmd -- | Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side editMessageReplyMarkup :: Member TDLib r => EditMessageReplyMarkup -> Sem r (Error ∪ Message) editMessageReplyMarkup = runCmd -- | Edits the text of an inline text or game message sent via a bot; for bots only editInlineMessageText :: Member TDLib r => EditInlineMessageText -> Sem r (Error ∪ Ok) editInlineMessageText = runCmd -- | Edits the content of a live location in an inline message sent via a bot; for bots only editInlineMessageLiveLocation :: Member TDLib r => EditInlineMessageLiveLocation -> Sem r (Error ∪ Ok) editInlineMessageLiveLocation = runCmd -- | Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only editInlineMessageMedia :: Member TDLib r => EditInlineMessageMedia -> Sem r (Error ∪ Ok) editInlineMessageMedia = runCmd -- | Edits the caption of an inline message sent via a bot; for bots only editInlineMessageCaption :: Member TDLib r => EditInlineMessageCaption -> Sem r (Error ∪ Ok) editInlineMessageCaption = runCmd -- | Edits the reply markup of an inline message sent via a bot; for bots only editInlineMessageReplyMarkup :: Member TDLib r => EditInlineMessageReplyMarkup -> Sem r (Error ∪ Ok) editInlineMessageReplyMarkup = runCmd -- | Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed editMessageSchedulingState :: Member TDLib r => EditMessageSchedulingState -> Sem r (Error ∪ Ok) editMessageSchedulingState = runCmd -- | Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. This is an offline method. Can be called before authorization. Can be called synchronously getTextEntities :: Member TDLib r => GetTextEntities -> Sem r (Error ∪ TextEntities) getTextEntities = runCmd -- | Parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. This is an offline method. Can be called before authorization. Can be called synchronously parseTextEntities :: Member TDLib r => ParseTextEntities -> Sem r (Error ∪ FormattedText) parseTextEntities = runCmd -- | Parses Markdown entities in a human-friendly format, ignoring mark up errors. This is an offline method. Can be called before authorization. Can be called synchronously parseMarkdown :: Member TDLib r => ParseMarkdown -> Sem r (Error ∪ FormattedText) parseMarkdown = runCmd -- | Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. This is an offline method. Can be called before authorization. Can be called synchronously getMarkdownText :: Member TDLib r => GetMarkdownText -> Sem r (Error ∪ FormattedText) getMarkdownText = runCmd -- | Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously getFileMimeType :: Member TDLib r => GetFileMimeType -> Sem r (Error ∪ Text) getFileMimeType = runCmd -- | Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously getFileExtension :: Member TDLib r => GetFileExtension -> Sem r (Error ∪ Text) getFileExtension = runCmd -- | Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously cleanFileName :: Member TDLib r => CleanFileName -> Sem r (Error ∪ Text) cleanFileName = runCmd -- | Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. This is an offline method. Can be called before authorization. Can be called synchronously getLanguagePackString :: Member TDLib r => GetLanguagePackString -> Sem r (Error ∪ LanguagePackStringValue) getLanguagePackString = runCmd -- | Converts a JSON-serialized string to corresponding JsonValue object. This is an offline method. Can be called before authorization. Can be called synchronously getJsonValue :: Member TDLib r => GetJsonValue -> Sem r (Error ∪ JsonValue) getJsonValue = runCmd -- | Converts a JsonValue object to corresponding JSON-serialized string. This is an offline method. Can be called before authorization. Can be called synchronously getJsonString :: Member TDLib r => GetJsonString -> Sem r (Error ∪ Text) getJsonString = runCmd -- | Changes the user answer to a poll. A poll in quiz mode can be answered only once setPollAnswer :: Member TDLib r => SetPollAnswer -> Sem r (Error ∪ Ok) setPollAnswer = runCmd -- | Returns users voted for the specified option in a non-anonymous polls. For the optimal performance the number of returned users is chosen by the library getPollVoters :: Member TDLib r => GetPollVoters -> Sem r (Error ∪ Users) getPollVoters = runCmd -- | Stops a poll. A poll in a message can be stopped when the message has can_be_edited flag set stopPoll :: Member TDLib r => StopPoll -> Sem r (Error ∪ Ok) stopPoll = runCmd -- | Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button getLoginUrlInfo :: Member TDLib r => GetLoginUrlInfo -> Sem r (Error ∪ LoginUrlInfo) getLoginUrlInfo = runCmd -- | Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. getLoginUrl :: Member TDLib r => GetLoginUrl -> Sem r (Error ∪ HttpUrl) getLoginUrl = runCmd -- | Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires getInlineQueryResults :: Member TDLib r => GetInlineQueryResults -> Sem r (Error ∪ InlineQueryResults) getInlineQueryResults = runCmd -- | Sets the result of an inline query; for bots only answerInlineQuery :: Member TDLib r => AnswerInlineQuery -> Sem r (Error ∪ Ok) answerInlineQuery = runCmd -- | Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires getCallbackQueryAnswer :: Member TDLib r => GetCallbackQueryAnswer -> Sem r (Error ∪ CallbackQueryAnswer) getCallbackQueryAnswer = runCmd -- | Sets the result of a callback query; for bots only answerCallbackQuery :: Member TDLib r => AnswerCallbackQuery -> Sem r (Error ∪ Ok) answerCallbackQuery = runCmd -- | Sets the result of a shipping query; for bots only answerShippingQuery :: Member TDLib r => AnswerShippingQuery -> Sem r (Error ∪ Ok) answerShippingQuery = runCmd -- | Sets the result of a pre-checkout query; for bots only answerPreCheckoutQuery :: Member TDLib r => AnswerPreCheckoutQuery -> Sem r (Error ∪ Ok) answerPreCheckoutQuery = runCmd -- | Updates the game score of the specified user in the game; for bots only setGameScore :: Member TDLib r => SetGameScore -> Sem r (Error ∪ Message) setGameScore = runCmd -- | Updates the game score of the specified user in a game; for bots only setInlineGameScore :: Member TDLib r => SetInlineGameScore -> Sem r (Error ∪ Ok) setInlineGameScore = runCmd -- | Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only getGameHighScores :: Member TDLib r => GetGameHighScores -> Sem r (Error ∪ GameHighScores) getGameHighScores = runCmd -- | Returns game high scores and some part of the high score table in the range of the specified user; for bots only getInlineGameHighScores :: Member TDLib r => GetInlineGameHighScores -> Sem r (Error ∪ GameHighScores) getInlineGameHighScores = runCmd -- | Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup will be changed deleteChatReplyMarkup :: Member TDLib r => DeleteChatReplyMarkup -> Sem r (Error ∪ Ok) deleteChatReplyMarkup = runCmd -- | Sends a notification about user activity in a chat sendChatAction :: Member TDLib r => SendChatAction -> Sem r (Error ∪ Ok) sendChatAction = runCmd -- | Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats) openChat :: Member TDLib r => OpenChat -> Sem r (Error ∪ Ok) openChat = runCmd -- | Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed closeChat :: Member TDLib r => CloseChat -> Sem r (Error ∪ Ok) closeChat = runCmd -- | Informs TDLib that messages are being viewed by the user. Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels) viewMessages :: Member TDLib r => ViewMessages -> Sem r (Error ∪ Ok) viewMessages = runCmd -- | Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed openMessageContent :: Member TDLib r => OpenMessageContent -> Sem r (Error ∪ Ok) openMessageContent = runCmd -- | Marks all mentions in a chat as read readAllChatMentions :: Member TDLib r => ReadAllChatMentions -> Sem r (Error ∪ Ok) readAllChatMentions = runCmd -- | Returns an existing chat corresponding to a given user createPrivateChat :: Member TDLib r => CreatePrivateChat -> Sem r (Error ∪ Chat) createPrivateChat = runCmd -- | Returns an existing chat corresponding to a known basic group createBasicGroupChat :: Member TDLib r => CreateBasicGroupChat -> Sem r (Error ∪ Chat) createBasicGroupChat = runCmd -- | Returns an existing chat corresponding to a known supergroup or channel createSupergroupChat :: Member TDLib r => CreateSupergroupChat -> Sem r (Error ∪ Chat) createSupergroupChat = runCmd -- | Returns an existing chat corresponding to a known secret chat createSecretChat :: Member TDLib r => CreateSecretChat -> Sem r (Error ∪ Chat) createSecretChat = runCmd -- | Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat createNewBasicGroupChat :: Member TDLib r => CreateNewBasicGroupChat -> Sem r (Error ∪ Chat) createNewBasicGroupChat = runCmd -- | Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat createNewSupergroupChat :: Member TDLib r => CreateNewSupergroupChat -> Sem r (Error ∪ Chat) createNewSupergroupChat = runCmd -- | Creates a new secret chat. Returns the newly created chat createNewSecretChat :: Member TDLib r => CreateNewSecretChat -> Sem r (Error ∪ Chat) createNewSecretChat = runCmd -- | Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group upgradeBasicGroupChatToSupergroupChat :: Member TDLib r => UpgradeBasicGroupChatToSupergroupChat -> Sem r (Error ∪ Chat) upgradeBasicGroupChatToSupergroupChat = runCmd -- | Moves a chat to a different chat list. Current chat list of the chat must ne non-null setChatChatList :: Member TDLib r => SetChatChatList -> Sem r (Error ∪ Ok) setChatChatList = runCmd -- | Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info rights. The title will not be changed until the request to the server has been completed setChatTitle :: Member TDLib r => SetChatTitle -> Sem r (Error ∪ Ok) setChatTitle = runCmd -- | Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info rights. The photo will not be changed before request to the server has been completed setChatPhoto :: Member TDLib r => SetChatPhoto -> Sem r (Error ∪ Ok) setChatPhoto = runCmd -- | Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right setChatPermissions :: Member TDLib r => SetChatPermissions -> Sem r (Error ∪ Ok) setChatPermissions = runCmd -- | Changes the draft message in a chat setChatDraftMessage :: Member TDLib r => SetChatDraftMessage -> Sem r (Error ∪ Ok) setChatDraftMessage = runCmd -- | Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed setChatNotificationSettings :: Member TDLib r => SetChatNotificationSettings -> Sem r (Error ∪ Ok) setChatNotificationSettings = runCmd -- | Changes the pinned state of a chat. You can pin up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") non-secret chats and the same number of secret chats in the main/archive chat list toggleChatIsPinned :: Member TDLib r => ToggleChatIsPinned -> Sem r (Error ∪ Ok) toggleChatIsPinned = runCmd -- | Changes the marked as unread state of a chat toggleChatIsMarkedAsUnread :: Member TDLib r => ToggleChatIsMarkedAsUnread -> Sem r (Error ∪ Ok) toggleChatIsMarkedAsUnread = runCmd -- | Changes the value of the default disable_notification parameter, used when a message is sent to a chat toggleChatDefaultDisableNotification :: Member TDLib r => ToggleChatDefaultDisableNotification -> Sem r (Error ∪ Ok) toggleChatDefaultDisableNotification = runCmd -- | Changes client data associated with a chat setChatClientData :: Member TDLib r => SetChatClientData -> Sem r (Error ∪ Ok) setChatClientData = runCmd -- | Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info rights setChatDescription :: Member TDLib r => SetChatDescription -> Sem r (Error ∪ Ok) setChatDescription = runCmd -- | Changes the discussion group of a channel chat; requires can_change_info rights in the channel if it is specified setChatDiscussionGroup :: Member TDLib r => SetChatDiscussionGroup -> Sem r (Error ∪ Ok) setChatDiscussionGroup = runCmd -- | Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use setChatLocation :: Member TDLib r => SetChatLocation -> Sem r (Error ∪ Ok) setChatLocation = runCmd -- | Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights setChatSlowModeDelay :: Member TDLib r => SetChatSlowModeDelay -> Sem r (Error ∪ Ok) setChatSlowModeDelay = runCmd -- | Pins a message in a chat; requires can_pin_messages rights pinChatMessage :: Member TDLib r => PinChatMessage -> Sem r (Error ∪ Ok) pinChatMessage = runCmd -- | Removes the pinned message from a chat; requires can_pin_messages rights in the group or channel unpinChatMessage :: Member TDLib r => UnpinChatMessage -> Sem r (Error ∪ Ok) unpinChatMessage = runCmd -- | Adds current user as a new member to a chat. Private and secret chats can't be joined using this method joinChat :: Member TDLib r => JoinChat -> Sem r (Error ∪ Ok) joinChat = runCmd -- | Removes current user from chat members. Private and secret chats can't be left using this method leaveChat :: Member TDLib r => LeaveChat -> Sem r (Error ∪ Ok) leaveChat = runCmd -- | Adds a new member to a chat. Members can't be added to private or secret chats. Members will not be added until the chat state has been synchronized with the server addChatMember :: Member TDLib r => AddChatMember -> Sem r (Error ∪ Ok) addChatMember = runCmd -- | Adds multiple new members to a chat. Currently this option is only available for supergroups and channels. This option can't be used to join a chat. Members can't be added to a channel if it has more than 200 members. Members will not be added until the chat state has been synchronized with the server addChatMembers :: Member TDLib r => AddChatMembers -> Sem r (Error ∪ Ok) addChatMembers = runCmd -- | Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat and transferring chat ownership; instead, use addChatMember or transferChatOwnership. The chat member status will not be changed until it has been synchronized with the server setChatMemberStatus :: Member TDLib r => SetChatMemberStatus -> Sem r (Error ∪ Ok) setChatMemberStatus = runCmd -- | Checks whether the current session can be used to transfer a chat ownership to another user canTransferOwnership :: Member TDLib r => CanTransferOwnership -> Sem r (Error ∪ CanTransferOwnershipResult) canTransferOwnership = runCmd -- | Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats transferChatOwnership :: Member TDLib r => TransferChatOwnership -> Sem r (Error ∪ Ok) transferChatOwnership = runCmd -- | Returns information about a single member of a chat getChatMember :: Member TDLib r => GetChatMember -> Sem r (Error ∪ ChatMember) getChatMember = runCmd -- | Searches for a specified query in the first name, last name and username of the members of a specified chat. Requires administrator rights in channels searchChatMembers :: Member TDLib r => SearchChatMembers -> Sem r (Error ∪ ChatMembers) searchChatMembers = runCmd -- | Returns a list of administrators of the chat with their custom titles getChatAdministrators :: Member TDLib r => GetChatAdministrators -> Sem r (Error ∪ ChatAdministrators) getChatAdministrators = runCmd -- | Clears draft messages in all chats clearAllDraftMessages :: Member TDLib r => ClearAllDraftMessages -> Sem r (Error ∪ Ok) clearAllDraftMessages = runCmd -- | Returns list of chats with non-default notification settings getChatNotificationSettingsExceptions :: Member TDLib r => GetChatNotificationSettingsExceptions -> Sem r (Error ∪ Chats) getChatNotificationSettingsExceptions = runCmd -- | Returns the notification settings for chats of a given type getScopeNotificationSettings :: Member TDLib r => GetScopeNotificationSettings -> Sem r (Error ∪ ScopeNotificationSettings) getScopeNotificationSettings = runCmd -- | Changes notification settings for chats of a given type setScopeNotificationSettings :: Member TDLib r => SetScopeNotificationSettings -> Sem r (Error ∪ Ok) setScopeNotificationSettings = runCmd -- | Resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to "default" and message previews are shown resetAllNotificationSettings :: Member TDLib r => ResetAllNotificationSettings -> Sem r (Error ∪ Ok) resetAllNotificationSettings = runCmd -- | Changes the order of pinned chats setPinnedChats :: Member TDLib r => SetPinnedChats -> Sem r (Error ∪ Ok) setPinnedChats = runCmd -- | Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates downloadFile :: Member TDLib r => DownloadFile -> Sem r (Error ∪ File) downloadFile = runCmd -- | Returns file downloaded prefix size from a given offset getFileDownloadedPrefixSize :: Member TDLib r => GetFileDownloadedPrefixSize -> Sem r (Error ∪ Count) getFileDownloadedPrefixSize = runCmd -- | Stops the downloading of a file. If a file has already been downloaded, does nothing cancelDownloadFile :: Member TDLib r => CancelDownloadFile -> Sem r (Error ∪ Ok) cancelDownloadFile = runCmd -- | Asynchronously uploads a file to the cloud without sending it in a message. updateFile will be used to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it will be sent in a message uploadFile :: Member TDLib r => UploadFile -> Sem r (Error ∪ File) uploadFile = runCmd -- | Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined cancelUploadFile :: Member TDLib r => CancelUploadFile -> Sem r (Error ∪ Ok) cancelUploadFile = runCmd -- | Writes a part of a generated file. This method is intended to be used only if the client has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file writeGeneratedFilePart :: Member TDLib r => WriteGeneratedFilePart -> Sem r (Error ∪ Ok) writeGeneratedFilePart = runCmd -- | Informs TDLib on a file generation progress setFileGenerationProgress :: Member TDLib r => SetFileGenerationProgress -> Sem r (Error ∪ Ok) setFileGenerationProgress = runCmd -- | Finishes the file generation finishFileGeneration :: Member TDLib r => FinishFileGeneration -> Sem r (Error ∪ Ok) finishFileGeneration = runCmd -- | Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the client has no direct access to TDLib's file system, because it is usually slower than a direct read from the file readFilePart :: Member TDLib r => ReadFilePart -> Sem r (Error ∪ FilePart) readFilePart = runCmd -- | Deletes a file from the TDLib file cache deleteFile :: Member TDLib r => DeleteFile -> Sem r (Error ∪ Ok) deleteFile = runCmd -- | Generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right generateChatInviteLink :: Member TDLib r => GenerateChatInviteLink -> Sem r (Error ∪ ChatInviteLink) generateChatInviteLink = runCmd -- | Checks the validity of an invite link for a chat and returns information about the corresponding chat checkChatInviteLink :: Member TDLib r => CheckChatInviteLink -> Sem r (Error ∪ ChatInviteLinkInfo) checkChatInviteLink = runCmd -- | Uses an invite link to add the current user to the chat if possible. The new member will not be added until the chat state has been synchronized with the server joinChatByInviteLink :: Member TDLib r => JoinChatByInviteLink -> Sem r (Error ∪ Chat) joinChatByInviteLink = runCmd -- | Creates a new call createCall :: Member TDLib r => CreateCall -> Sem r (Error ∪ CallId) createCall = runCmd -- | Accepts an incoming call acceptCall :: Member TDLib r => AcceptCall -> Sem r (Error ∪ Ok) acceptCall = runCmd -- | Discards a call discardCall :: Member TDLib r => DiscardCall -> Sem r (Error ∪ Ok) discardCall = runCmd -- | Sends a call rating sendCallRating :: Member TDLib r => SendCallRating -> Sem r (Error ∪ Ok) sendCallRating = runCmd -- | Sends debug information for a call sendCallDebugInformation :: Member TDLib r => SendCallDebugInformation -> Sem r (Error ∪ Ok) sendCallDebugInformation = runCmd -- | Adds a user to the blacklist blockUser :: Member TDLib r => BlockUser -> Sem r (Error ∪ Ok) blockUser = runCmd -- | Removes a user from the blacklist unblockUser :: Member TDLib r => UnblockUser -> Sem r (Error ∪ Ok) unblockUser = runCmd -- | Returns users that were blocked by the current user getBlockedUsers :: Member TDLib r => GetBlockedUsers -> Sem r (Error ∪ Users) getBlockedUsers = runCmd -- | Adds a user to the contact list or edits an existing contact by their user identifier addContact :: Member TDLib r => AddContact -> Sem r (Error ∪ Ok) addContact = runCmd -- | Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored importContacts :: Member TDLib r => ImportContacts -> Sem r (Error ∪ ImportedContacts) importContacts = runCmd -- | Returns all user contacts getContacts :: Member TDLib r => GetContacts -> Sem r (Error ∪ Users) getContacts = runCmd -- | Searches for the specified query in the first names, last names and usernames of the known user contacts searchContacts :: Member TDLib r => SearchContacts -> Sem r (Error ∪ Users) searchContacts = runCmd -- | Removes users from the contact list removeContacts :: Member TDLib r => RemoveContacts -> Sem r (Error ∪ Ok) removeContacts = runCmd -- | Returns the total number of imported contacts getImportedContactCount :: Member TDLib r => GetImportedContactCount -> Sem r (Error ∪ Count) getImportedContactCount = runCmd -- | Changes imported contacts using the list of current user contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. changeImportedContacts :: Member TDLib r => ChangeImportedContacts -> Sem r (Error ∪ ImportedContacts) changeImportedContacts = runCmd -- | Clears all imported contacts, contact list remains unchanged clearImportedContacts :: Member TDLib r => ClearImportedContacts -> Sem r (Error ∪ Ok) clearImportedContacts = runCmd -- | Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber sharePhoneNumber :: Member TDLib r => SharePhoneNumber -> Sem r (Error ∪ Ok) sharePhoneNumber = runCmd -- | Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already getUserProfilePhotos :: Member TDLib r => GetUserProfilePhotos -> Sem r (Error ∪ UserProfilePhotos) getUserProfilePhotos = runCmd -- | Returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is not empty, favorite and recently used stickers may also be returned getStickers :: Member TDLib r => GetStickers -> Sem r (Error ∪ Stickers) getStickers = runCmd -- | Searches for stickers from public sticker sets that correspond to a given emoji searchStickers :: Member TDLib r => SearchStickers -> Sem r (Error ∪ Stickers) searchStickers = runCmd -- | Returns a list of installed sticker sets getInstalledStickerSets :: Member TDLib r => GetInstalledStickerSets -> Sem r (Error ∪ StickerSets) getInstalledStickerSets = runCmd -- | Returns a list of archived sticker sets getArchivedStickerSets :: Member TDLib r => GetArchivedStickerSets -> Sem r (Error ∪ StickerSets) getArchivedStickerSets = runCmd -- | Returns a list of trending sticker sets. For the optimal performance the number of returned sticker sets is chosen by the library getTrendingStickerSets :: Member TDLib r => GetTrendingStickerSets -> Sem r (Error ∪ StickerSets) getTrendingStickerSets = runCmd -- | Returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets getAttachedStickerSets :: Member TDLib r => GetAttachedStickerSets -> Sem r (Error ∪ StickerSets) getAttachedStickerSets = runCmd -- | Returns information about a sticker set by its identifier getStickerSet :: Member TDLib r => GetStickerSet -> Sem r (Error ∪ StickerSet) getStickerSet = runCmd -- | Searches for a sticker set by its name searchStickerSet :: Member TDLib r => SearchStickerSet -> Sem r (Error ∪ StickerSet) searchStickerSet = runCmd -- | Searches for installed sticker sets by looking for specified query in their title and name searchInstalledStickerSets :: Member TDLib r => SearchInstalledStickerSets -> Sem r (Error ∪ StickerSets) searchInstalledStickerSets = runCmd -- | Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results searchStickerSets :: Member TDLib r => SearchStickerSets -> Sem r (Error ∪ StickerSets) searchStickerSets = runCmd -- | Installs/uninstalls or activates/archives a sticker set changeStickerSet :: Member TDLib r => ChangeStickerSet -> Sem r (Error ∪ Ok) changeStickerSet = runCmd -- | Informs the server that some trending sticker sets have been viewed by the user viewTrendingStickerSets :: Member TDLib r => ViewTrendingStickerSets -> Sem r (Error ∪ Ok) viewTrendingStickerSets = runCmd -- | Changes the order of installed sticker sets reorderInstalledStickerSets :: Member TDLib r => ReorderInstalledStickerSets -> Sem r (Error ∪ Ok) reorderInstalledStickerSets = runCmd -- | Returns a list of recently used stickers getRecentStickers :: Member TDLib r => GetRecentStickers -> Sem r (Error ∪ Stickers) getRecentStickers = runCmd -- | Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list addRecentSticker :: Member TDLib r => AddRecentSticker -> Sem r (Error ∪ Stickers) addRecentSticker = runCmd -- | Removes a sticker from the list of recently used stickers removeRecentSticker :: Member TDLib r => RemoveRecentSticker -> Sem r (Error ∪ Ok) removeRecentSticker = runCmd -- | Clears the list of recently used stickers clearRecentStickers :: Member TDLib r => ClearRecentStickers -> Sem r (Error ∪ Ok) clearRecentStickers = runCmd -- | Returns favorite stickers getFavoriteStickers :: Member TDLib r => GetFavoriteStickers -> Sem r (Error ∪ Stickers) getFavoriteStickers = runCmd -- | Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list addFavoriteSticker :: Member TDLib r => AddFavoriteSticker -> Sem r (Error ∪ Ok) addFavoriteSticker = runCmd -- | Removes a sticker from the list of favorite stickers removeFavoriteSticker :: Member TDLib r => RemoveFavoriteSticker -> Sem r (Error ∪ Ok) removeFavoriteSticker = runCmd -- | Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object getStickerEmojis :: Member TDLib r => GetStickerEmojis -> Sem r (Error ∪ Emojis) getStickerEmojis = runCmd -- | Searches for emojis by keywords. Supported only if the file database is enabled searchEmojis :: Member TDLib r => SearchEmojis -> Sem r (Error ∪ Emojis) searchEmojis = runCmd -- | Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation getEmojiSuggestionsUrl :: Member TDLib r => GetEmojiSuggestionsUrl -> Sem r (Error ∪ HttpUrl) getEmojiSuggestionsUrl = runCmd -- | Returns saved animations getSavedAnimations :: Member TDLib r => GetSavedAnimations -> Sem r (Error ∪ Animations) getSavedAnimations = runCmd -- | Manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type "video/mp4" can be added to the list addSavedAnimation :: Member TDLib r => AddSavedAnimation -> Sem r (Error ∪ Ok) addSavedAnimation = runCmd -- | Removes an animation from the list of saved animations removeSavedAnimation :: Member TDLib r => RemoveSavedAnimation -> Sem r (Error ∪ Ok) removeSavedAnimation = runCmd -- | Returns up to 20 recently used inline bots in the order of their last usage getRecentInlineBots :: Member TDLib r => GetRecentInlineBots -> Sem r (Error ∪ Users) getRecentInlineBots = runCmd -- | Searches for recently used hashtags by their prefix searchHashtags :: Member TDLib r => SearchHashtags -> Sem r (Error ∪ Hashtags) searchHashtags = runCmd -- | Removes a hashtag from the list of recently used hashtags removeRecentHashtag :: Member TDLib r => RemoveRecentHashtag -> Sem r (Error ∪ Ok) removeRecentHashtag = runCmd -- | Returns a web page preview by the text of the message. Do not call this function too often. Returns a 404 error if the web page has no preview getWebPagePreview :: Member TDLib r => GetWebPagePreview -> Sem r (Error ∪ WebPage) getWebPagePreview = runCmd -- | Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page getWebPageInstantView :: Member TDLib r => GetWebPageInstantView -> Sem r (Error ∪ WebPageInstantView) getWebPageInstantView = runCmd -- | Uploads a new profile photo for the current user. If something changes, updateUser will be sent setProfilePhoto :: Member TDLib r => SetProfilePhoto -> Sem r (Error ∪ Ok) setProfilePhoto = runCmd -- | Deletes a profile photo. If something changes, updateUser will be sent deleteProfilePhoto :: Member TDLib r => DeleteProfilePhoto -> Sem r (Error ∪ Ok) deleteProfilePhoto = runCmd -- | Changes the first and last name of the current user. If something changes, updateUser will be sent setName :: Member TDLib r => SetName -> Sem r (Error ∪ Ok) setName = runCmd -- | Changes the bio of the current user setBio :: Member TDLib r => SetBio -> Sem r (Error ∪ Ok) setBio = runCmd -- | Changes the username of the current user. If something changes, updateUser will be sent setUsername :: Member TDLib r => SetUsername -> Sem r (Error ∪ Ok) setUsername = runCmd -- | Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer setLocation :: Member TDLib r => SetLocation -> Sem r (Error ∪ Ok) setLocation = runCmd -- | Changes the phone number of the user and sends an authentication code to the user's new phone number. On success, returns information about the sent code changePhoneNumber :: Member TDLib r => ChangePhoneNumber -> Sem r (Error ∪ AuthenticationCodeInfo) changePhoneNumber = runCmd -- | Re-sends the authentication code sent to confirm a new phone number for the user. Works only if the previously received authenticationCodeInfo next_code_type was not null resendChangePhoneNumberCode :: Member TDLib r => ResendChangePhoneNumberCode -> Sem r (Error ∪ AuthenticationCodeInfo) resendChangePhoneNumberCode = runCmd -- | Checks the authentication code sent to confirm a new phone number of the user checkChangePhoneNumberCode :: Member TDLib r => CheckChangePhoneNumberCode -> Sem r (Error ∪ Ok) checkChangePhoneNumberCode = runCmd -- | Sets the list of commands supported by the bot; for bots only setCommands :: Member TDLib r => SetCommands -> Sem r (Error ∪ Ok) setCommands = runCmd -- | Returns all active sessions of the current user getActiveSessions :: Member TDLib r => GetActiveSessions -> Sem r (Error ∪ Sessions) getActiveSessions = runCmd -- | Terminates a session of the current user terminateSession :: Member TDLib r => TerminateSession -> Sem r (Error ∪ Ok) terminateSession = runCmd -- | Terminates all other sessions of the current user terminateAllOtherSessions :: Member TDLib r => TerminateAllOtherSessions -> Sem r (Error ∪ Ok) terminateAllOtherSessions = runCmd -- | Returns all website where the current user used Telegram to log in getConnectedWebsites :: Member TDLib r => GetConnectedWebsites -> Sem r (Error ∪ ConnectedWebsites) getConnectedWebsites = runCmd -- | Disconnects website from the current user's Telegram account disconnectWebsite :: Member TDLib r => DisconnectWebsite -> Sem r (Error ∪ Ok) disconnectWebsite = runCmd -- | Disconnects all websites from the current user's Telegram account disconnectAllWebsites :: Member TDLib r => DisconnectAllWebsites -> Sem r (Error ∪ Ok) disconnectAllWebsites = runCmd -- | Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel setSupergroupUsername :: Member TDLib r => SetSupergroupUsername -> Sem r (Error ∪ Ok) setSupergroupUsername = runCmd -- | Changes the sticker set of a supergroup; requires can_change_info rights setSupergroupStickerSet :: Member TDLib r => SetSupergroupStickerSet -> Sem r (Error ∪ Ok) setSupergroupStickerSet = runCmd -- | Toggles sender signatures messages sent in a channel; requires can_change_info rights toggleSupergroupSignMessages :: Member TDLib r => ToggleSupergroupSignMessages -> Sem r (Error ∪ Ok) toggleSupergroupSignMessages = runCmd -- | Toggles whether the message history of a supergroup is available to new members; requires can_change_info rights toggleSupergroupIsAllHistoryAvailable :: Member TDLib r => ToggleSupergroupIsAllHistoryAvailable -> Sem r (Error ∪ Ok) toggleSupergroupIsAllHistoryAvailable = runCmd -- | Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup reportSupergroupSpam :: Member TDLib r => ReportSupergroupSpam -> Sem r (Error ∪ Ok) reportSupergroupSpam = runCmd -- | Returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters getSupergroupMembers :: Member TDLib r => GetSupergroupMembers -> Sem r (Error ∪ ChatMembers) getSupergroupMembers = runCmd -- | Deletes a supergroup or channel along with all messages in the corresponding chat. This will release the supergroup or channel username and remove all members; requires owner privileges in the supergroup or channel. Chats with more than 1000 members can't be deleted using this method deleteSupergroup :: Member TDLib r => DeleteSupergroup -> Sem r (Error ∪ Ok) deleteSupergroup = runCmd -- | Closes a secret chat, effectively transferring its state to secretChatStateClosed closeSecretChat :: Member TDLib r => CloseSecretChat -> Sem r (Error ∪ Ok) closeSecretChat = runCmd -- | Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing event_id) getChatEventLog :: Member TDLib r => GetChatEventLog -> Sem r (Error ∪ ChatEvents) getChatEventLog = runCmd -- | Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy getPaymentForm :: Member TDLib r => GetPaymentForm -> Sem r (Error ∪ PaymentForm) getPaymentForm = runCmd -- | Validates the order information provided by a user and returns the available shipping options for a flexible invoice validateOrderInfo :: Member TDLib r => ValidateOrderInfo -> Sem r (Error ∪ ValidatedOrderInfo) validateOrderInfo = runCmd -- | Sends a filled-out payment form to the bot for final verification sendPaymentForm :: Member TDLib r => SendPaymentForm -> Sem r (Error ∪ PaymentResult) sendPaymentForm = runCmd -- | Returns information about a successful payment getPaymentReceipt :: Member TDLib r => GetPaymentReceipt -> Sem r (Error ∪ PaymentReceipt) getPaymentReceipt = runCmd -- | Returns saved order info, if any getSavedOrderInfo :: Member TDLib r => GetSavedOrderInfo -> Sem r (Error ∪ OrderInfo) getSavedOrderInfo = runCmd -- | Deletes saved order info deleteSavedOrderInfo :: Member TDLib r => DeleteSavedOrderInfo -> Sem r (Error ∪ Ok) deleteSavedOrderInfo = runCmd -- | Deletes saved credentials for all payment provider bots deleteSavedCredentials :: Member TDLib r => DeleteSavedCredentials -> Sem r (Error ∪ Ok) deleteSavedCredentials = runCmd -- | Returns a user that can be contacted to get support getSupportUser :: Member TDLib r => GetSupportUser -> Sem r (Error ∪ User) getSupportUser = runCmd -- | Returns backgrounds installed by the user getBackgrounds :: Member TDLib r => GetBackgrounds -> Sem r (Error ∪ Backgrounds) getBackgrounds = runCmd -- | Constructs a persistent HTTP URL for a background getBackgroundUrl :: Member TDLib r => GetBackgroundUrl -> Sem r (Error ∪ HttpUrl) getBackgroundUrl = runCmd -- | Searches for a background by its name searchBackground :: Member TDLib r => SearchBackground -> Sem r (Error ∪ Background) searchBackground = runCmd -- | Changes the background selected by the user; adds background to the list of installed backgrounds setBackground :: Member TDLib r => SetBackground -> Sem r (Error ∪ Background) setBackground = runCmd -- | Removes background from the list of installed backgrounds removeBackground :: Member TDLib r => RemoveBackground -> Sem r (Error ∪ Ok) removeBackground = runCmd -- | Resets list of installed backgrounds to its default value resetBackgrounds :: Member TDLib r => ResetBackgrounds -> Sem r (Error ∪ Ok) resetBackgrounds = runCmd -- | Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization getLocalizationTargetInfo :: Member TDLib r => GetLocalizationTargetInfo -> Sem r (Error ∪ LocalizationTargetInfo) getLocalizationTargetInfo = runCmd -- | Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization getLanguagePackInfo :: Member TDLib r => GetLanguagePackInfo -> Sem r (Error ∪ LanguagePackInfo) getLanguagePackInfo = runCmd -- | Returns strings from a language pack in the current localization target by their keys. Can be called before authorization getLanguagePackStrings :: Member TDLib r => GetLanguagePackStrings -> Sem r (Error ∪ LanguagePackStrings) getLanguagePackStrings = runCmd -- | Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization synchronizeLanguagePack :: Member TDLib r => SynchronizeLanguagePack -> Sem r (Error ∪ Ok) synchronizeLanguagePack = runCmd -- | Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization addCustomServerLanguagePack :: Member TDLib r => AddCustomServerLanguagePack -> Sem r (Error ∪ Ok) addCustomServerLanguagePack = runCmd -- | Adds or changes a custom local language pack to the current localization target setCustomLanguagePack :: Member TDLib r => SetCustomLanguagePack -> Sem r (Error ∪ Ok) setCustomLanguagePack = runCmd -- | Edits information about a custom local language pack in the current localization target. Can be called before authorization editCustomLanguagePackInfo :: Member TDLib r => EditCustomLanguagePackInfo -> Sem r (Error ∪ Ok) editCustomLanguagePackInfo = runCmd -- | Adds, edits or deletes a string in a custom local language pack. Can be called before authorization setCustomLanguagePackString :: Member TDLib r => SetCustomLanguagePackString -> Sem r (Error ∪ Ok) setCustomLanguagePackString = runCmd -- | Deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization deleteLanguagePack :: Member TDLib r => DeleteLanguagePack -> Sem r (Error ∪ Ok) deleteLanguagePack = runCmd -- | Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription registerDevice :: Member TDLib r => RegisterDevice -> Sem r (Error ∪ PushReceiverId) registerDevice = runCmd -- | Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization processPushNotification :: Member TDLib r => ProcessPushNotification -> Sem r (Error ∪ Ok) processPushNotification = runCmd -- | Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. This is an offline method. Can be called before authorization. Can be called synchronously getPushReceiverId :: Member TDLib r => GetPushReceiverId -> Sem r (Error ∪ PushReceiverId) getPushReceiverId = runCmd -- | Returns t.me URLs recently visited by a newly registered user getRecentlyVisitedTMeUrls :: Member TDLib r => GetRecentlyVisitedTMeUrls -> Sem r (Error ∪ TMeUrls) getRecentlyVisitedTMeUrls = runCmd -- | Changes user privacy settings setUserPrivacySettingRules :: Member TDLib r => SetUserPrivacySettingRules -> Sem r (Error ∪ Ok) setUserPrivacySettingRules = runCmd -- | Returns the current privacy settings getUserPrivacySettingRules :: Member TDLib r => GetUserPrivacySettingRules -> Sem r (Error ∪ UserPrivacySettingRules) getUserPrivacySettingRules = runCmd -- | Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization getOption :: Member TDLib r => GetOption -> Sem r (Error ∪ OptionValue) getOption = runCmd -- | Sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization setOption :: Member TDLib r => SetOption -> Sem r (Error ∪ Ok) setOption = runCmd -- | Changes the period of inactivity after which the account of the current user will automatically be deleted setAccountTtl :: Member TDLib r => SetAccountTtl -> Sem r (Error ∪ Ok) setAccountTtl = runCmd -- | Returns the period of inactivity after which the account of the current user will automatically be deleted getAccountTtl :: Member TDLib r => GetAccountTtl -> Sem r (Error ∪ AccountTtl) getAccountTtl = runCmd -- | Deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword deleteAccount :: Member TDLib r => DeleteAccount -> Sem r (Error ∪ Ok) deleteAccount = runCmd -- | Removes a chat action bar without any other action removeChatActionBar :: Member TDLib r => RemoveChatActionBar -> Sem r (Error ∪ Ok) removeChatActionBar = runCmd -- | Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if this is a private chats with a bot, a private chat with a user sharing their location, a supergroup, or a channel, since other chats can't be checked by moderators reportChat :: Member TDLib r => ReportChat -> Sem r (Error ∪ Ok) reportChat = runCmd -- | Returns an HTTP URL with the chat statistics. Currently this method of getting the statistics is disabled and can be deleted in the future getChatStatisticsUrl :: Member TDLib r => GetChatStatisticsUrl -> Sem r (Error ∪ HttpUrl) getChatStatisticsUrl = runCmd -- | Returns detailed statistics about a chat. Currently this method can be used only for channels. Requires administrator rights in the channel getChatStatistics :: Member TDLib r => GetChatStatistics -> Sem r (Error ∪ ChatStatistics) getChatStatistics = runCmd -- | Loads asynchronous or zoomed in chat statistics graph getChatStatisticsGraph :: Member TDLib r => GetChatStatisticsGraph -> Sem r (Error ∪ StatisticsGraph) getChatStatisticsGraph = runCmd -- | Returns storage usage statistics. Can be called before authorization getStorageStatistics :: Member TDLib r => GetStorageStatistics -> Sem r (Error ∪ StorageStatistics) getStorageStatistics = runCmd -- | Quickly returns approximate storage usage statistics. Can be called before authorization getStorageStatisticsFast :: Member TDLib r => GetStorageStatisticsFast -> Sem r (Error ∪ StorageStatisticsFast) getStorageStatisticsFast = runCmd -- | Returns database statistics getDatabaseStatistics :: Member TDLib r => GetDatabaseStatistics -> Sem r (Error ∪ DatabaseStatistics) getDatabaseStatistics = runCmd -- | Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted optimizeStorage :: Member TDLib r => OptimizeStorage -> Sem r (Error ∪ StorageStatistics) optimizeStorage = runCmd -- | Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it should be called whenever the network is changed, even if the network type remains the same. setNetworkType :: Member TDLib r => SetNetworkType -> Sem r (Error ∪ Ok) setNetworkType = runCmd -- | Returns network data usage statistics. Can be called before authorization getNetworkStatistics :: Member TDLib r => GetNetworkStatistics -> Sem r (Error ∪ NetworkStatistics) getNetworkStatistics = runCmd -- | Adds the specified data to data usage statistics. Can be called before authorization addNetworkStatistics :: Member TDLib r => AddNetworkStatistics -> Sem r (Error ∪ Ok) addNetworkStatistics = runCmd -- | Resets all network data usage statistics to zero. Can be called before authorization resetNetworkStatistics :: Member TDLib r => ResetNetworkStatistics -> Sem r (Error ∪ Ok) resetNetworkStatistics = runCmd -- | Returns auto-download settings presets for the current user getAutoDownloadSettingsPresets :: Member TDLib r => GetAutoDownloadSettingsPresets -> Sem r (Error ∪ AutoDownloadSettingsPresets) getAutoDownloadSettingsPresets = runCmd -- | Sets auto-download settings setAutoDownloadSettings :: Member TDLib r => SetAutoDownloadSettings -> Sem r (Error ∪ Ok) setAutoDownloadSettings = runCmd -- | Returns information about a bank card getBankCardInfo :: Member TDLib r => GetBankCardInfo -> Sem r (Error ∪ BankCardInfo) getBankCardInfo = runCmd -- | Returns one of the available Telegram Passport elements getPassportElement :: Member TDLib r => GetPassportElement -> Sem r (Error ∪ PassportElement) getPassportElement = runCmd -- | Returns all available Telegram Passport elements getAllPassportElements :: Member TDLib r => GetAllPassportElements -> Sem r (Error ∪ PassportElements) getAllPassportElements = runCmd -- | Adds an element to the user's Telegram Passport. May return an error with a message "PHONE_VERIFICATION_NEEDED" or "EMAIL_VERIFICATION_NEEDED" if the chosen phone number or the chosen email address must be verified first setPassportElement :: Member TDLib r => SetPassportElement -> Sem r (Error ∪ PassportElement) setPassportElement = runCmd -- | Deletes a Telegram Passport element deletePassportElement :: Member TDLib r => DeletePassportElement -> Sem r (Error ∪ Ok) deletePassportElement = runCmd -- | Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed setPassportElementErrors :: Member TDLib r => SetPassportElementErrors -> Sem r (Error ∪ Ok) setPassportElementErrors = runCmd -- | Returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown getPreferredCountryLanguage :: Member TDLib r => GetPreferredCountryLanguage -> Sem r (Error ∪ Text) getPreferredCountryLanguage = runCmd -- | Sends a code to verify a phone number to be added to a user's Telegram Passport sendPhoneNumberVerificationCode :: Member TDLib r => SendPhoneNumberVerificationCode -> Sem r (Error ∪ AuthenticationCodeInfo) sendPhoneNumberVerificationCode = runCmd -- | Re-sends the code to verify a phone number to be added to a user's Telegram Passport resendPhoneNumberVerificationCode :: Member TDLib r => ResendPhoneNumberVerificationCode -> Sem r (Error ∪ AuthenticationCodeInfo) resendPhoneNumberVerificationCode = runCmd -- | Checks the phone number verification code for Telegram Passport checkPhoneNumberVerificationCode :: Member TDLib r => CheckPhoneNumberVerificationCode -> Sem r (Error ∪ Ok) checkPhoneNumberVerificationCode = runCmd -- | Sends a code to verify an email address to be added to a user's Telegram Passport sendEmailAddressVerificationCode :: Member TDLib r => SendEmailAddressVerificationCode -> Sem r (Error ∪ EmailAddressAuthenticationCodeInfo) sendEmailAddressVerificationCode = runCmd -- | Re-sends the code to verify an email address to be added to a user's Telegram Passport resendEmailAddressVerificationCode :: Member TDLib r => ResendEmailAddressVerificationCode -> Sem r (Error ∪ EmailAddressAuthenticationCodeInfo) resendEmailAddressVerificationCode = runCmd -- | Checks the email address verification code for Telegram Passport checkEmailAddressVerificationCode :: Member TDLib r => CheckEmailAddressVerificationCode -> Sem r (Error ∪ Ok) checkEmailAddressVerificationCode = runCmd -- | Returns a Telegram Passport authorization form for sharing data with a service getPassportAuthorizationForm :: Member TDLib r => GetPassportAuthorizationForm -> Sem r (Error ∪ PassportAuthorizationForm) getPassportAuthorizationForm = runCmd -- | Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form getPassportAuthorizationFormAvailableElements :: Member TDLib r => GetPassportAuthorizationFormAvailableElements -> Sem r (Error ∪ PassportElementsWithErrors) getPassportAuthorizationFormAvailableElements = runCmd -- | Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements need to be used sendPassportAuthorizationForm :: Member TDLib r => SendPassportAuthorizationForm -> Sem r (Error ∪ Ok) sendPassportAuthorizationForm = runCmd -- | Sends phone number confirmation code. Should be called when user presses "https://t.me/confirmphone?phone=*******&hash=**********" or "tg://confirmphone?phone=*******&hash=**********" link sendPhoneNumberConfirmationCode :: Member TDLib r => SendPhoneNumberConfirmationCode -> Sem r (Error ∪ AuthenticationCodeInfo) sendPhoneNumberConfirmationCode = runCmd -- | Resends phone number confirmation code resendPhoneNumberConfirmationCode :: Member TDLib r => ResendPhoneNumberConfirmationCode -> Sem r (Error ∪ AuthenticationCodeInfo) resendPhoneNumberConfirmationCode = runCmd -- | Checks phone number confirmation code checkPhoneNumberConfirmationCode :: Member TDLib r => CheckPhoneNumberConfirmationCode -> Sem r (Error ∪ Ok) checkPhoneNumberConfirmationCode = runCmd -- | Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only setBotUpdatesStatus :: Member TDLib r => SetBotUpdatesStatus -> Sem r (Error ∪ Ok) setBotUpdatesStatus = runCmd -- | Uploads a PNG image with a sticker; for bots only; returns the uploaded file uploadStickerFile :: Member TDLib r => UploadStickerFile -> Sem r (Error ∪ File) uploadStickerFile = runCmd -- | Creates a new sticker set; for bots only. Returns the newly created sticker set createNewStickerSet :: Member TDLib r => CreateNewStickerSet -> Sem r (Error ∪ StickerSet) createNewStickerSet = runCmd -- | Adds a new sticker to a set; for bots only. Returns the sticker set addStickerToSet :: Member TDLib r => AddStickerToSet -> Sem r (Error ∪ StickerSet) addStickerToSet = runCmd -- | Sets a sticker set thumbnail; for bots only. Returns the sticker set setStickerSetThumbnail :: Member TDLib r => SetStickerSetThumbnail -> Sem r (Error ∪ StickerSet) setStickerSetThumbnail = runCmd -- | Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot setStickerPositionInSet :: Member TDLib r => SetStickerPositionInSet -> Sem r (Error ∪ Ok) setStickerPositionInSet = runCmd -- | Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot removeStickerFromSet :: Member TDLib r => RemoveStickerFromSet -> Sem r (Error ∪ Ok) removeStickerFromSet = runCmd -- | Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded getMapThumbnailFile :: Member TDLib r => GetMapThumbnailFile -> Sem r (Error ∪ File) getMapThumbnailFile = runCmd -- | Accepts Telegram terms of services acceptTermsOfService :: Member TDLib r => AcceptTermsOfService -> Sem r (Error ∪ Ok) acceptTermsOfService = runCmd -- | Sends a custom request; for bots only sendCustomRequest :: Member TDLib r => SendCustomRequest -> Sem r (Error ∪ CustomRequestResult) sendCustomRequest = runCmd -- | Answers a custom query; for bots only answerCustomQuery :: Member TDLib r => AnswerCustomQuery -> Sem r (Error ∪ Ok) answerCustomQuery = runCmd -- | Succeeds after a specified amount of time has passed. Can be called before authorization. Can be called before initialization setAlarm :: Member TDLib r => SetAlarm -> Sem r (Error ∪ Ok) setAlarm = runCmd -- | Uses current user IP address to found their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization getCountryCode :: Member TDLib r => GetCountryCode -> Sem r (Error ∪ Text) getCountryCode = runCmd -- | Returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram getInviteText :: Member TDLib r => GetInviteText -> Sem r (Error ∪ Text) getInviteText = runCmd -- | Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization getDeepLinkInfo :: Member TDLib r => GetDeepLinkInfo -> Sem r (Error ∪ DeepLinkInfo) getDeepLinkInfo = runCmd -- | Returns application config, provided by the server. Can be called before authorization getApplicationConfig :: Member TDLib r => GetApplicationConfig -> Sem r (Error ∪ JsonValue) getApplicationConfig = runCmd -- | Saves application log event on the server. Can be called before authorization saveApplicationLogEvent :: Member TDLib r => SaveApplicationLogEvent -> Sem r (Error ∪ Ok) saveApplicationLogEvent = runCmd -- | Adds a proxy server for network requests. Can be called before authorization addProxy :: Member TDLib r => AddProxy -> Sem r (Error ∪ Proxy) addProxy = runCmd -- | Edits an existing proxy server for network requests. Can be called before authorization editProxy :: Member TDLib r => EditProxy -> Sem r (Error ∪ Proxy) editProxy = runCmd -- | Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization enableProxy :: Member TDLib r => EnableProxy -> Sem r (Error ∪ Ok) enableProxy = runCmd -- | Disables the currently enabled proxy. Can be called before authorization disableProxy :: Member TDLib r => DisableProxy -> Sem r (Error ∪ Ok) disableProxy = runCmd -- | Removes a proxy server. Can be called before authorization removeProxy :: Member TDLib r => RemoveProxy -> Sem r (Error ∪ Ok) removeProxy = runCmd -- | Returns list of proxies that are currently set up. Can be called before authorization getProxies :: Member TDLib r => GetProxies -> Sem r (Error ∪ Proxies) getProxies = runCmd -- | Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization getProxyLink :: Member TDLib r => GetProxyLink -> Sem r (Error ∪ Text) getProxyLink = runCmd -- | Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization pingProxy :: Member TDLib r => PingProxy -> Sem r (Error ∪ Seconds) pingProxy = runCmd -- | Sets new log stream for internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously setLogStream :: Member TDLib r => SetLogStream -> Sem r (Error ∪ Ok) setLogStream = runCmd -- | Returns information about currently used log stream for internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously getLogStream :: Member TDLib r => GetLogStream -> Sem r (Error ∪ LogStream) getLogStream = runCmd -- | Sets the verbosity level of the internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously setLogVerbosityLevel :: Member TDLib r => SetLogVerbosityLevel -> Sem r (Error ∪ Ok) setLogVerbosityLevel = runCmd -- | Returns current verbosity level of the internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously getLogVerbosityLevel :: Member TDLib r => GetLogVerbosityLevel -> Sem r (Error ∪ LogVerbosityLevel) getLogVerbosityLevel = runCmd -- | Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. This is an offline method. Can be called before authorization. Can be called synchronously getLogTags :: Member TDLib r => GetLogTags -> Sem r (Error ∪ LogTags) getLogTags = runCmd -- | Sets the verbosity level for a specified TDLib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously setLogTagVerbosityLevel :: Member TDLib r => SetLogTagVerbosityLevel -> Sem r (Error ∪ Ok) setLogTagVerbosityLevel = runCmd -- | Returns current verbosity level for a specified TDLib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously getLogTagVerbosityLevel :: Member TDLib r => GetLogTagVerbosityLevel -> Sem r (Error ∪ LogVerbosityLevel) getLogTagVerbosityLevel = runCmd -- | Adds a message to TDLib internal log. This is an offline method. Can be called before authorization. Can be called synchronously addLogMessage :: Member TDLib r => AddLogMessage -> Sem r (Error ∪ Ok) addLogMessage = runCmd -- | Does nothing; for testing only. This is an offline method. Can be called before authorization testCallEmpty :: Member TDLib r => TestCallEmpty -> Sem r (Error ∪ Ok) testCallEmpty = runCmd -- | Returns the received string; for testing only. This is an offline method. Can be called before authorization testCallString :: Member TDLib r => TestCallString -> Sem r (Error ∪ TestString) testCallString = runCmd -- | Returns the received bytes; for testing only. This is an offline method. Can be called before authorization testCallBytes :: Member TDLib r => TestCallBytes -> Sem r (Error ∪ TestBytes) testCallBytes = runCmd -- | Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization testCallVectorInt :: Member TDLib r => TestCallVectorInt -> Sem r (Error ∪ TestVectorInt) testCallVectorInt = runCmd -- | Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization testCallVectorIntObject :: Member TDLib r => TestCallVectorIntObject -> Sem r (Error ∪ TestVectorIntObject) testCallVectorIntObject = runCmd -- | Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization testCallVectorString :: Member TDLib r => TestCallVectorString -> Sem r (Error ∪ TestVectorString) testCallVectorString = runCmd -- | Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization testCallVectorStringObject :: Member TDLib r => TestCallVectorStringObject -> Sem r (Error ∪ TestVectorStringObject) testCallVectorStringObject = runCmd -- | Returns the squared received number; for testing only. This is an offline method. Can be called before authorization testSquareInt :: Member TDLib r => TestSquareInt -> Sem r (Error ∪ TestInt) testSquareInt = runCmd -- | Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization testNetwork :: Member TDLib r => TestNetwork -> Sem r (Error ∪ Ok) testNetwork = runCmd -- | Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization testProxy :: Member TDLib r => TestProxy -> Sem r (Error ∪ Ok) testProxy = runCmd -- | Forces an updates.getDifference call to the Telegram servers; for testing only testGetDifference :: Member TDLib r => TestGetDifference -> Sem r (Error ∪ Ok) testGetDifference = runCmd -- | Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization testUseUpdate :: Member TDLib r => TestUseUpdate -> Sem r (Error ∪ Update) testUseUpdate = runCmd -- | Returns the specified error and ensures that the Error object is used; for testing only. This is an offline method. Can be called before authorization. Can be called synchronously testReturnError :: Member TDLib r => TestReturnError -> Sem r (Error ∪ Error) testReturnError = runCmd