import { Client } from "https://deno.land/x/mtkruto@0.6.3/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 a single user to a chat.
Add multiple users at once to a channel or a supergroup.
Make a reaction to a message.
Add multiple stories to highlights. User-only.
Add a single story to highlights. User-only.
Answer a callback query. Bot-only.
Answer an inline query. Bot-only.
Answer a pre-checkout query. Bot-only.
Approve a join request.
Approve all join requests. User-only.
Ban a member from a chat.
Block a user. User-only.
Close a chat previously opened by openChat. 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 a channel. User-only.
Create a group. User-only.
Create an invite link.
Create a story. User-only.
Create a supergroup. User-only.
Decline a join request.
Decline all join requests. User-only.
Delete all messages sent by a specific member of a chat. User-only.
Delete a chat's photo.
Delete a chat's sticker set.
Delete a single message.
Delete multiple messages.
Delete a scheduled message.
Delete multiple scheduled messages.
Delete multiple stories. User-only.
Delete a single story. User-only.
Disable join requests in a chat. User-only.
Download a file.
Download a live stream chunk. User-only.
Edit an inline message's live location. Bot-only.
Edit an inline message's media.
Edit an inline message's reply markup. Bot-only.
Edit an inline message's text. Bot-only.
Edit a message's live location.
Edit a message's media.
Edit a message's reply markup.
Edit a message's text.
Enable join requests in a chat. User-only.
Forward a single message.
Forward multiple messages.
Get a business connection. Bot-only.
Get a chat.
Get the administrators of a chat.
Get information on a user's chat membership.
Get the members of a chat.
Get chats from a chat list. User-only.
Get the invite links created for a chat. User-only.
Get custom emoji documents for download.
Get chat history. User-only.
Get inactive chats. User-only.
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 live stream channels. User-only.
Get information on the currently authorized user.
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.
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.
Retrieve multiple stories. User-only.
Retrieve a single story. User-only.
Get a video chat. User-only.
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.
Join a chat. User-only.
Join a live stream. User-only.
Join a video chat. User-only.
Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
Leave a chat.
Leave a video chat. User-only.
Open a chat. User-only.
Pin a message in a chat.
Mark messages as read. User-only.
Refund a star payment. Bot-only.
Undo a reaction made to a message.
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.
Schedule a video chat. User-only.
Search the messages of a chat. User-only.
Alias for invoke
with its second parameter being true
.
Send an animation.
Send an audio file.
Send a callback query. User-only.
Send a chat action.
Send a contact.
Send a dice.
Send a document.
Send an inline query. User-only.
Send an invoice. Bot-only.
Send a location.
Send a media group.
Send a text message.
Send a photo.
Send a poll.
Send a scheduled message before its schedule.
Send multiple scheduled messages before their schedule.
Send a sticker.
Send a venue.
Send a video.
Send a video note.
Send a voice message.
Set a chat's available reactions. User-only.
Set the number of boosts required to circument a chat's default restrictions. User-only.
Set the rights of a chat member.
Set a chat's photo.
Set a chat's sticker set.
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 time to live of the messages of a chat. User-only.
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.
Set the current account's online status. User-only.
Change reactions made to a message.
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.
Same as calling .connect()
followed by .signIn(params)
.
Start a bot. User-only.
Start a video chat. User-only.
Stop a poll.
Unban a member from a chat.
Unblock a user. User-only.
Unpin a pinned message.
Unpin all pinned messages.