Create Stoat.js Client
Optionaloptions: Partial<ClientOptions>Optionalconfiguration: {Deprecated - Please use Client.initConfig if you need to override config.
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Protected Readonly[brandThis field doesn't actually exist, it's just a way to make TS properly infer the events from classes that extend AsyncEventEmitter
ReadonlyaccountReadonlyapiReadonlybotsReadonlychannelsReadonlychannelReadonlychannelReadonlyconfigurationFormat: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
ReadonlyconfiguredReadonlyconnectionReadonlyemojisReadonlyeventsReadonlymessagesReadonlyoptionsReadonlyreadyReadonlyserverReadonlyserversReadonlysessionsReadonlyusersGet authentication header
Backend enforced limits for the logged in user
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Format: int64
Current session id
Connect to Revolt
Fetches the server config. This is called automatically by login() or loginBot(),
but you can call it first manually if you need to override any config options.
Override example:
await client.initConfig((config) => {
config.ws = "wss://example.com";
});
OptionalpreConfig: (Log in with auth data, creating a new session in the process.
Login data object
Optionalfriendly_name?: null | stringOptionalfriendly_name?: null | stringOptionalmfa_response?: null | { password: string } | { recovery_code: string } | { totp_code: string }An on-boarding function if on-boarding is required, undefined otherwise
Log in as a bot
Bot token
Log out of current session
This function prepares the client for disposal by removing all event listeners and killing the events socket.
Prepare a markdown-based message to be displayed to the user as plain text.
Source markdown text
Modified plain text
Prepare a markdown-based message to be displayed to the user as plain text. This method will fetch each user or channel if they are missing. Useful for serviceworkers.
Source markdown text
Modified plain text
Proxy a file through January.
URL to proxy
Proxied media URL
Optionalevent: string | symbolUpload a file
Tag
File
OptionaluploadUrl: stringMedia server upload route
StaticlistenerStaticonOptionaloptions: AbortableMethodsStaticonceOptionaloptions: AbortableMethods
Stoat.js Clients