{"id":13410113,"url":"https://github.com/satom99/coxir","last_synced_at":"2025-12-30T01:05:32.894Z","repository":{"id":44326695,"uuid":"115733141","full_name":"satom99/coxir","owner":"satom99","description":"A modern Elixir wrapper for Discord.","archived":false,"fork":false,"pushed_at":"2022-04-02T20:10:20.000Z","size":2547,"stargazers_count":74,"open_issues_count":0,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-31T20:40:45.865Z","etag":null,"topics":["discord","elixir","library"],"latest_commit_sha":null,"homepage":"https://satom.me/coxir","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/satom99.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}},"created_at":"2017-12-29T15:28:30.000Z","updated_at":"2024-07-09T04:52:55.000Z","dependencies_parsed_at":"2022-09-02T17:08:49.370Z","dependency_job_id":null,"html_url":"https://github.com/satom99/coxir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satom99%2Fcoxir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satom99%2Fcoxir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satom99%2Fcoxir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satom99%2Fcoxir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/satom99","download_url":"https://codeload.github.com/satom99/coxir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243600670,"owners_count":20317312,"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","elixir","library"],"created_at":"2024-07-30T20:01:05.042Z","updated_at":"2025-12-30T01:05:32.867Z","avatar_url":"https://github.com/satom99.png","language":"Elixir","funding_links":[],"categories":["API Libraries","Libraries"],"sub_categories":["Elixir"],"readme":"# coxir\n\n[![License](https://img.shields.io/github/license/satom99/coxir.svg)](https://github.com/satom99/coxir/blob/main/LICENSE)\n[![Validation](https://github.com/satom99/coxir/actions/workflows/validation.yml/badge.svg)](https://github.com/satom99/coxir/actions/workflows/validation.yml)\n[![Documentation](https://github.com/satom99/coxir/actions/workflows/documentation.yml/badge.svg)](https://github.com/satom99/coxir/actions/workflows/documentation.yml)\n[![Join Discord](https://img.shields.io/badge/Discord-join-5865F2.svg)](https://discord.gg/6JrqNEX)\n\nA modern high-level Elixir wrapper for [Discord](https://discord.com).\n\nRefer to the [documentation](https://satom.me/coxir) for more information.\n\n### Features\n\n- Support for running multiple bots in a same application\n- Configurable adapters that change how the library behaves:\n  - **Limiter:** handles how rate limit buckets are stored\n  - **Storage:** handles how entities are cached\n  - **Sharder:** handles how shards are started\n  - **Player:** handles the audio sent through voice\n- Easy-to-use syntax for interacting with Discord entities\n\n### Installation\n\nAdd coxir as a dependency to your `mix.exs` file:\n\n```elixir\ndefp deps do\n  [{:coxir, git: \"https://github.com/satom99/coxir.git\"}]\nend\n```\n\n### Quickstart\n\nBefore consuming events, coxir must be configured:\n\n```elixir\nconfig :coxir,\n  token: \"\",\n  intents: :non_privileged # optional\n```\n\nThen a simple consumer can be set up as follows:\n\n```elixir\ndefmodule Example.Bot do\n  use Coxir.Gateway\n  \n  alias Coxir.{User, Message}\n\n  def handle_event({:MESSAGE_CREATE, %Message{content: \"!hello\"} = message}) do\n    %Message{author: author} = Message.preload(message, :author)\n\n    %User{username: username, discriminator: discriminator} = author\n\n    Message.reply(message, content: \"Hello #{username}##{discriminator}!\")\n  end\n  \n  def handle_event(_event) do\n    :noop\n  end\nend\n```\n\nWhich can then be added to a Supervisor, or started directly:\n\n```elixir\niex(1)\u003e Example.Bot.start_link()\n{:ok, #PID\u003c0.301.0\u003e}\n```\n\nFor a complete and working example check out the [`example`](https://github.com/satom99/coxir/tree/main/example) app.\n\n### More\n\nFor more information check out the [documentation guides](https://satom.me/coxir).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatom99%2Fcoxir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsatom99%2Fcoxir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatom99%2Fcoxir/lists"}