import { StorageOperations } from "https://deno.land/x/mtkruto@0.6.2/client/0_storage_operations.ts";
Constructors
new
StorageOperations(storage: Storage)Properties
readonly
provider: StorageMethods
assertBot(source: string)
assertUser(source: string)
clear()
exportAuthString(apiId_?: number | null): Promise<string>
getAccountId(): Promise<number | null>
getAccountType(): Promise<"user" | "bot" | null>
getApiId(): Promise<number | null>
getAuthKey(): Promise<Uint8Array | null>
getBusinessConnection(id: string): Promise<Api.botBusinessConnection | null>
getCallbackQueryAnswer(): Promise<[Api.messages_botCallbackAnswer, Date] | null>
chatId: number,
messageId: number,
question: string,
getChannelAccessHash(id: number): Promise<bigint | null>
getChannelPts(channelId: bigint): MaybePromise<number | null>
getCustomEmojiDocument(id: bigint): Promise<[Api.document, Date] | null>
getDc(): MaybePromise<DC | null>
getEntity(key: number): Promise<ReadObject | null>
getFile(id: bigint): Promise<[number, number] | null>
getFirstUpdate(boxId: bigint): Promise<[readonly StorageKeyPart[], Api.Update] | null>
getFullChat(chatId: number): Promise<>
| Api.userFull
| Api.channelFull
| Api.chatFull
| null
getGroupCall(id: bigint): Promise<Api.groupCall | null>
getGroupCallAccessHash(id: bigint): Promise<bigint | null>
getHistory(): Promise<Api.Message[]>
chatId: number,
offsetId: number,
limit: number,
getInlineQueryAnswer(): Promise<[Api.messages_botResults, Date] | null>
userId: number,
chatId: number,
query: string,
offset: string,
getLastMessage(chatId: number): Promise<Api.Message | null>
getLastMinPeerReference(senderId: number): Promise<{ chatId: number; messageId: number; } | null>
getMessage(chatId: number, messageId: number): Promise<Api.Message | null>
getMessageChat(messageId: number): MaybePromise<number | null>
getPinnedChats(listId: number): Promise<number[] | null>
getServerSalt(): MaybePromise<bigint | null>
getState(): Promise<Api.updates_State | null>
getStickerSetName(id: bigint, accessHash: bigint): MaybePromise<[string, Date] | null>
getTlObject(keyOrBuffer: Api.AnyType | Uint8Array | readonly StorageKeyPart[]): Promise<ReadObject | null>
getUserAccessHash(id: number): Promise<bigint | null>
getUsername(username: string): Promise<[number, Date] | null>
hasAllChats(listId: number): Promise<boolean>
importAuthString(string: string)
iterFileParts(): AsyncGenerator<Uint8Array>
removeChats(listId: number)
reset()
saveFilePart()
id: bigint,
index: number,
bytes: Uint8Array,
setAccountId(accountId: number)
setAccountType(type: "user" | "bot")
setApiId(apiId: number)
setAuthKey(authKey: Uint8Array | null)
setBusinessConnection(id: string, connection: Api.botBusinessConnection | null)
setCallbackQueryAnswer()
chatId: number,
messageId: number,
question: string,
answer: Api.messages_botCallbackAnswer,
setChannelPts(channelId: bigint, pts: number)
setCustomEmojiDocument(id: bigint, document: Api.document)
setDc(dc: DC | null)
setEntity(entity: AnyEntity)
setFilePartCount()
id: bigint,
partCount: number,
chunkSize: number,
setFullChat(chatId: number, fullChat: )
| Api.userFull
| Api.channelFull
| Api.chatFull
| null
setGroupCall(id: bigint, groupCall: Api.groupCall | null)
setGroupCallAccessHash(id: bigint, accessHash: bigint | null)
setHasAllChats(listId: number, hasAllChats: boolean)
setInlineQueryAnswer()
userId: number,
chatId: number,
query: string,
offset: string,
results: Api.messages_botResults,
date: Date,
setMessage()
chatId: number,
messageId: number,
message: Api.Message | null,
setMinPeerReference()
chatId: number,
senderId: number,
messageId: number,
setPinnedChats(listId: number, chatIds: number[] | null)
setServerSalt(serverSalt: bigint)
setState(state: Api.updates_State)
setTlObject(key: readonly StorageKeyPart[], value: Api.AnyType | null)
setUpdate(boxId: bigint, update: Api.Update)
updateStickerSetName()
id: bigint,
accessHash: bigint,
name: string,
updateUsernames(id: number, usernames: string[])