{"id":13410278,"url":"https://github.com/discord-haskell/discord-haskell","last_synced_at":"2026-02-28T19:01:48.652Z","repository":{"id":38183982,"uuid":"137131410","full_name":"discord-haskell/discord-haskell","owner":"discord-haskell","description":"Haskell library for writing Discord bots","archived":false,"fork":false,"pushed_at":"2025-08-10T20:50:10.000Z","size":1767,"stargazers_count":286,"open_issues_count":21,"forks_count":60,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-12-07T23:08:32.534Z","etag":null,"topics":["bot","discord","discord-api","haskell-library"],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/discord-haskell","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/discord-haskell.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":"docs/contributing.md","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,"zenodo":null}},"created_at":"2018-06-12T21:47:56.000Z","updated_at":"2025-10-07T21:11:19.000Z","dependencies_parsed_at":"2023-12-21T20:28:09.641Z","dependency_job_id":"7bd3faed-f308-402a-85eb-714126798c3a","html_url":"https://github.com/discord-haskell/discord-haskell","commit_stats":{"total_commits":1499,"total_committers":36,"mean_commits":"41.638888888888886","dds":0.3168779186124083,"last_synced_commit":"8a82208cbb59e1ab24176a90de8b0706c08ddb31"},"previous_names":["aquarial/discord-haskell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/discord-haskell/discord-haskell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord-haskell%2Fdiscord-haskell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord-haskell%2Fdiscord-haskell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord-haskell%2Fdiscord-haskell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord-haskell%2Fdiscord-haskell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/discord-haskell","download_url":"https://codeload.github.com/discord-haskell/discord-haskell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord-haskell%2Fdiscord-haskell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29948228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bot","discord","discord-api","haskell-library"],"created_at":"2024-07-30T20:01:05.970Z","updated_at":"2026-02-28T19:01:48.627Z","avatar_url":"https://github.com/discord-haskell.png","language":"Haskell","funding_links":[],"categories":["Haskell","Libraries"],"sub_categories":["Haskell"],"readme":"# discord-haskell        [![CI Status](https://github.com/discord-haskell/discord-haskell/actions/workflows/main.yml/badge.svg)](https://github.com/discord-haskell/discord-haskell/actions/)        [![Hackage version](http://img.shields.io/hackage/v/discord-haskell.svg?label=Hackage)](https://hackage.haskell.org/package/discord-haskell)              [![Discord server](https://discord.com/api/guilds/918577626954739722/widget.png?style=shield)](https://discord.gg/eaRAGgX3bK)\n\n\nBuild that discord bot in Haskell! Also checkout the\n[calamity haskell library](https://github.com/nitros12/calamity)\nfor a more advanced interface.\n\n\n#### Documentation\n\n#### [[installing](./docs/installing.md)] [[debugging](./docs/debugging.md)] [[creating-bot](./docs/creating-bot.md)]\n\n#### [[app-commands](./docs/applicationcommands.md)] [[components](./docs/components.md)] [[cache](./docs/cache.md)] [[embeds](./docs/embeds.md)] [[emoji](./docs/emoji.md)] [[intents](./docs/intents.md)] [[voice](./docs/voice.md)]\n\n#### [[design](./docs/design.md)] [[contributing](./docs/contributing.md)] [[todo](./docs/todo.md)]\n\n#### Example\n\nThis is an example bot that replies \"pong\" to messages that start with \"ping\". Checkout the [other examples](./examples/) for things like state management.\n\n```haskell\n{-# LANGUAGE OverloadedStrings #-}  -- allows \"string literals\" to be Text\nimport           Control.Monad (when, void)\nimport           UnliftIO.Concurrent\nimport           Data.Text (isPrefixOf, toLower, Text)\nimport qualified Data.Text.IO as TIO\n\nimport           Discord\nimport           Discord.Types\nimport qualified Discord.Requests as R\n\n-- | Replies \"pong\" to every message that starts with \"ping\"\npingpongExample :: IO ()\npingpongExample = do\n    userFacingError \u003c- runDiscord $ def\n             { discordToken = \"Bot ZZZZZZZZZZZZZZZZZZZ\"\n             , discordOnEvent = eventHandler\n             , discordOnLog = \\s -\u003e TIO.putStrLn s \u003e\u003e TIO.putStrLn \"\"\n             } -- if you see OnLog error, post in the discord / open an issue\n\n    TIO.putStrLn userFacingError\n    -- userFacingError is an unrecoverable error\n    -- put normal 'cleanup' code in discordOnEnd (see examples)\n\neventHandler :: Event -\u003e DiscordHandler ()\neventHandler event = case event of\n    MessageCreate m -\u003e when (isPing m \u0026\u0026 not (fromBot m)) $ do\n        void $ restCall (R.CreateReaction (messageChannelId m, messageId m) \"eyes\")\n        threadDelay (2 * 10^6)\n        void $ restCall (R.CreateMessage (messageChannelId m) \"Pong!\")\n    _ -\u003e return ()\n\nfromBot :: Message -\u003e Bool\nfromBot = userIsBot . messageAuthor\n\nisPing :: Message -\u003e Bool\nisPing = (\"ping\" `isPrefixOf`) . toLower . messageContent\n```\n\n#### Discord Server\n\nAsk questions, get updates, request features, etc in the project discord server: \u003chttps://discord.gg/eaRAGgX3bK\u003e\n\n#### Official Discord Documentation\n\nThis api closely matches the [official discord documentation](https://discord.com/developers/docs/intro),\nwhich lists the rest requests, gateway events, and gateway sendables.\n\nYou can use the docs to check the name of something you want to do. For example:\nthe docs list a [Get Channel](https://discord.com/developers/docs/resources/channel#get-channel) API path,\nwhich translates to discord-haskell's rest request ADT for `GetChannel` of type `ChannelId -\u003e ChannelRequest Channel`.\n\n#### Open an Issue\n\nIf something goes wrong: check the error message (optional: check [the debugging logs](./docs/debugging.md)), make sure you have the most recent version, ask on discord, or open a github issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscord-haskell%2Fdiscord-haskell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscord-haskell%2Fdiscord-haskell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscord-haskell%2Fdiscord-haskell/lists"}