tdlib-types-0.2.0: Types and Functions generated from tdlib api spec
Safe HaskellNone
LanguageHaskell2010

TDLib.Generated.Functions

Description

TD API functions (methods) generated by tdlib-gen

Synopsis

Documentation

getAuthorizationState :: Member TDLib r => GetAuthorizationState -> Sem r (Error ∪ AuthorizationState) Source #

Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state

setTdlibParameters :: Member TDLib r => SetTdlibParameters -> Sem r (Error ∪ Ok) Source #

Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters

checkDatabaseEncryptionKey :: Member TDLib r => CheckDatabaseEncryptionKey -> Sem r (Error ∪ Ok) Source #

Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey

setAuthenticationPhoneNumber :: Member TDLib r => SetAuthenticationPhoneNumber -> Sem r (Error ∪ Ok) Source #

Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber,

resendAuthenticationCode :: Member TDLib r => ResendAuthenticationCode -> Sem r (Error ∪ Ok) Source #

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

checkAuthenticationCode :: Member TDLib r => CheckAuthenticationCode -> Sem r (Error ∪ Ok) Source #

Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode

requestQrCodeAuthentication :: Member TDLib r => RequestQrCodeAuthentication -> Sem r (Error ∪ Ok) Source #

Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber

registerUser :: Member TDLib r => RegisterUser -> Sem r (Error ∪ Ok) Source #

Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration

checkAuthenticationPassword :: Member TDLib r => CheckAuthenticationPassword -> Sem r (Error ∪ Ok) Source #

Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword

requestAuthenticationPasswordRecovery :: Member TDLib r => RequestAuthenticationPasswordRecovery -> Sem r (Error ∪ Ok) Source #

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

recoverAuthenticationPassword :: Member TDLib r => RecoverAuthenticationPassword -> Sem r (Error ∪ Ok) Source #

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

checkAuthenticationBotToken :: Member TDLib r => CheckAuthenticationBotToken -> Sem r (Error ∪ Ok) Source #

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

logOut :: Member TDLib r => LogOut -> Sem r (Error ∪ Ok) Source #

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

close :: Member TDLib r => Close -> Sem r (Error ∪ Ok) Source #

Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent

destroy :: Member TDLib r => Destroy -> Sem r (Error ∪ Ok) Source #

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

confirmQrCodeAuthentication :: Member TDLib r => ConfirmQrCodeAuthentication -> Sem r (Error ∪ Session) Source #

Confirms QR code authentication on another device. Returns created session on success

getCurrentState :: Member TDLib r => GetCurrentState -> Sem r (Error ∪ Updates) Source #

Returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationStateUpdateUserUpdateNewChat and others. This is especially useful if TDLib is run in a separate process. This is an offline method. Can be called before authorization

setDatabaseEncryptionKey :: Member TDLib r => SetDatabaseEncryptionKey -> Sem r (Error ∪ Ok) Source #

Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain

getPasswordState :: Member TDLib r => GetPasswordState -> Sem r (Error ∪ PasswordState) Source #

Returns the current state of 2-step verification

setPassword :: Member TDLib r => SetPassword -> Sem r (Error ∪ PasswordState) Source #

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

getRecoveryEmailAddress :: Member TDLib r => GetRecoveryEmailAddress -> Sem r (Error ∪ RecoveryEmailAddress) Source #

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

setRecoveryEmailAddress :: Member TDLib r => SetRecoveryEmailAddress -> Sem r (Error ∪ PasswordState) Source #

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.

checkRecoveryEmailAddressCode :: Member TDLib r => CheckRecoveryEmailAddressCode -> Sem r (Error ∪ PasswordState) Source #

Checks the 2-step verification recovery email address verification code

resendRecoveryEmailAddressCode :: Member TDLib r => ResendRecoveryEmailAddressCode -> Sem r (Error ∪ PasswordState) Source #

Resends the 2-step verification recovery email address verification code

requestPasswordRecovery :: Member TDLib r => RequestPasswordRecovery -> Sem r (Error ∪ EmailAddressAuthenticationCodeInfo) Source #

Requests to send a password recovery code to an email address that was previously set up

recoverPassword :: Member TDLib r => RecoverPassword -> Sem r (Error ∪ PasswordState) Source #

Recovers the password using a recovery code sent to an email address that was previously set up

createTemporaryPassword :: Member TDLib r => CreateTemporaryPassword -> Sem r (Error ∪ TemporaryPasswordState) Source #

Creates a new temporary password for processing payments

getTemporaryPasswordState :: Member TDLib r => GetTemporaryPasswordState -> Sem r (Error ∪ TemporaryPasswordState) Source #

Returns information about the current temporary password

getMe :: Member TDLib r => GetMe -> Sem r (Error ∪ User) Source #

Returns the current user

getUser :: Member TDLib r => GetUser -> Sem r (Error ∪ User) Source #

Returns information about a user by their identifier. This is an offline request if the current user is not a bot

getUserFullInfo :: Member TDLib r => GetUserFullInfo -> Sem r (Error ∪ UserFullInfo) Source #

Returns full information about a user by their identifier

getBasicGroup :: Member TDLib r => GetBasicGroup -> Sem r (Error ∪ BasicGroup) Source #

Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot

getBasicGroupFullInfo :: Member TDLib r => GetBasicGroupFullInfo -> Sem r (Error ∪ BasicGroupFullInfo) Source #

Returns full information about a basic group by its identifier

getSupergroup :: Member TDLib r => GetSupergroup -> Sem r (Error ∪ Supergroup) Source #

Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot

getSupergroupFullInfo :: Member TDLib r => GetSupergroupFullInfo -> Sem r (Error ∪ SupergroupFullInfo) Source #

Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute

getSecretChat :: Member TDLib r => GetSecretChat -> Sem r (Error ∪ SecretChat) Source #

Returns information about a secret chat by its identifier. This is an offline request

getChat :: Member TDLib r => GetChat -> Sem r (Error ∪ Chat) Source #

Returns information about a chat by its identifier, this is an offline request if the current user is not a bot

getMessage :: Member TDLib r => GetMessage -> Sem r (Error ∪ Message) Source #

Returns information about a message

getMessageLocally :: Member TDLib r => GetMessageLocally -> Sem r (Error ∪ Message) Source #

Returns information about a message, if it is available locally without sending network request. This is an offline request

getRepliedMessage :: Member TDLib r => GetRepliedMessage -> Sem r (Error ∪ Message) Source #

Returns information about a message that is replied by given message

getChatPinnedMessage :: Member TDLib r => GetChatPinnedMessage -> Sem r (Error ∪ Message) Source #

Returns information about a pinned chat message

getMessages :: Member TDLib r => GetMessages -> Sem r (Error ∪ Messages) Source #

Returns information about messages. If a message is not found, returns null on the corresponding position of the result

getFile :: Member TDLib r => GetFile -> Sem r (Error ∪ File) Source #

Returns information about a file; this is an offline request

getRemoteFile :: Member TDLib r => GetRemoteFile -> Sem r (Error ∪ File) Source #

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.

getChats :: Member TDLib r => GetChats -> Sem r (Error ∪ Chats) Source #

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).

searchPublicChat :: Member TDLib r => SearchPublicChat -> Sem r (Error ∪ Chat) Source #

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

searchPublicChats :: Member TDLib r => SearchPublicChats -> Sem r (Error ∪ Chats) Source #

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

searchChats :: Member TDLib r => SearchChats -> Sem r (Error ∪ Chats) Source #

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

searchChatsOnServer :: Member TDLib r => SearchChatsOnServer -> Sem r (Error ∪ Chats) Source #

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

searchChatsNearby :: Member TDLib r => SearchChatsNearby -> Sem r (Error ∪ ChatsNearby) Source #

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

getTopChats :: Member TDLib r => GetTopChats -> Sem r (Error ∪ Chats) Source #

Returns a list of frequently used chats. Supported only if the chat info database is enabled

removeTopChat :: Member TDLib r => RemoveTopChat -> Sem r (Error ∪ Ok) Source #

Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled

addRecentlyFoundChat :: Member TDLib r => AddRecentlyFoundChat -> Sem r (Error ∪ Ok) Source #

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

removeRecentlyFoundChat :: Member TDLib r => RemoveRecentlyFoundChat -> Sem r (Error ∪ Ok) Source #

Removes a chat from the list of recently found chats

clearRecentlyFoundChats :: Member TDLib r => ClearRecentlyFoundChats -> Sem r (Error ∪ Ok) Source #

Clears the list of recently found chats

checkChatUsername :: Member TDLib r => CheckChatUsername -> Sem r (Error ∪ CheckChatUsernameResult) Source #

Checks whether a username can be set for a chat

getCreatedPublicChats :: Member TDLib r => GetCreatedPublicChats -> Sem r (Error ∪ Chats) Source #

Returns a list of public chats of the specified type, owned by the user

checkCreatedPublicChatsLimit :: Member TDLib r => CheckCreatedPublicChatsLimit -> Sem r (Error ∪ Ok) Source #

Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached

getSuitableDiscussionChats :: Member TDLib r => GetSuitableDiscussionChats -> Sem r (Error ∪ Chats) Source #

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

getInactiveSupergroupChats :: Member TDLib r => GetInactiveSupergroupChats -> Sem r (Error ∪ Chats) Source #

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

getGroupsInCommon :: Member TDLib r => GetGroupsInCommon -> Sem r (Error ∪ Chats) Source #

Returns a list of common group chats with a given user. Chats are sorted by their type and creation date

getChatHistory :: Member TDLib r => GetChatHistory -> Sem r (Error ∪ Messages) Source #

Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id).

deleteChatHistory :: Member TDLib r => DeleteChatHistory -> Sem r (Error ∪ Ok) Source #

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

searchChatMessages :: Member TDLib r => SearchChatMessages -> Sem r (Error ∪ Messages) Source #

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

searchMessages :: Member TDLib r => SearchMessages -> Sem r (Error ∪ Messages) Source #

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)).

searchSecretMessages :: Member TDLib r => SearchSecretMessages -> Sem r (Error ∪ FoundMessages) Source #

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

searchCallMessages :: Member TDLib r => SearchCallMessages -> Sem r (Error ∪ Messages) Source #

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

searchChatRecentLocationMessages :: Member TDLib r => SearchChatRecentLocationMessages -> Sem r (Error ∪ Messages) Source #

Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user

getActiveLiveLocationMessages :: Member TDLib r => GetActiveLiveLocationMessages -> Sem r (Error ∪ Messages) Source #

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

getChatMessageByDate :: Member TDLib r => GetChatMessageByDate -> Sem r (Error ∪ Message) Source #

Returns the last message sent in a chat no later than the specified date

getChatMessageCount :: Member TDLib r => GetChatMessageCount -> Sem r (Error ∪ Count) Source #

Returns approximate number of messages of the specified type in the chat

getChatScheduledMessages :: Member TDLib r => GetChatScheduledMessages -> Sem r (Error ∪ Messages) Source #

Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id)

removeNotification :: Member TDLib r => RemoveNotification -> Sem r (Error ∪ Ok) Source #

Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user

removeNotificationGroup :: Member TDLib r => RemoveNotificationGroup -> Sem r (Error ∪ Ok) Source #

Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user

getPublicMessageLink :: Member TDLib r => GetPublicMessageLink -> Sem r (Error ∪ PublicMessageLink) Source #

Returns a public HTTPS link to a message. Available only for messages in supergroups and channels with a username

getMessageLink :: Member TDLib r => GetMessageLink -> Sem r (Error ∪ HttpUrl) Source #

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

getMessageLinkInfo :: Member TDLib r => GetMessageLinkInfo -> Sem r (Error ∪ MessageLinkInfo) Source #

Returns information about a public or private message link

sendMessage :: Member TDLib r => SendMessage -> Sem r (Error ∪ Message) Source #

Sends a message. Returns the sent message

sendMessageAlbum :: Member TDLib r => SendMessageAlbum -> Sem r (Error ∪ Messages) Source #

Sends messages grouped together into an album. Currently only photo and video messages can be grouped into an album. Returns sent messages

sendBotStartMessage :: Member TDLib r => SendBotStartMessage -> Sem r (Error ∪ Message) Source #

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

sendInlineQueryResultMessage :: Member TDLib r => SendInlineQueryResultMessage -> Sem r (Error ∪ Message) Source #

Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message

forwardMessages :: Member TDLib r => ForwardMessages -> Sem r (Error ∪ Messages) Source #

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

resendMessages :: Member TDLib r => ResendMessages -> Sem r (Error ∪ Messages) Source #

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.

sendChatSetTtlMessage :: Member TDLib r => SendChatSetTtlMessage -> Sem r (Error ∪ Message) Source #

Changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message

sendChatScreenshotTakenNotification :: Member TDLib r => SendChatScreenshotTakenNotification -> Sem r (Error ∪ Ok) Source #

Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats

addLocalMessage :: Member TDLib r => AddLocalMessage -> Sem r (Error ∪ Message) Source #

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

deleteMessages :: Member TDLib r => DeleteMessages -> Sem r (Error ∪ Ok) Source #

Deletes messages

deleteChatMessagesFromUser :: Member TDLib r => DeleteChatMessagesFromUser -> Sem r (Error ∪ Ok) Source #

Deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires can_delete_messages administrator privileges

editMessageText :: Member TDLib r => EditMessageText -> Sem r (Error ∪ Message) Source #

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

editMessageLiveLocation :: Member TDLib r => EditMessageLiveLocation -> Sem r (Error ∪ Message) Source #

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

editMessageMedia :: Member TDLib r => EditMessageMedia -> Sem r (Error ∪ Message) Source #

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

editMessageCaption :: Member TDLib r => EditMessageCaption -> Sem r (Error ∪ Message) Source #

Edits the message content caption. Returns the edited message after the edit is completed on the server side

editMessageReplyMarkup :: Member TDLib r => EditMessageReplyMarkup -> Sem r (Error ∪ Message) Source #

Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side

editInlineMessageText :: Member TDLib r => EditInlineMessageText -> Sem r (Error ∪ Ok) Source #

Edits the text of an inline text or game message sent via a bot; for bots only

editInlineMessageLiveLocation :: Member TDLib r => EditInlineMessageLiveLocation -> Sem r (Error ∪ Ok) Source #

Edits the content of a live location in an inline message sent via a bot; for bots only

editInlineMessageMedia :: Member TDLib r => EditInlineMessageMedia -> Sem r (Error ∪ Ok) Source #

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

editInlineMessageCaption :: Member TDLib r => EditInlineMessageCaption -> Sem r (Error ∪ Ok) Source #

Edits the caption of an inline message sent via a bot; for bots only

editInlineMessageReplyMarkup :: Member TDLib r => EditInlineMessageReplyMarkup -> Sem r (Error ∪ Ok) Source #

Edits the reply markup of an inline message sent via a bot; for bots only

editMessageSchedulingState :: Member TDLib r => EditMessageSchedulingState -> Sem r (Error ∪ Ok) Source #

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

getTextEntities :: Member TDLib r => GetTextEntities -> Sem r (Error ∪ TextEntities) Source #

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

parseTextEntities :: Member TDLib r => ParseTextEntities -> Sem r (Error ∪ FormattedText) Source #

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

parseMarkdown :: Member TDLib r => ParseMarkdown -> Sem r (Error ∪ FormattedText) Source #

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

getMarkdownText :: Member TDLib r => GetMarkdownText -> Sem r (Error ∪ FormattedText) Source #

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

getFileMimeType :: Member TDLib r => GetFileMimeType -> Sem r (Error ∪ Text) Source #

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

getFileExtension :: Member TDLib r => GetFileExtension -> Sem r (Error ∪ Text) Source #

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

cleanFileName :: Member TDLib r => CleanFileName -> Sem r (Error ∪ Text) Source #

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

getLanguagePackString :: Member TDLib r => GetLanguagePackString -> Sem r (Error ∪ LanguagePackStringValue) Source #

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

getJsonValue :: Member TDLib r => GetJsonValue -> Sem r (Error ∪ JsonValue) Source #

Converts a JSON-serialized string to corresponding JsonValue object. This is an offline method. Can be called before authorization. Can be called synchronously

getJsonString :: Member TDLib r => GetJsonString -> Sem r (Error ∪ Text) Source #

Converts a JsonValue object to corresponding JSON-serialized string. This is an offline method. Can be called before authorization. Can be called synchronously

setPollAnswer :: Member TDLib r => SetPollAnswer -> Sem r (Error ∪ Ok) Source #

Changes the user answer to a poll. A poll in quiz mode can be answered only once

getPollVoters :: Member TDLib r => GetPollVoters -> Sem r (Error ∪ Users) Source #

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

stopPoll :: Member TDLib r => StopPoll -> Sem r (Error ∪ Ok) Source #

Stops a poll. A poll in a message can be stopped when the message has can_be_edited flag set

getLoginUrlInfo :: Member TDLib r => GetLoginUrlInfo -> Sem r (Error ∪ LoginUrlInfo) Source #

Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button

getLoginUrl :: Member TDLib r => GetLoginUrl -> Sem r (Error ∪ HttpUrl) Source #

Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl.

getInlineQueryResults :: Member TDLib r => GetInlineQueryResults -> Sem r (Error ∪ InlineQueryResults) Source #

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

answerInlineQuery :: Member TDLib r => AnswerInlineQuery -> Sem r (Error ∪ Ok) Source #

Sets the result of an inline query; for bots only

getCallbackQueryAnswer :: Member TDLib r => GetCallbackQueryAnswer -> Sem r (Error ∪ CallbackQueryAnswer) Source #

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

answerCallbackQuery :: Member TDLib r => AnswerCallbackQuery -> Sem r (Error ∪ Ok) Source #

Sets the result of a callback query; for bots only

answerShippingQuery :: Member TDLib r => AnswerShippingQuery -> Sem r (Error ∪ Ok) Source #

Sets the result of a shipping query; for bots only

answerPreCheckoutQuery :: Member TDLib r => AnswerPreCheckoutQuery -> Sem r (Error ∪ Ok) Source #

Sets the result of a pre-checkout query; for bots only

setGameScore :: Member TDLib r => SetGameScore -> Sem r (Error ∪ Message) Source #

Updates the game score of the specified user in the game; for bots only

setInlineGameScore :: Member TDLib r => SetInlineGameScore -> Sem r (Error ∪ Ok) Source #

Updates the game score of the specified user in a game; for bots only

getGameHighScores :: Member TDLib r => GetGameHighScores -> Sem r (Error ∪ GameHighScores) Source #

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

getInlineGameHighScores :: Member TDLib r => GetInlineGameHighScores -> Sem r (Error ∪ GameHighScores) Source #

Returns game high scores and some part of the high score table in the range of the specified user; for bots only

deleteChatReplyMarkup :: Member TDLib r => DeleteChatReplyMarkup -> Sem r (Error ∪ Ok) Source #

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

sendChatAction :: Member TDLib r => SendChatAction -> Sem r (Error ∪ Ok) Source #

Sends a notification about user activity in a chat

openChat :: Member TDLib r => OpenChat -> Sem r (Error ∪ Ok) Source #

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)

closeChat :: Member TDLib r => CloseChat -> Sem r (Error ∪ Ok) Source #

Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed

viewMessages :: Member TDLib r => ViewMessages -> Sem r (Error ∪ Ok) Source #

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)

openMessageContent :: Member TDLib r => OpenMessageContent -> Sem r (Error ∪ Ok) Source #

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

readAllChatMentions :: Member TDLib r => ReadAllChatMentions -> Sem r (Error ∪ Ok) Source #

Marks all mentions in a chat as read

createPrivateChat :: Member TDLib r => CreatePrivateChat -> Sem r (Error ∪ Chat) Source #

Returns an existing chat corresponding to a given user

createBasicGroupChat :: Member TDLib r => CreateBasicGroupChat -> Sem r (Error ∪ Chat) Source #

Returns an existing chat corresponding to a known basic group

createSupergroupChat :: Member TDLib r => CreateSupergroupChat -> Sem r (Error ∪ Chat) Source #

Returns an existing chat corresponding to a known supergroup or channel

createSecretChat :: Member TDLib r => CreateSecretChat -> Sem r (Error ∪ Chat) Source #

Returns an existing chat corresponding to a known secret chat

createNewBasicGroupChat :: Member TDLib r => CreateNewBasicGroupChat -> Sem r (Error ∪ Chat) Source #

Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat

createNewSupergroupChat :: Member TDLib r => CreateNewSupergroupChat -> Sem r (Error ∪ Chat) Source #

Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat

createNewSecretChat :: Member TDLib r => CreateNewSecretChat -> Sem r (Error ∪ Chat) Source #

Creates a new secret chat. Returns the newly created chat

upgradeBasicGroupChatToSupergroupChat :: Member TDLib r => UpgradeBasicGroupChatToSupergroupChat -> Sem r (Error ∪ Chat) Source #

Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group

setChatChatList :: Member TDLib r => SetChatChatList -> Sem r (Error ∪ Ok) Source #

Moves a chat to a different chat list. Current chat list of the chat must ne non-null

setChatTitle :: Member TDLib r => SetChatTitle -> Sem r (Error ∪ Ok) Source #

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

setChatPhoto :: Member TDLib r => SetChatPhoto -> Sem r (Error ∪ Ok) Source #

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

setChatPermissions :: Member TDLib r => SetChatPermissions -> Sem r (Error ∪ Ok) Source #

Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right

setChatDraftMessage :: Member TDLib r => SetChatDraftMessage -> Sem r (Error ∪ Ok) Source #

Changes the draft message in a chat

setChatNotificationSettings :: Member TDLib r => SetChatNotificationSettings -> Sem r (Error ∪ Ok) Source #

Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed

toggleChatIsPinned :: Member TDLib r => ToggleChatIsPinned -> Sem r (Error ∪ Ok) Source #

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 mainarchive chat list

toggleChatIsMarkedAsUnread :: Member TDLib r => ToggleChatIsMarkedAsUnread -> Sem r (Error ∪ Ok) Source #

Changes the marked as unread state of a chat

toggleChatDefaultDisableNotification :: Member TDLib r => ToggleChatDefaultDisableNotification -> Sem r (Error ∪ Ok) Source #

Changes the value of the default disable_notification parameter, used when a message is sent to a chat

setChatClientData :: Member TDLib r => SetChatClientData -> Sem r (Error ∪ Ok) Source #

Changes client data associated with a chat

setChatDescription :: Member TDLib r => SetChatDescription -> Sem r (Error ∪ Ok) Source #

Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info rights

setChatDiscussionGroup :: Member TDLib r => SetChatDiscussionGroup -> Sem r (Error ∪ Ok) Source #

Changes the discussion group of a channel chat; requires can_change_info rights in the channel if it is specified

setChatLocation :: Member TDLib r => SetChatLocation -> Sem r (Error ∪ Ok) Source #

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

setChatSlowModeDelay :: Member TDLib r => SetChatSlowModeDelay -> Sem r (Error ∪ Ok) Source #

Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights

pinChatMessage :: Member TDLib r => PinChatMessage -> Sem r (Error ∪ Ok) Source #

Pins a message in a chat; requires can_pin_messages rights

unpinChatMessage :: Member TDLib r => UnpinChatMessage -> Sem r (Error ∪ Ok) Source #

Removes the pinned message from a chat; requires can_pin_messages rights in the group or channel

joinChat :: Member TDLib r => JoinChat -> Sem r (Error ∪ Ok) Source #

Adds current user as a new member to a chat. Private and secret chats can't be joined using this method

leaveChat :: Member TDLib r => LeaveChat -> Sem r (Error ∪ Ok) Source #

Removes current user from chat members. Private and secret chats can't be left using this method

addChatMember :: Member TDLib r => AddChatMember -> Sem r (Error ∪ Ok) Source #

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

addChatMembers :: Member TDLib r => AddChatMembers -> Sem r (Error ∪ Ok) Source #

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

setChatMemberStatus :: Member TDLib r => SetChatMemberStatus -> Sem r (Error ∪ Ok) Source #

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

canTransferOwnership :: Member TDLib r => CanTransferOwnership -> Sem r (Error ∪ CanTransferOwnershipResult) Source #

Checks whether the current session can be used to transfer a chat ownership to another user

transferChatOwnership :: Member TDLib r => TransferChatOwnership -> Sem r (Error ∪ Ok) Source #

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

getChatMember :: Member TDLib r => GetChatMember -> Sem r (Error ∪ ChatMember) Source #

Returns information about a single member of a chat

searchChatMembers :: Member TDLib r => SearchChatMembers -> Sem r (Error ∪ ChatMembers) Source #

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

getChatAdministrators :: Member TDLib r => GetChatAdministrators -> Sem r (Error ∪ ChatAdministrators) Source #

Returns a list of administrators of the chat with their custom titles

clearAllDraftMessages :: Member TDLib r => ClearAllDraftMessages -> Sem r (Error ∪ Ok) Source #

Clears draft messages in all chats

getChatNotificationSettingsExceptions :: Member TDLib r => GetChatNotificationSettingsExceptions -> Sem r (Error ∪ Chats) Source #

Returns list of chats with non-default notification settings

getScopeNotificationSettings :: Member TDLib r => GetScopeNotificationSettings -> Sem r (Error ∪ ScopeNotificationSettings) Source #

Returns the notification settings for chats of a given type

setScopeNotificationSettings :: Member TDLib r => SetScopeNotificationSettings -> Sem r (Error ∪ Ok) Source #

Changes notification settings for chats of a given type

resetAllNotificationSettings :: Member TDLib r => ResetAllNotificationSettings -> Sem r (Error ∪ Ok) Source #

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

setPinnedChats :: Member TDLib r => SetPinnedChats -> Sem r (Error ∪ Ok) Source #

Changes the order of pinned chats

downloadFile :: Member TDLib r => DownloadFile -> Sem r (Error ∪ File) Source #

Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates

getFileDownloadedPrefixSize :: Member TDLib r => GetFileDownloadedPrefixSize -> Sem r (Error ∪ Count) Source #

Returns file downloaded prefix size from a given offset

cancelDownloadFile :: Member TDLib r => CancelDownloadFile -> Sem r (Error ∪ Ok) Source #

Stops the downloading of a file. If a file has already been downloaded, does nothing

uploadFile :: Member TDLib r => UploadFile -> Sem r (Error ∪ File) Source #

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

cancelUploadFile :: Member TDLib r => CancelUploadFile -> Sem r (Error ∪ Ok) Source #

Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined

writeGeneratedFilePart :: Member TDLib r => WriteGeneratedFilePart -> Sem r (Error ∪ Ok) Source #

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

setFileGenerationProgress :: Member TDLib r => SetFileGenerationProgress -> Sem r (Error ∪ Ok) Source #

Informs TDLib on a file generation progress

finishFileGeneration :: Member TDLib r => FinishFileGeneration -> Sem r (Error ∪ Ok) Source #

Finishes the file generation

readFilePart :: Member TDLib r => ReadFilePart -> Sem r (Error ∪ FilePart) Source #

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

deleteFile :: Member TDLib r => DeleteFile -> Sem r (Error ∪ Ok) Source #

Deletes a file from the TDLib file cache

generateChatInviteLink :: Member TDLib r => GenerateChatInviteLink -> Sem r (Error ∪ ChatInviteLink) Source #

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

checkChatInviteLink :: Member TDLib r => CheckChatInviteLink -> Sem r (Error ∪ ChatInviteLinkInfo) Source #

Checks the validity of an invite link for a chat and returns information about the corresponding chat

joinChatByInviteLink :: Member TDLib r => JoinChatByInviteLink -> Sem r (Error ∪ Chat) Source #

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

createCall :: Member TDLib r => CreateCall -> Sem r (Error ∪ CallId) Source #

Creates a new call

acceptCall :: Member TDLib r => AcceptCall -> Sem r (Error ∪ Ok) Source #

Accepts an incoming call

discardCall :: Member TDLib r => DiscardCall -> Sem r (Error ∪ Ok) Source #

Discards a call

sendCallRating :: Member TDLib r => SendCallRating -> Sem r (Error ∪ Ok) Source #

Sends a call rating

sendCallDebugInformation :: Member TDLib r => SendCallDebugInformation -> Sem r (Error ∪ Ok) Source #

Sends debug information for a call

blockUser :: Member TDLib r => BlockUser -> Sem r (Error ∪ Ok) Source #

Adds a user to the blacklist

unblockUser :: Member TDLib r => UnblockUser -> Sem r (Error ∪ Ok) Source #

Removes a user from the blacklist

getBlockedUsers :: Member TDLib r => GetBlockedUsers -> Sem r (Error ∪ Users) Source #

Returns users that were blocked by the current user

addContact :: Member TDLib r => AddContact -> Sem r (Error ∪ Ok) Source #

Adds a user to the contact list or edits an existing contact by their user identifier

importContacts :: Member TDLib r => ImportContacts -> Sem r (Error ∪ ImportedContacts) Source #

Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored

getContacts :: Member TDLib r => GetContacts -> Sem r (Error ∪ Users) Source #

Returns all user contacts

searchContacts :: Member TDLib r => SearchContacts -> Sem r (Error ∪ Users) Source #

Searches for the specified query in the first names, last names and usernames of the known user contacts

removeContacts :: Member TDLib r => RemoveContacts -> Sem r (Error ∪ Ok) Source #

Removes users from the contact list

getImportedContactCount :: Member TDLib r => GetImportedContactCount -> Sem r (Error ∪ Count) Source #

Returns the total number of imported contacts

changeImportedContacts :: Member TDLib r => ChangeImportedContacts -> Sem r (Error ∪ ImportedContacts) Source #

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.

clearImportedContacts :: Member TDLib r => ClearImportedContacts -> Sem r (Error ∪ Ok) Source #

Clears all imported contacts, contact list remains unchanged

sharePhoneNumber :: Member TDLib r => SharePhoneNumber -> Sem r (Error ∪ Ok) Source #

Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber

getUserProfilePhotos :: Member TDLib r => GetUserProfilePhotos -> Sem r (Error ∪ UserProfilePhotos) Source #

Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already

getStickers :: Member TDLib r => GetStickers -> Sem r (Error ∪ Stickers) Source #

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

searchStickers :: Member TDLib r => SearchStickers -> Sem r (Error ∪ Stickers) Source #

Searches for stickers from public sticker sets that correspond to a given emoji

getInstalledStickerSets :: Member TDLib r => GetInstalledStickerSets -> Sem r (Error ∪ StickerSets) Source #

Returns a list of installed sticker sets

getArchivedStickerSets :: Member TDLib r => GetArchivedStickerSets -> Sem r (Error ∪ StickerSets) Source #

Returns a list of archived sticker sets

getTrendingStickerSets :: Member TDLib r => GetTrendingStickerSets -> Sem r (Error ∪ StickerSets) Source #

Returns a list of trending sticker sets. For the optimal performance the number of returned sticker sets is chosen by the library

getAttachedStickerSets :: Member TDLib r => GetAttachedStickerSets -> Sem r (Error ∪ StickerSets) Source #

Returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets

getStickerSet :: Member TDLib r => GetStickerSet -> Sem r (Error ∪ StickerSet) Source #

Returns information about a sticker set by its identifier

searchStickerSet :: Member TDLib r => SearchStickerSet -> Sem r (Error ∪ StickerSet) Source #

Searches for a sticker set by its name

searchInstalledStickerSets :: Member TDLib r => SearchInstalledStickerSets -> Sem r (Error ∪ StickerSets) Source #

Searches for installed sticker sets by looking for specified query in their title and name

searchStickerSets :: Member TDLib r => SearchStickerSets -> Sem r (Error ∪ StickerSets) Source #

Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results

changeStickerSet :: Member TDLib r => ChangeStickerSet -> Sem r (Error ∪ Ok) Source #

Installsuninstalls or activatesarchives a sticker set

viewTrendingStickerSets :: Member TDLib r => ViewTrendingStickerSets -> Sem r (Error ∪ Ok) Source #

Informs the server that some trending sticker sets have been viewed by the user

reorderInstalledStickerSets :: Member TDLib r => ReorderInstalledStickerSets -> Sem r (Error ∪ Ok) Source #

Changes the order of installed sticker sets

getRecentStickers :: Member TDLib r => GetRecentStickers -> Sem r (Error ∪ Stickers) Source #

Returns a list of recently used stickers

addRecentSticker :: Member TDLib r => AddRecentSticker -> Sem r (Error ∪ Stickers) Source #

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

removeRecentSticker :: Member TDLib r => RemoveRecentSticker -> Sem r (Error ∪ Ok) Source #

Removes a sticker from the list of recently used stickers

clearRecentStickers :: Member TDLib r => ClearRecentStickers -> Sem r (Error ∪ Ok) Source #

Clears the list of recently used stickers

addFavoriteSticker :: Member TDLib r => AddFavoriteSticker -> Sem r (Error ∪ Ok) Source #

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

removeFavoriteSticker :: Member TDLib r => RemoveFavoriteSticker -> Sem r (Error ∪ Ok) Source #

Removes a sticker from the list of favorite stickers

getStickerEmojis :: Member TDLib r => GetStickerEmojis -> Sem r (Error ∪ Emojis) Source #

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

searchEmojis :: Member TDLib r => SearchEmojis -> Sem r (Error ∪ Emojis) Source #

Searches for emojis by keywords. Supported only if the file database is enabled

getEmojiSuggestionsUrl :: Member TDLib r => GetEmojiSuggestionsUrl -> Sem r (Error ∪ HttpUrl) Source #

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

addSavedAnimation :: Member TDLib r => AddSavedAnimation -> Sem r (Error ∪ Ok) Source #

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

removeSavedAnimation :: Member TDLib r => RemoveSavedAnimation -> Sem r (Error ∪ Ok) Source #

Removes an animation from the list of saved animations

getRecentInlineBots :: Member TDLib r => GetRecentInlineBots -> Sem r (Error ∪ Users) Source #

Returns up to 20 recently used inline bots in the order of their last usage

searchHashtags :: Member TDLib r => SearchHashtags -> Sem r (Error ∪ Hashtags) Source #

Searches for recently used hashtags by their prefix

removeRecentHashtag :: Member TDLib r => RemoveRecentHashtag -> Sem r (Error ∪ Ok) Source #

Removes a hashtag from the list of recently used hashtags

getWebPagePreview :: Member TDLib r => GetWebPagePreview -> Sem r (Error ∪ WebPage) Source #

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

getWebPageInstantView :: Member TDLib r => GetWebPageInstantView -> Sem r (Error ∪ WebPageInstantView) Source #

Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page

setProfilePhoto :: Member TDLib r => SetProfilePhoto -> Sem r (Error ∪ Ok) Source #

Uploads a new profile photo for the current user. If something changes, updateUser will be sent

deleteProfilePhoto :: Member TDLib r => DeleteProfilePhoto -> Sem r (Error ∪ Ok) Source #

Deletes a profile photo. If something changes, updateUser will be sent

setName :: Member TDLib r => SetName -> Sem r (Error ∪ Ok) Source #

Changes the first and last name of the current user. If something changes, updateUser will be sent

setBio :: Member TDLib r => SetBio -> Sem r (Error ∪ Ok) Source #

Changes the bio of the current user

setUsername :: Member TDLib r => SetUsername -> Sem r (Error ∪ Ok) Source #

Changes the username of the current user. If something changes, updateUser will be sent

setLocation :: Member TDLib r => SetLocation -> Sem r (Error ∪ Ok) Source #

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

changePhoneNumber :: Member TDLib r => ChangePhoneNumber -> Sem r (Error ∪ AuthenticationCodeInfo) Source #

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

resendChangePhoneNumberCode :: Member TDLib r => ResendChangePhoneNumberCode -> Sem r (Error ∪ AuthenticationCodeInfo) Source #

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

checkChangePhoneNumberCode :: Member TDLib r => CheckChangePhoneNumberCode -> Sem r (Error ∪ Ok) Source #

Checks the authentication code sent to confirm a new phone number of the user

setCommands :: Member TDLib r => SetCommands -> Sem r (Error ∪ Ok) Source #

Sets the list of commands supported by the bot; for bots only

getActiveSessions :: Member TDLib r => GetActiveSessions -> Sem r (Error ∪ Sessions) Source #

Returns all active sessions of the current user

terminateSession :: Member TDLib r => TerminateSession -> Sem r (Error ∪ Ok) Source #

Terminates a session of the current user

terminateAllOtherSessions :: Member TDLib r => TerminateAllOtherSessions -> Sem r (Error ∪ Ok) Source #

Terminates all other sessions of the current user

getConnectedWebsites :: Member TDLib r => GetConnectedWebsites -> Sem r (Error ∪ ConnectedWebsites) Source #

Returns all website where the current user used Telegram to log in

disconnectWebsite :: Member TDLib r => DisconnectWebsite -> Sem r (Error ∪ Ok) Source #

Disconnects website from the current user's Telegram account

disconnectAllWebsites :: Member TDLib r => DisconnectAllWebsites -> Sem r (Error ∪ Ok) Source #

Disconnects all websites from the current user's Telegram account

setSupergroupUsername :: Member TDLib r => SetSupergroupUsername -> Sem r (Error ∪ Ok) Source #

Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel

setSupergroupStickerSet :: Member TDLib r => SetSupergroupStickerSet -> Sem r (Error ∪ Ok) Source #

Changes the sticker set of a supergroup; requires can_change_info rights

toggleSupergroupSignMessages :: Member TDLib r => ToggleSupergroupSignMessages -> Sem r (Error ∪ Ok) Source #

Toggles sender signatures messages sent in a channel; requires can_change_info rights

toggleSupergroupIsAllHistoryAvailable :: Member TDLib r => ToggleSupergroupIsAllHistoryAvailable -> Sem r (Error ∪ Ok) Source #

Toggles whether the message history of a supergroup is available to new members; requires can_change_info rights

reportSupergroupSpam :: Member TDLib r => ReportSupergroupSpam -> Sem r (Error ∪ Ok) Source #

Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup

getSupergroupMembers :: Member TDLib r => GetSupergroupMembers -> Sem r (Error ∪ ChatMembers) Source #

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

deleteSupergroup :: Member TDLib r => DeleteSupergroup -> Sem r (Error ∪ Ok) Source #

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

closeSecretChat :: Member TDLib r => CloseSecretChat -> Sem r (Error ∪ Ok) Source #

Closes a secret chat, effectively transferring its state to secretChatStateClosed

getChatEventLog :: Member TDLib r => GetChatEventLog -> Sem r (Error ∪ ChatEvents) Source #

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)

getPaymentForm :: Member TDLib r => GetPaymentForm -> Sem r (Error ∪ PaymentForm) Source #

Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy

validateOrderInfo :: Member TDLib r => ValidateOrderInfo -> Sem r (Error ∪ ValidatedOrderInfo) Source #

Validates the order information provided by a user and returns the available shipping options for a flexible invoice

sendPaymentForm :: Member TDLib r => SendPaymentForm -> Sem r (Error ∪ PaymentResult) Source #

Sends a filled-out payment form to the bot for final verification

getPaymentReceipt :: Member TDLib r => GetPaymentReceipt -> Sem r (Error ∪ PaymentReceipt) Source #

Returns information about a successful payment

getSavedOrderInfo :: Member TDLib r => GetSavedOrderInfo -> Sem r (Error ∪ OrderInfo) Source #

Returns saved order info, if any

deleteSavedOrderInfo :: Member TDLib r => DeleteSavedOrderInfo -> Sem r (Error ∪ Ok) Source #

Deletes saved order info

deleteSavedCredentials :: Member TDLib r => DeleteSavedCredentials -> Sem r (Error ∪ Ok) Source #

Deletes saved credentials for all payment provider bots

getSupportUser :: Member TDLib r => GetSupportUser -> Sem r (Error ∪ User) Source #

Returns a user that can be contacted to get support

getBackgrounds :: Member TDLib r => GetBackgrounds -> Sem r (Error ∪ Backgrounds) Source #

Returns backgrounds installed by the user

getBackgroundUrl :: Member TDLib r => GetBackgroundUrl -> Sem r (Error ∪ HttpUrl) Source #

Constructs a persistent HTTP URL for a background

searchBackground :: Member TDLib r => SearchBackground -> Sem r (Error ∪ Background) Source #

Searches for a background by its name

setBackground :: Member TDLib r => SetBackground -> Sem r (Error ∪ Background) Source #

Changes the background selected by the user; adds background to the list of installed backgrounds

removeBackground :: Member TDLib r => RemoveBackground -> Sem r (Error ∪ Ok) Source #

Removes background from the list of installed backgrounds

resetBackgrounds :: Member TDLib r => ResetBackgrounds -> Sem r (Error ∪ Ok) Source #

Resets list of installed backgrounds to its default value

getLocalizationTargetInfo :: Member TDLib r => GetLocalizationTargetInfo -> Sem r (Error ∪ LocalizationTargetInfo) Source #

Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization

getLanguagePackInfo :: Member TDLib r => GetLanguagePackInfo -> Sem r (Error ∪ LanguagePackInfo) Source #

Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization

getLanguagePackStrings :: Member TDLib r => GetLanguagePackStrings -> Sem r (Error ∪ LanguagePackStrings) Source #

Returns strings from a language pack in the current localization target by their keys. Can be called before authorization

synchronizeLanguagePack :: Member TDLib r => SynchronizeLanguagePack -> Sem r (Error ∪ Ok) Source #

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

addCustomServerLanguagePack :: Member TDLib r => AddCustomServerLanguagePack -> Sem r (Error ∪ Ok) Source #

Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization

setCustomLanguagePack :: Member TDLib r => SetCustomLanguagePack -> Sem r (Error ∪ Ok) Source #

Adds or changes a custom local language pack to the current localization target

editCustomLanguagePackInfo :: Member TDLib r => EditCustomLanguagePackInfo -> Sem r (Error ∪ Ok) Source #

Edits information about a custom local language pack in the current localization target. Can be called before authorization

setCustomLanguagePackString :: Member TDLib r => SetCustomLanguagePackString -> Sem r (Error ∪ Ok) Source #

Adds, edits or deletes a string in a custom local language pack. Can be called before authorization

deleteLanguagePack :: Member TDLib r => DeleteLanguagePack -> Sem r (Error ∪ Ok) Source #

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

registerDevice :: Member TDLib r => RegisterDevice -> Sem r (Error ∪ PushReceiverId) Source #

Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription

processPushNotification :: Member TDLib r => ProcessPushNotification -> Sem r (Error ∪ Ok) Source #

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

getPushReceiverId :: Member TDLib r => GetPushReceiverId -> Sem r (Error ∪ PushReceiverId) Source #

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

getRecentlyVisitedTMeUrls :: Member TDLib r => GetRecentlyVisitedTMeUrls -> Sem r (Error ∪ TMeUrls) Source #

Returns t.me URLs recently visited by a newly registered user

getOption :: Member TDLib r => GetOption -> Sem r (Error ∪ OptionValue) Source #

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

setOption :: Member TDLib r => SetOption -> Sem r (Error ∪ Ok) Source #

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

setAccountTtl :: Member TDLib r => SetAccountTtl -> Sem r (Error ∪ Ok) Source #

Changes 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) Source #

Returns the period of inactivity after which the account of the current user will automatically be deleted

deleteAccount :: Member TDLib r => DeleteAccount -> Sem r (Error ∪ Ok) Source #

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

removeChatActionBar :: Member TDLib r => RemoveChatActionBar -> Sem r (Error ∪ Ok) Source #

Removes a chat action bar without any other action

reportChat :: Member TDLib r => ReportChat -> Sem r (Error ∪ Ok) Source #

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

getChatStatisticsUrl :: Member TDLib r => GetChatStatisticsUrl -> Sem r (Error ∪ HttpUrl) Source #

Returns an HTTP URL with the chat statistics. Currently this method of getting the statistics is disabled and can be deleted in the future

getChatStatistics :: Member TDLib r => GetChatStatistics -> Sem r (Error ∪ ChatStatistics) Source #

Returns detailed statistics about a chat. Currently this method can be used only for channels. Requires administrator rights in the channel

getChatStatisticsGraph :: Member TDLib r => GetChatStatisticsGraph -> Sem r (Error ∪ StatisticsGraph) Source #

Loads asynchronous or zoomed in chat statistics graph

getStorageStatistics :: Member TDLib r => GetStorageStatistics -> Sem r (Error ∪ StorageStatistics) Source #

Returns storage usage statistics. Can be called before authorization

getStorageStatisticsFast :: Member TDLib r => GetStorageStatisticsFast -> Sem r (Error ∪ StorageStatisticsFast) Source #

Quickly returns approximate storage usage statistics. Can be called before authorization

optimizeStorage :: Member TDLib r => OptimizeStorage -> Sem r (Error ∪ StorageStatistics) Source #

Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted

setNetworkType :: Member TDLib r => SetNetworkType -> Sem r (Error ∪ Ok) Source #

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.

getNetworkStatistics :: Member TDLib r => GetNetworkStatistics -> Sem r (Error ∪ NetworkStatistics) Source #

Returns network data usage statistics. Can be called before authorization

addNetworkStatistics :: Member TDLib r => AddNetworkStatistics -> Sem r (Error ∪ Ok) Source #

Adds the specified data to data usage statistics. Can be called before authorization

resetNetworkStatistics :: Member TDLib r => ResetNetworkStatistics -> Sem r (Error ∪ Ok) Source #

Resets all network data usage statistics to zero. Can be called before authorization

getAutoDownloadSettingsPresets :: Member TDLib r => GetAutoDownloadSettingsPresets -> Sem r (Error ∪ AutoDownloadSettingsPresets) Source #

Returns auto-download settings presets for the current user

getBankCardInfo :: Member TDLib r => GetBankCardInfo -> Sem r (Error ∪ BankCardInfo) Source #

Returns information about a bank card

getPassportElement :: Member TDLib r => GetPassportElement -> Sem r (Error ∪ PassportElement) Source #

Returns one of the available Telegram Passport elements

getAllPassportElements :: Member TDLib r => GetAllPassportElements -> Sem r (Error ∪ PassportElements) Source #

Returns all available Telegram Passport elements

setPassportElement :: Member TDLib r => SetPassportElement -> Sem r (Error ∪ PassportElement) Source #

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

deletePassportElement :: Member TDLib r => DeletePassportElement -> Sem r (Error ∪ Ok) Source #

Deletes a Telegram Passport element

setPassportElementErrors :: Member TDLib r => SetPassportElementErrors -> Sem r (Error ∪ Ok) Source #

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

getPreferredCountryLanguage :: Member TDLib r => GetPreferredCountryLanguage -> Sem r (Error ∪ Text) Source #

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

sendPhoneNumberVerificationCode :: Member TDLib r => SendPhoneNumberVerificationCode -> Sem r (Error ∪ AuthenticationCodeInfo) Source #

Sends a code to verify a phone number to be added to a user's Telegram Passport

resendPhoneNumberVerificationCode :: Member TDLib r => ResendPhoneNumberVerificationCode -> Sem r (Error ∪ AuthenticationCodeInfo) Source #

Re-sends the code to verify a phone number to be added to a user's Telegram Passport

checkPhoneNumberVerificationCode :: Member TDLib r => CheckPhoneNumberVerificationCode -> Sem r (Error ∪ Ok) Source #

Checks the phone number verification code for Telegram Passport

sendEmailAddressVerificationCode :: Member TDLib r => SendEmailAddressVerificationCode -> Sem r (Error ∪ EmailAddressAuthenticationCodeInfo) Source #

Sends a code to verify an email address to be added to a user's Telegram Passport

resendEmailAddressVerificationCode :: Member TDLib r => ResendEmailAddressVerificationCode -> Sem r (Error ∪ EmailAddressAuthenticationCodeInfo) Source #

Re-sends the code to verify an email address to be added to a user's Telegram Passport

checkEmailAddressVerificationCode :: Member TDLib r => CheckEmailAddressVerificationCode -> Sem r (Error ∪ Ok) Source #

Checks the email address verification code for Telegram Passport

getPassportAuthorizationForm :: Member TDLib r => GetPassportAuthorizationForm -> Sem r (Error ∪ PassportAuthorizationForm) Source #

Returns a Telegram Passport authorization form for sharing data with a service

getPassportAuthorizationFormAvailableElements :: Member TDLib r => GetPassportAuthorizationFormAvailableElements -> Sem r (Error ∪ PassportElementsWithErrors) Source #

Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form

sendPassportAuthorizationForm :: Member TDLib r => SendPassportAuthorizationForm -> Sem r (Error ∪ Ok) Source #

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

sendPhoneNumberConfirmationCode :: Member TDLib r => SendPhoneNumberConfirmationCode -> Sem r (Error ∪ AuthenticationCodeInfo) Source #

Sends phone number confirmation code. Should be called when user presses "https://t.me/confirmphone?phone=*******&hash=**********" or "tg://confirmphone?phone=*******&hash=**********" link

setBotUpdatesStatus :: Member TDLib r => SetBotUpdatesStatus -> Sem r (Error ∪ Ok) Source #

Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only

uploadStickerFile :: Member TDLib r => UploadStickerFile -> Sem r (Error ∪ File) Source #

Uploads a PNG image with a sticker; for bots only; returns the uploaded file

createNewStickerSet :: Member TDLib r => CreateNewStickerSet -> Sem r (Error ∪ StickerSet) Source #

Creates a new sticker set; for bots only. Returns the newly created sticker set

addStickerToSet :: Member TDLib r => AddStickerToSet -> Sem r (Error ∪ StickerSet) Source #

Adds a new sticker to a set; for bots only. Returns the sticker set

setStickerSetThumbnail :: Member TDLib r => SetStickerSetThumbnail -> Sem r (Error ∪ StickerSet) Source #

Sets a sticker set thumbnail; for bots only. Returns the sticker set

setStickerPositionInSet :: Member TDLib r => SetStickerPositionInSet -> Sem r (Error ∪ Ok) Source #

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

removeStickerFromSet :: Member TDLib r => RemoveStickerFromSet -> Sem r (Error ∪ Ok) Source #

Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot

getMapThumbnailFile :: Member TDLib r => GetMapThumbnailFile -> Sem r (Error ∪ File) Source #

Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded

acceptTermsOfService :: Member TDLib r => AcceptTermsOfService -> Sem r (Error ∪ Ok) Source #

Accepts Telegram terms of services

sendCustomRequest :: Member TDLib r => SendCustomRequest -> Sem r (Error ∪ CustomRequestResult) Source #

Sends a custom request; for bots only

answerCustomQuery :: Member TDLib r => AnswerCustomQuery -> Sem r (Error ∪ Ok) Source #

Answers a custom query; for bots only

setAlarm :: Member TDLib r => SetAlarm -> Sem r (Error ∪ Ok) Source #

Succeeds after a specified amount of time has passed. Can be called before authorization. Can be called before initialization

getCountryCode :: Member TDLib r => GetCountryCode -> Sem r (Error ∪ Text) Source #

Uses current user IP address to found their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization

getInviteText :: Member TDLib r => GetInviteText -> Sem r (Error ∪ Text) Source #

Returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram

getDeepLinkInfo :: Member TDLib r => GetDeepLinkInfo -> Sem r (Error ∪ DeepLinkInfo) Source #

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

getApplicationConfig :: Member TDLib r => GetApplicationConfig -> Sem r (Error ∪ JsonValue) Source #

Returns application config, provided by the server. Can be called before authorization

saveApplicationLogEvent :: Member TDLib r => SaveApplicationLogEvent -> Sem r (Error ∪ Ok) Source #

Saves application log event on the server. Can be called before authorization

addProxy :: Member TDLib r => AddProxy -> Sem r (Error ∪ Proxy) Source #

Adds a proxy server for network requests. Can be called before authorization

editProxy :: Member TDLib r => EditProxy -> Sem r (Error ∪ Proxy) Source #

Edits an existing proxy server for network requests. Can be called before authorization

enableProxy :: Member TDLib r => EnableProxy -> Sem r (Error ∪ Ok) Source #

Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization

disableProxy :: Member TDLib r => DisableProxy -> Sem r (Error ∪ Ok) Source #

Disables the currently enabled proxy. Can be called before authorization

removeProxy :: Member TDLib r => RemoveProxy -> Sem r (Error ∪ Ok) Source #

Removes a proxy server. Can be called before authorization

getProxies :: Member TDLib r => GetProxies -> Sem r (Error ∪ Proxies) Source #

Returns list of proxies that are currently set up. Can be called before authorization

getProxyLink :: Member TDLib r => GetProxyLink -> Sem r (Error ∪ Text) Source #

Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization

pingProxy :: Member TDLib r => PingProxy -> Sem r (Error ∪ Seconds) Source #

Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization

setLogStream :: Member TDLib r => SetLogStream -> Sem r (Error ∪ Ok) Source #

Sets new 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) Source #

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

setLogVerbosityLevel :: Member TDLib r => SetLogVerbosityLevel -> Sem r (Error ∪ Ok) Source #

Sets the 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) Source #

Returns current verbosity level of the internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously

getLogTags :: Member TDLib r => GetLogTags -> Sem r (Error ∪ LogTags) Source #

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

setLogTagVerbosityLevel :: Member TDLib r => SetLogTagVerbosityLevel -> Sem r (Error ∪ Ok) Source #

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

getLogTagVerbosityLevel :: Member TDLib r => GetLogTagVerbosityLevel -> Sem r (Error ∪ LogVerbosityLevel) Source #

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

addLogMessage :: Member TDLib r => AddLogMessage -> Sem r (Error ∪ Ok) Source #

Adds a message to TDLib internal log. This is an offline method. Can be called before authorization. Can be called synchronously

testCallEmpty :: Member TDLib r => TestCallEmpty -> Sem r (Error ∪ Ok) Source #

Does nothing; for testing only. This is an offline method. Can be called before authorization

testCallString :: Member TDLib r => TestCallString -> Sem r (Error ∪ TestString) Source #

Returns the received string; for testing only. This is an offline method. Can be called before authorization

testCallBytes :: Member TDLib r => TestCallBytes -> Sem r (Error ∪ TestBytes) Source #

Returns the received bytes; for testing only. This is an offline method. Can be called before authorization

testCallVectorInt :: Member TDLib r => TestCallVectorInt -> Sem r (Error ∪ TestVectorInt) Source #

Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization

testCallVectorIntObject :: Member TDLib r => TestCallVectorIntObject -> Sem r (Error ∪ TestVectorIntObject) Source #

Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization

testCallVectorString :: Member TDLib r => TestCallVectorString -> Sem r (Error ∪ TestVectorString) Source #

Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization

testCallVectorStringObject :: Member TDLib r => TestCallVectorStringObject -> Sem r (Error ∪ TestVectorStringObject) Source #

Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization

testSquareInt :: Member TDLib r => TestSquareInt -> Sem r (Error ∪ TestInt) Source #

Returns the squared received number; for testing only. This is an offline method. Can be called before authorization

testNetwork :: Member TDLib r => TestNetwork -> Sem r (Error ∪ Ok) Source #

Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization

testProxy :: Member TDLib r => TestProxy -> Sem r (Error ∪ Ok) Source #

Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization

testGetDifference :: Member TDLib r => TestGetDifference -> Sem r (Error ∪ Ok) Source #

Forces an updates.getDifference call to the Telegram servers; for testing only

testUseUpdate :: Member TDLib r => TestUseUpdate -> Sem r (Error ∪ Update) Source #

Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization

testReturnError :: Member TDLib r => TestReturnError -> Sem r (Error ∪ Error) Source #

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