import { Client } from "https://deno.land/x/mtkruto@0.2.24/client/5_client.ts";
An MTKruto client.
Properties
Invokes a function waiting and returning its reply if the second parameter is not true
. Requires the client
to be connected.
Methods
Add multiple users at once to a channel or a supergroup.
Add multiple stories to highlights. User-only.
Answer a callback query. Bot-only.
Approve all join requests. User-only.
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.
Create an invite link.
Decline all join requests. User-only.
Delete all messages sent by a specific member of a chat. User-only.
Download a file.
Download a live stream chunk. User-only.
Edit an inline message's reply markup. Bot-only.
Edit a message's live location.
Get information on a user's chat membership.
Get the invite links created for a chat. User-only.
Get custom emoji documents for download.
Get a channel or a supergroup's inputChannel. Useful when calling API functions directly.
Get a chat's inputPeer. Useful when calling API functions directly.
Get a user's inputUser. Useful when calling API functions directly.
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.
Get 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.
Hide a username from the current account, a bot account, a supergroup, or a channel's profile. User-only.
Hide all usernames from the a supergroup or a channel's profile. User-only.
Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
Refund a star payment. Bot-only.
Remove multiple stories from highlights. User-only.
Remove a single story from highlights. User-only.
Reorder the usernames of the current account, a bot account, a supergroup, or a channel's profile. User-only.
Alias for invoke
with its second parameter being true
.
Send an invoice.
Send a venue.
Set a chat's available reactions. User-only.
Set the number of boosts required to circument a chat's default restrictions. User-only.
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.
Show a username in the current account, a bot account, a supergroup, or a channel's profile. User-only.
Signs in using the provided parameters if not already signed in. If no parameters are provided, the credentials will be prompted in runtime.
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.
Start a video chat. User-only.