Giter VIP home page Giter VIP logo

vox's Introduction

Vox

Maintainability Test Coverage Gem Version Inline docs

A gem for interacting with the Discord API. Intends to cover the entire API, have high spec coverage, complete documentation coverage, and be as modular as possible with room for flexibility of use at every level.

Installation

Add this line to your application's Gemfile:

gem 'vox'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install vox

Usage

Currently only the HTTP API has been implemented, and it does not return abstracted objects. Rather it is simply a client to assist in making requests and handling rate limiting.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/swarley/vox. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Vox project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

vox's People

Contributors

panissupraomnia avatar swarley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

panissupraomnia

vox's Issues

OpCode 4001 (Invalid Opcode or Payload) when using gateway.presence_update

Either I am too stupid, or

rest = Vox::HTTP::Client.new(token)
gateway = Vox::Gateway::Client.new(url: rest.get_gateway[:url], token: token)

gateway.on(:READY) do |data|
  gateway.presence_update(status: 'dnd')
end

will run

DEBUG -- Vox::Gateway::Client : Sending PRESENCE_UPDATE {:status=>"dnd", :afk=>false}
DEBUG -- Vox::Gateway::WebSocket : [OUT] {"op":3,"d":{"status":"dnd","afk":false}}

throws

DEBUG -- Vox::Gateway::WebSocket : WebSocket is closing (4001) Unknown opcode.
WARN  -- Vox::Gateway::Client : Websocket closed (4001 Unknown opcode.)
ERROR -- Vox::Gateway::Client : Unknown opcode.

As via Discord Docs:

CODE | DESCRIPTION | EXPLANATION
 
4001 | Unknown opcode | You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.