Skip to content
@SwiftcordApp

Swiftcord

Swiftcord - A fully native Discord client for macOS, built 100% in SwiftUI!

Contact Us!

Wanna talk about Swiftcord/Discord or just hang around? Join us in Discord!

A beautiful and blazingly fast native macOS Discord client, built in SwiftUI.

Downloads

Give Swiftcord a try! Nightly builds (recommended) are built from every commit on main, while releases are more stable but updated less frequently.

Nightly build action status  GitHub release (latest by date)


The missing Swift Discord library. Build elegant Discord bots with a simple resultBuilder-powered slash command builder.

Here's all you need to build a bot with DiscordKit (it's that simple):

import DiscordKitBot

let bot = Client(intents: .unprivileged)

// Guild to register commands in. If the COMMAND_GUILD_ID environment variable is set, commands are scoped
// to that server and update instantly, useful for debugging. Otherwise, they are registered globally.
let commandGuildID = ProcessInfo.processInfo.environment["COMMAND_GUILD_ID"]

bot.ready.listen {
    print("Logged in as \(bot.user!.username)#\(bot.user!.discriminator)!")

    try? await bot.registerApplicationCommands(guild: commandGuildID) {
        NewAppCommand("ping", description: "Ping me!") { interaction in
            try? await interaction.reply("Pong!")
        }
    }
}

bot.login() // Reads the bot token from the DISCORD_TOKEN environment variable and logs in with the token

// Run the main RunLoop to prevent the program from exiting
RunLoop.main.run()

Pinned

  1. Swiftcord Swiftcord Public

    A fully native Discord client for macOS built 100% in Swift!

    Swift 1.8k 82

  2. DiscordKit DiscordKit Public

    The Discord API implementation behind Swiftcord, implemented completely from scratch in Swift

    Swift 303 32

Repositories

Showing 8 of 8 repositories

Top languages

Loading…

Most used topics

Loading…