Skip to content

Repository files navigation

BloumeChat Logo

BloumeChat SDK

Official JavaScript/TypeScript SDK for BloumeChat.com. Build powerful bots, automated systems, and rich integrations with a native, strongly-typed Discord-like syntax.

NPM Version NPM Downloads CI npm provenance verified License: ISC Documentation Bot Template


🚀 Getting Started

To get started quickly, we provide an official Bot Starter Template containing all the necessary architecture (Event handler, Command handler, Documentation).

👉 Use the Official Bot Starter Template

Or, you can install the SDK manually via npm:

npm install bloumechat

🔒 Provenance & Supply Chain Security

Every published version of bloumechat is built and signed on GitHub Actions using npm provenance (backed by Sigstore and the SLSA framework). This gives you a publicly verifiable, cryptographic link between the code on npm and the exact source commit and workflow run that produced it — no manual npm publish from a local machine, ever.

Built and signed on ✅ GitHub Actions
Source Commit github.com/BloumeSAS/bloumechat-sdk@<commit>
Build File .github/workflows/publish.yml
Public Ledger Sigstore transparency log

You can verify the provenance of any published version yourself:

npm view bloumechat --json | grep -A 10 attestations

Or check the "Provenance" panel directly on the npm package page — it links to the exact commit, workflow file, and transparency log entry for every release.


🌟 Key Features

  • ⚡ Real-time Communication: Fully typed WebSocket events mapped intuitively (messageCreate, memberAdd, etc.).
  • 🛠️ Comprehensive API Coverage: Direct access and management of Guilds, Channels, Roles, Members, and Messages.
  • 🖼️ Rich Embeds: Native EmbedBuilder for creating visually stunning layouts.
  • 🛡️ Full TypeScript Support: Built for TS out of the box with extensive caching and BigInt bitwise permission handling.

✍️ Example

import { BloumeChat } from "bloumechat";

const client = new BloumeChat();

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

client.on("messageCreate", async (message) => {
  if (message.author.isBot) return;

  if (message.content === "!ping") {
    await message.reply("Pong! 🏓");
  }
});

// Login using your Bot Token provided at bloumechat.com/developers
client.login("YOUR_BOT_TOKEN");

📖 Full API reference and guides: dev.bloume.chat


🧪 Testing & Continuous Integration

The SDK ships with a Vitest unit test suite covering the client (token redaction, login validation, endpoint defaults), permission bitmask math, the Collection utility, EmbedBuilder, and the Role structure.

npm test            # run the full suite once
npm run test:watch  # watch mode
npm run test:coverage

Every push and pull request runs the CI workflow: type-checking, ESLint, a Prettier format check, the full test suite across Node 20/22/24, a build, and a dependency audit, plus a coverage report uploaded as a build artifact.

Releases publish automatically and require no manual step: merging a commit to main that bumps version in package.json triggers the publish workflow, which re-runs type-checking, lint, tests and the build, publishes to npm with provenance, then tags the commit and creates the matching GitHub Release. A manual GitHub Release (or workflow_dispatch) still works too, for one-off/hotfix publishes.

🤝 Contributing

Issues and pull requests are welcome on GitHub — see CONTRIBUTING.md for the full guide. Quick version:

npm install
npm run typecheck    # tsc --noEmit
npm run lint         # ESLint
npm run format:check # Prettier
npm test             # run the test suite
npm run build        # build dist/

npm run lint:fix and npm run format will auto-fix most lint/formatting issues.

Found a security issue? Please follow SECURITY.md instead of opening a public issue.

See CHANGELOG.md for release notes.

📄 License

Released under the ISC License.


V4.0.0 - Developed with ❤️ for BloumeChat.com

Releases

Packages

Contributors

Languages