Sha256: c0e52ce9f7eca6dc7a2923fcd632920696da1c461cd69405c7d41cf124512ee0
Contents?: true
Size: 1.27 KB
Versions: 8
Compression:
Stored size: 1.27 KB
Contents
# discorb [![Document](https://img.shields.io/badge/Document-discord--lib.github.io-blue.svg)](https://discorb-lib.github.io/) [![Gem](https://img.shields.io/gem/dt/discorb?logo=rubygems&logoColor=fff)](https://rubygems.org/gems/discorb) [![Gem](https://img.shields.io/gem/v/discorb?logo=rubygems&logoColor=fff)](https://rubygems.org/gems/discorb) [![Discord](https://img.shields.io/discord/863581274916913193?logo=discord&logoColor=fff&color=5865f2&label=Discord)](https://discord.gg/hCP6zq8Vpj) discorb is a Discord API wrapper for Ruby. ## Installation Add this line to your application's Gemfile: ```ruby gem 'discorb' ``` And then execute: $ bundle install Or install it yourself as: $ gem install discorb ## Usage ### Simple ping-pong ```ruby require "discorb" client = Discorb::Client.new client.once :ready do puts "Logged in as #{client.user}" end client.on :message do |message| next if message.author.bot? next unless message.content == "ping" message.channel.post("Pong!") end client.run(ENV["DISCORD_BOT_TOKEN"]) ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/discorb-lib/discorb. ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Version data entries
8 entries across 8 versions & 1 rubygems