TypeScript library for the Discord user-account API. Composer-style middleware, contexts, scenes, multi-account orchestrator, captcha pipeline, proxy pool.
Automating user accounts violates Discord's Terms of Service. Accounts can be terminated. Use only on accounts you can afford to lose.
npm install disselfimport { Client } from "disself";
const bot = new Client({ token: process.env.DISCORD_TOKEN! });
bot.on("ready", (user) => console.log(`logged in as ${user.tag}`));
bot.command("!ping", (ctx) => ctx.reply("pong"));
bot.hear(/^hello/i, (ctx) => ctx.reply(`hi, ${ctx.message.author.username}`));
await bot.start();- REST client: bucket rate limits, super-properties, captcha retry pipeline.
- Gateway shard: heartbeat with jitter, RESUME, optional zlib-stream, smart reconnect with exponential backoff.
- Composer with
hear()/command()and middleware chain. - Contexts:
MessageContext(send,reply,delete,startTyping),GuildContext. - Scenes / FSM with memory and Redis-compatible storage.
Client.waitFor("message", filter, timeout)for awaitable flows.- Component interactions: button clicks, select menus, modal submits, slash command invocation as a user.
- Multi-account
Hubwith shared proxy pool, captcha solver, rotating client_build_number. ProxyPoolwith health checks;BuildNumberFetcherfor fresh fingerprints.- Captcha solvers (2captcha, CapMonster/Capsolver) and a
CaptchaSolverinterface for custom services. - Member list aggregator (op 14 lazy guild walking).
MessageCollector,ReactionCollector.- Builders: embed, file uploads, paginator, cooldowns, scheduler, logger, permissions, markdown helpers.
- Anti-detect helpers: UA pool, token validator, dcfduid cookie loader.
- CLI:
disself token-info,disself gateway-ping,disself build-number.
import { Hub, ProxyPool, TwoCaptchaSolver } from "disself";
const proxies = new ProxyPool({
proxies: ["http://user:pass@p1:8000", "http://user:pass@p2:8000"],
});
await proxies.checkAll();
const solver = new TwoCaptchaSolver({ apiKey: process.env.TWOCAPTCHA_KEY! });
const hub = new Hub({
accounts: [{ token: "..." }, { token: "..." }],
proxyPool: proxies,
captchaSolver: solver,
});
await hub.init();
await hub.start();
for (const m of hub.clients) {
m.client.command("!ping", (ctx) => ctx.reply("pong"));
}import { Scenes } from "disself";
const scenes = new Scenes().add({
id: "ask-name",
steps: [
async (ctx) => {
await ctx.send("What's your name?");
await ctx.scene.next();
},
async (ctx) => {
await ctx.send(`Hi, ${ctx.text}`);
await ctx.scene.leave();
},
],
});
bot.use(scenes.middleware());
bot.command("!start", (ctx) => ctx.scene.enter("ask-name"));import { clickButton, submitSelectMenu } from "disself";
await clickButton(bot, message, "row0_button1");
await submitSelectMenu(bot, message, "row0_select0", ["option_a"]);import { Client, command, hear, attachClass } from "disself";
class Handlers {
@command("!ping")
async ping(ctx) { await ctx.reply("pong"); }
@hear(/^!echo (.+)/i)
async echo(ctx) { await ctx.reply(ctx.text.replace(/^!echo /, "")); }
}
attachClass(bot, new Handlers());npm install
npm run buildMIT.