{"id":25717393,"url":"https://github.com/slice/boozle","last_synced_at":"2026-05-16T10:31:32.074Z","repository":{"id":277894933,"uuid":"933518152","full_name":"slice/boozle","owner":"slice","description":"\"scalacord\" would've been too overt","archived":false,"fork":false,"pushed_at":"2025-02-18T05:55:31.000Z","size":110,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T15:48:00.068Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-16T06:30:55.000Z","updated_at":"2025-02-18T05:55:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"778caa3d-108b-409e-bf14-4ded88198de9","html_url":"https://github.com/slice/boozle","commit_stats":null,"previous_names":["slice/boozle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slice/boozle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fboozle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fboozle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fboozle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fboozle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slice","download_url":"https://codeload.github.com/slice/boozle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fboozle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33098787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2025-02-25T15:36:32.113Z","updated_at":"2026-05-16T10:31:32.069Z","avatar_url":"https://github.com/slice.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# boozle\n\n\u003c!-- prettier-ignore --\u003e\n\u003e [!WARNING]\n\u003e Work in progress. Not for general consumption. Contains chemicals known to\n\u003e the State of California to cause cancer and birth defects or other\n\u003e reproductive harm.\u003csup\u003e\u003ca href=\"https://en.wikipedia.org/wiki/1986_California_Proposition_65\"\u003e[1]\u003c/a\u003e\u003c/sup\u003e\n\nWrite [Discord] bots while leveraging the [Typelevel] ecosystem.\n\n[discord]: https://discord.com\n[typelevel]: https://github.com/typelevel\n\nThis example sends an embed with a button component that lets users increment\nthe value displayed. The embed displays who performed the last three increments,\nand the updates are debounced to only occur every 3 seconds at most.\n\n```scala\ndef counter[F[_]] = Cmd:\n  for\n    increment = Button[F](\"+1\")\n    msg \u003c- replyEmbed(embed { title(\"0\") }, components = List(increment))\n\n    _ \u003c- increment.clicks(in = msg)\n      .interactTap { deferEdit } // immediately respond to the interaction…\n      .buffer(1)\n      .zipWithIndex\n      .map { case (given Interaction[F], count) =\u003e\n        (count, s\"$count. Clicked by **${invoker.mention}**!\")\n      }\n      .sliding(3)\n      .debounce(3.seconds)       // …but limit updates to a max of once every 3s\n      .evalMap { lastThreeClicks =\u003e\n        val (latestCount, _) = lastThreeClicks.last.get\n        val summary          = lastThreeClicks.map(_._2).mkString_(\"\\n\")\n        msg.edit(embed {\n          title(s\"$latestCount\".refineUnsafe)\n          description(summary.refineUnsafe)\n        })\n      }\n      .runFor(5.minutes)\n  yield msg\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslice%2Fboozle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslice%2Fboozle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslice%2Fboozle/lists"}