import { Client } from "https://deno.land/x/mtkruto@0.1.117/client/5_client.ts";
Constructors
Properties
Methods
Answer a callback query. Bot-only.
Answer an inline 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.
Delete a single message.
Delete multiple messages.
Download a file.
Edit a message's text.
Forward a single message.
Forward multiple messages.
Retrieve a single message.
Retrieve multiple messages.
Get the bot's commands in the given scope and/or language. Bot-only.
Get the bot's description in the given language. Bot-only.
Set the bot's name in the given language. Bot-only.
Get the bot's short description in the given language. Bot-only.
Alias for invoke
with its second parameter being true
.
Send a chat action.
Send a text message.
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.
Set the bot's commands in the given scope and/or language. Bot-only.
Set the bot's description in the given language. Bot-only.
Set the bot's name in the given language. Bot-only.
Set the bot's short description in the given language. Bot-only.
Same as calling .connect()
followed by .authorize(params)
if the session didn't have an auth key.
Upload a file.