import { Client } from "https://deno.land/x/mtkruto@0.1.157/client/4_client.ts";
Constructors
Constructs the client.
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.
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.
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.
Block a user. 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.
Create a story. User-only.
Delete all messages sent by a specific member of a chat.
Delete a chat's photo.
Delete a single message.
Delete multiple messages.
Delete multiple stories. User-only.
Delete a single story. User-only.
Disable join requests in a chat. User-only.
Download a file.
Edit an inline message's reply markup.
Edit an inline message's text.
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 chat.
Get the administrators 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 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.
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.
Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
Leave a chat.
Pin a message in a chat.
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.
Search the messages of a chat.
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 number of boosts required to circument a chat's default restrictions.
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.
Show a username in the current account, a bot account, sa upergroup, or a channel's profile. User-only.
Same as calling .connect()
followed by .authorize(params)
.
Unban a member from a chat.
Unblock a user. User-only.
Unpin a pinned message.
Unpin all pinned messages.
Upload a file.