Skip to content

SwiftDisc v0.9.0

Latest

Choose a tag to compare

@M1tsumi M1tsumi released this 14 Nov 02:56
· 350 commits to main since this release

v0.9.0 – "The Big Visibility & Extensibility Release" – 2025-11-13

We’re thrilled to ship v0.9.0, a massive leap forward in completeness, flexibility, and developer experience. This release brings near-100% gateway coverage, powerful raw REST passthroughs, polished file handling, full autocomplete support, and a brand-new lightweight extensions/cogs system — all while staying true to SwiftDiscord’s pure-Swift, zero-dependency philosophy.

Highlights

  • 100% gateway event visibility – every event Discord sends is now exposed, including threads, scheduled events, and a universal raw fallback.
  • Raw REST passthrough – call any endpoint (even future ones) without waiting for library wrappers.
  • Smart file uploads – automatic MIME detection + configurable size guardrails.
  • End-to-end autocomplete – from registration to response in just a few lines.
  • Advanced caching – per-type TTLs + per-channel message LRU with instant pruning.
  • Extensions & Cogs – modular, hot-reloadable command groups with zero boilerplate.

Added

Gateway

  • Full thread events: THREAD_CREATE, THREAD_UPDATE, THREAD_DELETE, THREAD_MEMBER_UPDATE, THREAD_MEMBERS_UPDATE
  • Full scheduled-event suite: GUILD_SCHEDULED_EVENT_CREATE/UPDATE/DELETE/USER_ADD/USER_REMOVE
  • Universal fallback: DiscordEvent.raw(String, Data) dispatched for any unknown or future payload

REST

  • Raw endpoint helpers: rawGET, rawPOST, rawPATCH, rawPUT, rawDELETE with automatic JSON (de)serialization

File Uploads

  • FileAttachment.contentType with automatic inference from filename
  • Configurable upload limit via DiscordConfiguration.maxUploadBytes (default 100 MB) with clear validation errors

Interactions

  • Autocomplete support: InteractionResponseType.autocompleteResult (=8)
  • createAutocompleteResponse(...) builder + AutocompleteRouter for clean registration
  • Full wiring into EventDispatcher

Caching

  • Cache.Configuration with per-type TTL and per-channel message LRU
  • Typed getters, removeMessage(id:), and background pruning task

Extensions / Cogs

  • SwiftDiscExtension protocol + Cog base class
  • DiscordClient.loadExtension(_:), unloadExtensions(), hot-reload ready

Permissions

  • PermissionsUtil.effectivePermissions(member:in:) covering channel overwrites
  • PermissionOverwrite model added to Channel

Examples

  • Examples/AutocompleteBot.swift
  • Examples/FileUploadBot.swift
  • Examples/ThreadsAndScheduledEventsBot.swift
  • Updated Examples/README.md with setup instructions

Changed

  • README completely refreshed with new feature table of contents, quick-start guide, and DISCORD_BOT_TOKEN env-var usage
  • Minor breaking: some internal event structs renamed for consistency (migration guide in README)

A huge thank you to everyone who tested the betas and opened issues — this release wouldn’t be this solid without you!

Upgrade today and start building richer, more resilient bots with confidence.

Happy coding!
~ The SwiftDiscord Team