import { Storage } from "https://deno.land/x/mtkruto@0.1.141/3_storage.ts";
Methods
assertBot(source: string)
assertUser(source: string)
abstract
get<T>(key: readonly StorageKeyPart[]): MaybePromise<T | null>getChannelAccessHash(id: bigint)
getChannelPts(channelId: bigint)
getChats(listId: number)
getCustomEmojiDocument(id: bigint)
getDc()
getEntity(type: "channel", id: bigint): Promise<types.Channel | types.ChannelForbidden | null>
getEntity(type: "chat", id: bigint): Promise<types.Chat | types.ChatForbidden | null>
getEntity(type: "user", id: bigint): Promise<types.User | null>
getEntity(type: "channel" | "chat" | "user", id: bigint): Promise<>
| types.Channel
| types.ChannelForbidden
| types.Chat
| types.ChatForbidden
| types.User
| null
getFile(id: bigint)
getFirstUpdate(boxId: bigint)
getHistory()
chatId: number,
offsetId: number,
limit: number,
getLastMessage(chatId: number)
abstract
getMany<T>(prefix: GetManyFilter, params?: { limit?: number; reverse?: boolean; }): MaybePromise<Generator<[readonly StorageKeyPart[], T]> | AsyncGenerator<[readonly StorageKeyPart[], T]>>getMessage(chatId: number, messageId: number)
getMessageChat(messageId: number)
getPinnedChats(listId: number)
getState()
getStickerSetName(id: bigint, accessHash: bigint)
getTlObject(keyOrBuffer: Uint8Array | readonly StorageKeyPart[])
getUserAccessHash(id: bigint)
getUsername(username: string)
hasAllChats(listId: number)
abstract
incr(key: readonly StorageKeyPart[], by: number): MaybePromise<void>abstract
initialize(): MaybePromise<void>iterFileParts()
id: bigint,
partCount: number,
offset: number,
removeChats(listId: number)
removeEntity(entity: )
| types.User
| types.Channel
| types.ChannelForbidden
| types.Chat
| types.ChatForbidden
saveFilePart()
id: bigint,
index: number,
bytes: Uint8Array,
abstract
set(key: readonly StorageKeyPart[], value: unknown): MaybePromise<void>setAccountType(type: "user" | "bot")
setAuthKey(authKey: Uint8Array | null)
setChannelAccessHash(id: bigint, accessHash: bigint)
setChannelPts(channelId: bigint, pts: number)
setCustomEmojiDocument(id: bigint, document: types.Document)
setEntity(entity: )
| types.User
| types.Channel
| types.ChannelForbidden
| types.Chat
| types.ChatForbidden
setFilePartCount()
id: bigint,
partCount: number,
chunkSize: number,
setHasAllChats(listId: number, hasAllChats: boolean)
setMessage()
chatId: number,
messageId: number,
message: enums.Message | null,
setPinnedChats(listId: number, chatIds: number[] | null)
setServerSalt(serverSalt: bigint)
setState(state: enums.updates.State)
setTlObject(key: readonly StorageKeyPart[], value: TLObject | null)
setUpdate(boxId: bigint, update: enums.Update)
setUserAccessHash(id: bigint, accessHash: bigint)
updateStickerSetName()
id: bigint,
accessHash: bigint,
name: string,
updateUsernames()
type: "user" | "channel",
id: bigint,
usernames: string[],