A Discord API client for Swift.
** - Linux stability is currently limited to the stability of open source Foundation, but in thoery should support everything.
Requirements:
Recommendend:
Installing and Building (Linux and macOS):
brew tap vapor/tap && brew install ctls
or eval "$(curl -sL https://apt.vapor.sh)"; sudo apt-get install vapor;
.package(url: "https://github.com/nuclearace/SwiftDiscord", .upToNextMajor(from: "6.0.0"))
to your dependencies in Package.swiftimport SwiftDiscord
to files you wish to use the module in.swift build -Xlinker -L/usr/local/lib -Xlinker -lopus -Xcc -I/usr/local/include
. The Xlinker options are needed to tell the package manager where to find the libsodium and opus libraries that were installed through Homebrew. The Xcc option tells clang where to find the headers for opus.Xcode:
If you wish to use Xcode with your Swift Package Manager project, you can do swift package generate-xcodeproj
. However after doing that, you'll have to make a change to SwiftDiscord's build settings. Just like when compiling from the command line, we have to tell Xcode where to find libsodium and libopus. This can be done by adding /usr/local/lib
to the library search paths and /usr/local/include
to the header search paths. This should be done for the SwiftDiscord and DiscordOpus targets. The DiscordOpus target also needs the -lopus
option in "Other Linker Flags".
Checkout the getting started page for a quickstart guide.
Docs are generated with jazzy using the magical command:
jazzy --xcodebuild-arguments -project,SwiftDiscord.xcodeproj/,-scheme,SwiftDiscord-Package --documentation=UsageDocs/*.md --theme fullwidth --module SwiftDiscord
Must have setup an Xcode project
I hate CocoaPods and the Swift Package Manager makes it easy to do system modules.
link |
Stars: 119 |
Last commit: 2 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics