Back to blog

Seyfert v2.2.0: The Universal Release

Deno. Bun. Soundboards. Smarter caching. This is Seyfert everywhere, for everyone.

December 28, 2024

A Gift for the Holidays

As 2024 comes to a close, we're unwrapping something special: Seyfert v2.2.0 — our most feature-packed release yet. This isn't just an update; it's a statement about where Discord bot development is headed.


Run Anywhere: Deno & Bun Support

JavaScript runtimes have evolved. Your framework should too.

Seyfert now officially supports Deno and Bun. Same API. Same performance. Your choice of runtime.

# Node.js (as always)
pnpm install seyfert

# Bun
bun add seyfert

# Deno
deno add npm:seyfert

Whether you love Bun's speed, Deno's security model, or Node's ecosystem — Seyfert works seamlessly across all three. Build once, deploy anywhere.


Bring the Noise: Soundboard API

Discord's Soundboard feature lets users play sounds in voice channels. Now you can control it programmatically:

// List available sounds
const sounds = await client.soundboard.list(guildId);

// Upload a new sound
await client.soundboard.create(guildId, {
  name: "airhorn",
  sound: audioBuffer
});

// Play it
await client.soundboard.send(guildId, soundId);

// Clean up
await client.soundboard.delete(guildId, soundId);

Build soundboard bots, DJ systems, or just annoy your friends with perfectly-timed sound effects.


Smarter Caching

Dynamic Cache Control

Previously, cache settings were static. Now they can be dynamic:

client.setServices({
  cache: {
    disabledCache: (cacheType) => {
      // Disable member cache for large guilds
      if (cacheType === 'members') {
        return currentGuild.memberCount > 10000;
      }
      return false;
    }
  }
});

This is huge for bots in large servers. Cache what you need, skip what you don't — automatically.

Unified Thread Handling

Threads are no longer a separate cache. They're merged with channels, simplifying your mental model and reducing memory overhead.


Developer Experience Upgrades

Guild Context Helpers

Tired of null checks for guild data? New helpers ensure type safety:

// Before: ctx.guild might be null
const guild = ctx.guild();
if (!guild) return;

// After: Type-safe guild context
if (ctx.inGuild()) {
  // ctx is now GuildContext with guaranteed guild data
  const guild = ctx.guild(); // Never null here
}

Latency Monitoring

Check shards health at a glance:

const latencies = client.latency; // average latency

Better Error Messages

When things go wrong, you'll know exactly why. We've enhanced error messages throughout the library, especially for configuration issues.


New Capabilities

  • addRole / removeRole — Direct methods on BaseGuildMember
  • deferUpdate — For ComponentContext interactions
  • channel.messages.list() — Fetch all messages in a channel
  • generateOAuth2URL — Build OAuth URLs with our formatter utility
  • onRatelimit Callback — React to rate limits in your API handler
  • Extendable Configuration — Use ExtendedRC to add custom config options
  • HttpServerAdapter Flexibility — Works with HttpClient, Client, or WorkerClient
  • Webhook Events — New types for applicationAuthorized, entitlementCreated, questUserEnrollment

Breaking Changes

We've cleaned up the API for long-term maintainability:

ChangeMigration
Thread cache merged with channelsUpdate any thread-specific cache access
WorkerAdapter not default for WorkerClientExplicitly set if needed
Context.guild/channel/me use flow modeNo action needed (better defaults)
Removed output/templates config locationsUpdate your seyfert.config.js
Removed updateOnly from cache patchAdjust custom adapters if needed

Bug Fixes

Because stability matters:

  • ✅ Fixed zombie connections that wouldn't die
  • ✅ Fixed workerProxy in WorkerClient
  • ✅ Fixed GuildRole.edit() method
  • ✅ Fixed ModalInteraction.member.roles data
  • ✅ Fixed collector refresh callback
  • ✅ Fixed guildMemberRemove old object retrieval

Upgrade Now

pnpm install [email protected]

2024 was the year Seyfert grew up. 2025 will be the year it takes over.

Happy holidays from the Seyfert team. 🎄