import { Client } from "https://deno.land/x/mtkruto@0.1.102/mod.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.
Edit a message's text.
Forward a single message.
Forward multiple messages.
Retrieve a single message.
Use this method to get the current bot description for the given user language.
Use this method to get the current bot name for the given user language.
Use this method to get the current bot short description for the given user language.
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 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.
Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty.
Use this method to change the bot's name.
Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot.
Same as calling .connect()
followed by .authorize(params)
.
Upload a file.