import { Client } from "https://deno.land/x/mtkruto@0.1.0/client/4_client.ts";
Constructors
Properties
Methods
Answer a callback query. Bot-only.
Calls initConnection and authorizes the client with one of the following:
- Bot token (
string
) - Exported authorization (
types.AuthExportedAuthorization
) - User authorization handlers (
AuthorizeUserParams
)
if the current auth key doesn't throw AUTH_KEY_UNREGISTERED when calling updates.getState.
Notes:
- Requires the
apiId
andapiHash
paramters to be passed when constructing the client. - Reconnects the client to the appropriate DC in case of MIGRATE_X errors.
- The parameters passed to the initConnection call can be configured with the last parameter of the constructor.
Loads the session if setDc
was not called, initializes and connnects
a ClientPlain
to generate auth key if there was none, and connects the client.
Before establishing the connection, the session is saved.
Download a file.
Edit a message's text.
Forward a single message.
Forward multiple messages.
Get information on the currently authorized user.
Retrieve a single message.
Retrieve multiple messages.
Invokes a function waiting and returning its reply if the second parameter is not true
. Requires the client
to be connected.
Alias for invoke
with its second parameter being true
.
Send a chat action.
Send a text message.
Send a poll.
Sets the DC and resets the auth key stored in the session provider
if the stored DC was not the same as the dc
parameter.
Same as calling .connect()
followed by .authorize(params)
.