import { Client } from "https://deno.land/x/mtkruto@0.1.147/5_client.ts";
Constructors
Properties
Invokes a function waiting and returning its reply if the second parameter is not true
. Requires the client
to be connected.
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.
Delete all messages sent by a specific member of a chat.
Download a file.
Get custom emoji documents for download.
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.
Get network statistics. This might not always be available.
Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
Alias for invoke
with its second parameter being true
.
Send a venue.
Set a chat's available reactions.
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)
.