Skip to content

swift-discord/swift-discord

Repository files navigation

swift-discord

main develop
Test Test

A Swift library for Discord API.

Package Products

  • Discord, alias library that contains DiscordREST, DiscordGateway.
  • DiscordREST, library that can communicate with Discord's REST API. (Requires Foundation framework)
  • DiscordGateway, library that can communicate with Discord's Gateway API. (Requires SwiftNIO, Foundation framework)

Available APIs

Supported Platforms

swift-discord aims to support all of the platforms where Swift is supported. Currently, it is developed and tested on macOS and Linux, and is known to support the following operating system versions:

  • Ubuntu 18.04+
  • macOS 10.15+, iOS 13+, tvOS 13+ or watchOS 6+

Using swift-discord in your project

To use this package in a SwiftPM project, you need to set it up as a package dependency:

// swift-tools-version:5.5
import PackageDescription

let package = Package(
  name: "MyPackage",
  dependencies: [
    .package(
      url: "https://github.com/swift-discord/swift-discord.git", 
      .upToNextMajor(from: "0.0.3") // or `.upToNextMinor
    )
  ],
  targets: [
    .target(
      name: "MyTarget",
      dependencies: [
        .product(name: "Discord", package: "swift-discord")
      ]
    )
  ]
)