Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/mtkruto/mod.ts>Storage

[WIP] Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class Storage
Re-export
Abstract
import { Storage } from "https://deno.land/x/mtkruto@0.0.982/mod.ts";

Properties

private
_authKeyId: bigint | null
readonly
authKeyId

Methods

private
resetAuthKeyId(authKey: Uint8Array | null)
abstract
get<T>(key: readonly StorageKeyPart[]): MaybePromise<T | null>
getChannelPts(channelId: bigint)
getEntity(type: "channel", id: bigint): Promise<types.Channel | null>
getEntity(type: "chat", id: bigint): Promise<types.Chat | null>
getEntity(type: "user", id: bigint): Promise<types.User | null>
getEntity(type: "channel" | "chat" | "user", id: bigint): Promise<>
getMessage(chatId: number, messageId: number)
getMessageChat(messageId: number)
getStickerSetName(id: bigint, accessHash: bigint)
getTLObject(key: readonly StorageKeyPart[])
getUserAccessHash(id: bigint)
getUsername(username: string)
abstract
init(): MaybePromise<void>
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)
setDc(dc: DC | null)
setEntity(peer: types.Channel): Promise<void>
setEntity(peer: types.Chat): Promise<void>
setEntity(peer: types.User): Promise<void>
setMessage(
chatId: number,
messageId: number,
message: types.TypeMessage | null,
)
setTlObject(key: readonly StorageKeyPart[], value: TLObject | null)
setUserAccessHash(id: bigint, accessHash: bigint)
updateStickerSetName(
id: bigint,
accessHash: bigint,
name: string,
)
updateUsernames(
type: "user" | "channel",
id: bigint,
usernames: string[],
)