import { Client } from "https://deno.land/x/mtkruto@0.1.147/client/4_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
Make a reaction to a message.
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.
Ban a member from a chat.
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.
Delete a chat's photo.
Delete a single message.
Delete multiple messages.
Download a file.
Edit a message's reply markup.
Edit a message's text.
Forward a single message.
Forward multiple messages.
Get the administrators of a chat.
Get chats from a chat list. User-only.
Get custom emoji documents for download.
Get chat history. User-only.
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.
Get network statistics. This might not always be available.
Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
Pin a message in a chat.
Undo a reaction made to a message.
Alias for invoke
with its second parameter being true
.
Send an animation.
Send an audio file.
Send a chat action.
Send a contact.
Send a dice.
Send a document.
Send a location.
Send a text message.
Send a photo.
Send a poll.
Send a venue.
Send a video.
Send a video note.
Send a voice message.
Set a chat's available reactions.
Set the rights of a chat member.
Set a chat's photo.
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.
Change reactions made to a message.
Same as calling .connect()
followed by .authorize(params)
.
Unban a member from a chat.
Unpin a pinned message.
Unpin all pinned messages.
Upload a file.