{"id":13466962,"url":"https://github.com/discorb-lib/discorb","last_synced_at":"2025-03-26T00:31:43.680Z","repository":{"id":37069633,"uuid":"380395110","full_name":"discorb-lib/discorb","owner":"discorb-lib","description":"A Discord API wrapper written in Ruby.","archived":false,"fork":false,"pushed_at":"2024-09-09T21:22:14.000Z","size":6368,"stargazers_count":37,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T20:34:03.634Z","etag":null,"topics":["discord","ruby"],"latest_commit_sha":null,"homepage":"https://discorb-lib.github.io","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/discorb-lib.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-06-26T02:16:36.000Z","updated_at":"2024-10-24T11:54:16.000Z","dependencies_parsed_at":"2024-06-19T22:49:16.824Z","dependency_job_id":"640d68a9-f39e-496a-ab24-e333577c55f4","html_url":"https://github.com/discorb-lib/discorb","commit_stats":{"total_commits":1380,"total_committers":7,"mean_commits":"197.14285714285714","dds":0.1297101449275362,"last_synced_commit":"5fbc2358dbf2eda5530bb1e208026bfb32107e9c"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discorb-lib%2Fdiscorb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discorb-lib%2Fdiscorb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discorb-lib%2Fdiscorb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discorb-lib%2Fdiscorb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/discorb-lib","download_url":"https://codeload.github.com/discorb-lib/discorb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245566099,"owners_count":20636391,"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","ruby"],"created_at":"2024-07-31T15:00:51.817Z","updated_at":"2025-03-26T00:31:41.542Z","avatar_url":"https://github.com/discorb-lib.png","language":"Ruby","readme":"\u003cdiv align=\"center\"\u003e\u003cimg src=\"./assets/banner.svg\" alt=\"discorb\"\u003e\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\u003ca href=\"https://discorb-lib.github.io/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Document-discorb--lib.github.io-blue.svg?style=flat-square\u0026labelColor=2f3136\u0026logo=github\u0026logoColor=fff\" alt=\"Document\"\u003e\u003c/a\u003e\n\u003ca href=\"https://rubygems.org/gems/discorb\"\u003e\u003cimg src=\"https://img.shields.io/gem/dt/discorb?logo=rubygems\u0026logoColor=fff\u0026label=Downloads\u0026style=flat-square\u0026labelColor=2f3136\" alt=\"Gem\"\u003e\u003c/a\u003e\n\u003ca href=\"https://rubygems.org/gems/discorb\"\u003e\u003cimg src=\"https://img.shields.io/gem/v/discorb?logo=rubygems\u0026logoColor=fff\u0026label=Version\u0026style=flat-square\u0026labelColor=2f3136\" alt=\"Gem\"\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/hCP6zq8Vpj\"\u003e\u003cimg src=\"https://img.shields.io/discord/863581274916913193?logo=discord\u0026logoColor=fff\u0026color=5865f2\u0026label=Discord\u0026style=flat-square\u0026labelColor=2f3136\" alt=\"Discord\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/discorb-lib/discorb\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/discorb-lib/discorb?color=24292e\u0026label=Stars\u0026logo=GitHub\u0026logoColor=fff\u0026style=flat-square\u0026labelColor=2f3136\" alt=\"GitHub\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codeclimate.com/github/discorb-lib/discorb\"\u003e\u003cimg alt=\"Code Climate maintainability\" src=\"https://img.shields.io/codeclimate/maintainability/discorb-lib/discorb?logo=Code%20Climate\u0026logoColor=ffffff\u0026style=flat-square\u0026labelColor=2f3136\u0026label=Maintainability\"\u003e\u003c/a\u003e\u003c/div\u003e\n\n----\n\ndiscorb is a Discord API wrapper for Ruby, Using [socketry/async](https://github.com/socketry/async).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'discorb'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install discorb\n\n## Usage\n\n\u003e **Note**\n\u003e You must run `discorb setup` before using slash commands.\n\nMore examples are available in [/examples](/examples) directory.\n\n### Simple Slash Command\n\n```ruby\nrequire \"discorb\"\n\nclient = Discorb::Client.new\n\nclient.once :standby do\n  puts \"Logged in as #{client.user}\"\nend\n\nclient.slash(\"ping\", \"Ping!\") do |interaction|\n  interaction.post(\"Pong!\", ephemeral: true)\nend\n\nclient.run(ENV[\"DISCORD_BOT_TOKEN\"])\n```\n\n### Legacy Message Command\n\n```ruby\nrequire \"discorb\"\n\nintents = Discorb::Intents.new\nintents.message_content = true\n\nclient = Discorb::Client.new(intents: intents)\n\nclient.once :standby do\n  puts \"Logged in as #{client.user}\"\nend\n\nclient.on :message do |message|\n  next if message.author.bot?\n  next unless message.content == \"ping\"\n\n  message.channel.post(\"Pong!\")\nend\n\nclient.run(ENV[\"DISCORD_BOT_TOKEN\"])\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/discorb-lib/discorb.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["API Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscorb-lib%2Fdiscorb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscorb-lib%2Fdiscorb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscorb-lib%2Fdiscorb/lists"}