{"id":15693353,"url":"https://github.com/fwcd/swift-discord","last_synced_at":"2025-06-27T18:38:07.572Z","repository":{"id":46330489,"uuid":"204758357","full_name":"fwcd/swift-discord","owner":"fwcd","description":"Discord client library for Swift","archived":false,"fork":false,"pushed_at":"2024-10-02T00:11:17.000Z","size":91623,"stargazers_count":8,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T01:49:55.586Z","etag":null,"topics":["discord","discord-api","swift"],"latest_commit_sha":null,"homepage":"https://fwcd.github.io/swift-discord/documentation/discord","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"nuclearace/SwiftDiscord","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fwcd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-27T17:48:47.000Z","updated_at":"2024-11-16T18:52:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7e8c676-4bd9-4227-9b50-d3c4378e4cf5","html_url":"https://github.com/fwcd/swift-discord","commit_stats":null,"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"purl":"pkg:github/fwcd/swift-discord","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-discord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-discord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-discord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-discord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fwcd","download_url":"https://codeload.github.com/fwcd/swift-discord/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-discord/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262313789,"owners_count":23292204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord","discord-api","swift"],"created_at":"2024-10-03T18:43:05.220Z","updated_at":"2025-06-27T18:38:07.538Z","avatar_url":"https://github.com/fwcd.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord Client for Swift\n\n[![Build](https://github.com/fwcd/swift-discord/actions/workflows/build.yml/badge.svg)](https://github.com/fwcd/swift-discord/actions/workflows/build.yml)\n[![Docs](https://github.com/fwcd/swift-discord/actions/workflows/docs.yml/badge.svg)](https://fwcd.github.io/swift-discord/documentation/discord)\n\nA client library for the [Discord API](https://discord.com/developers/docs) written in Swift.\n\nThis project is a fork of [nuclearace's](https://github.com/nuclearace) [`SwiftDiscord`](https://github.com/nuclearace/SwiftDiscord), which is no longer actively maintained as of 2023. Among other changes, the codebase has been [refactored](https://github.com/fwcd/swift-discord/pull/4) to employ modern Swift patterns, such as value types and `Codable`, along with support for the v9 API.\n\n## Example\n\nA simple Discord bot that responds to every \"ping\" message with \"pong\" could be implemented as follows:\n\n```swift\nimport Discord\nimport Dispatch\n\nclass PingPongBot: DiscordClientDelegate {\n    private var client: DiscordClient!\n\n    init() {\n        client = DiscordClient(\n            token: \"Bot \u003cyour token\u003e\",\n            delegate: self,\n            configuration: [.intents([.guildMessages, .messageContent])]\n        )\n        client.connect()\n    }\n\n    func client(_ client: DiscordClient, didCreateMessage message: DiscordMessage) {\n        if message.content == \"ping\" {\n            client.sendMessage(\"pong\", to: message.channelId)\n        }\n    }\n}\n\nlet bot = PingPongBot()\ndispatchMain()\n```\n\nYou can run this example (which is provided as a [snippet](Snippets/PingPongBot.swift)) with\n\n```sh\nswift run PingPongBot \u003cyour token\u003e\n```\n\nCheck out the [docs](https://fwcd.github.io/swift-discord/documentation/discord) for more detailed information about the API.\n\n## Features\n\n- macOS and Linux support\n- v10 API (including threads, interactions, slash commands and message components)\n- Configurable sharding\n\n## Requirements\n\n- Swift 5.7+\n\n## Building\n\n`swift build`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwcd%2Fswift-discord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffwcd%2Fswift-discord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwcd%2Fswift-discord/lists"}