Gabriel Gutiérrez Fuentes 33e526aa10 fix: allow passing MFA tickets when changing an account's email address (#179)
* fix: allow passing MFA tickets when changing an account's email address

This commit adds an `MFATicket` parameter to the `AccountCollection.changeEmail`, which the backend mandates when the account has MFA enabled. The client still has to manually check whether passing a ticket is necessary by using `MFA.authenticatorEnabled`.

Signed-off-by: Gabriel Gutiérrez Fuentes <me@gab.gf>

* style: fix formatting and linter issues

Signed-off-by: Gabriel Gutiérrez Fuentes <me@gab.gf>

---------

Signed-off-by: Gabriel Gutiérrez Fuentes <me@gab.gf>
2026-08-03 10:17:02 -06:00
2023-04-08 10:57:11 +01:00
2023-04-07 09:58:47 +01:00
2026-07-29 17:37:54 -06:00
2025-03-14 13:04:35 -04:00

stoat.js

stoat.js stoat-api

stoat.js is a JavaScript library for interacting with the Stoat API

Requirements

To use this module, you must be using at least:

  • Node.js v22.15.0 (LTS) in ES module mode
  • or Deno v2.2 (LTS)

Example Usage

import { Client } from "stoat.js";

let client = new Client();

client.on("ready", async () =>
  console.info(`Logged in as ${client.user.username}!`),
);

client.on("message", async (message) => {
  if (message.content === "hello") {
    message.channel.sendMessage("world");
  }
});

client.loginBot("..");

Reactivity with Signals & Solid.js Primitives

All objects have reactivity built-in and can be dropped straight into any Solid.js project.

const client = new Client();
// initialise the client

function MyApp() {
  return (
    <h1>Your username is: {client.user?.username ?? "[logging in...]"}</h1>
  );
}

Stoat API Types

Warning

It is advised you do not use this unless necessary. If you find somewhere that isn't covered by the library, please open an issue as this library aims to transform all objects.

All stoat-api types are re-exported from this library under API.

import { API } from "stoat.js";

// API.Channel;
// API.[..];
S
Description
Typescript library for interacting with Stoat
Readme MIT 16 MiB
Latest
2026-01-16 13:28:35 -05:00
Languages
TypeScript 99.4%
JavaScript 0.5%