Giter Club home page Giter Club logo

dex's Introduction

dex

A Discord bot for discordrb.

The bot works by using the YARD gem to parse discordrb's documentation, wrapping it in a handful of classes to render the documentation in a concise format within Discord.

Running

Fill out a config.yml:

---
token: token
channels:
- 298822592104759307
- 83281822225530880
- 345687437722386433
owner: 120571255635181568

And run:

$ rake install
$ rake

Usage

dex.doc (alias: ?doc)

Looks up a class or method.

dex.doc Server#kick
?doc Server#ban
?doc API::Channel.resolve

dex.source (alias: dex.sauce, ?source, ?sauce)

Displays the source code of methods.

dex.source Channel#message
?source Server#kick
?sauce Message#delete

Method source code over 20 lines in length won't be displayed, only a link will be given.

dex.info

Shows bot info.

Contributors

  • z64 Zac Nowicki - creator

dex's People

Contributors

daniel-worrall avatar snapcase avatar z64 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dex's Issues

`@is_alias?' is not allowed as an instance variable name

dex_1        | [INFO : et-7 @ 2018-05-06 06:42:17.019] [debug | z64#1337] Lookup: Channel
dex_1        | [ERROR : et-7 @ 2018-05-06 06:42:17.067] Exception: #<NameError: `@is_alias?' is not allowed as an instance variable name>
dex_1        | [ERROR : et-7 @ 2018-05-06 06:42:17.067] /opt/dex/vendor/bundle/ruby/2.4.0/gems/yard-0.9.12/lib/yard/code_objects/base.rb:371:in `instance_variable_get'
dex_1        | [ERROR : et-7 @ 2018-05-06 06:42:17.068] /opt/dex/vendor/bundle/ruby/2.4.0/gems/yard-0.9.12/lib/yard/code_objects/base.rb:371:in `method_missing'
dex_1        | [ERROR : et-7 @ 2018-05-06 06:42:17.068] /opt/dex/src/dex/docs.rb:85:in `initialize'
dex_1        | [ERROR : et-7 @ 2018-05-06 06:42:17.068] /opt/dex/src/dex/docs.rb:11:in `new'
dex_1        | [ERROR : et-7 @ 2018-05-06 06:42:17.068] /opt/dex/src/dex/docs.rb:11:in `lookup'
dex_1        | [ERROR : et-7 @ 2018-05-06 06:42:17.068] src/dex.rb:35:in `block in <module:Dex>'
dex_1        | [ERROR : et-7 @ 2018-05-06 06:42:17.068] /opt/dex/vendor/bundle/ruby/2.4.0/bundler/gems/discordrb-a7baf7b47c05/lib/discordrb/events/generic.rb:98:in `call'
dex_1        | [ERROR : et-7 @ 2018-05-06 06:42:17.068] /opt/dex/vendor/bundle/ruby/2.4.0/bundler/gems/discordrb-a7baf7b47c05/lib/discordrb/bot.rb:1244:in `block in call_event'

Undefined method `meths' for nil:NilClass

[INFO : et-8 @ 2018-05-08 20:22:58.617] [ruby_discordrb | Nekka#0001] Lookup: bot#message
[ERROR : et-8 @ 2018-05-08 20:22:58.720] Exception: #<NoMethodError: undefined method `meths' for nil:NilClass>
[ERROR : et-8 @ 2018-05-08 20:22:58.720] /opt/dex/src/dex/docs.rb:90:in `initialize'
[ERROR : et-8 @ 2018-05-08 20:22:58.720] /opt/dex/src/dex/docs.rb:156:in `initialize'
[ERROR : et-8 @ 2018-05-08 20:22:58.720] /opt/dex/src/dex/docs.rb:14:in `new'
[ERROR : et-8 @ 2018-05-08 20:22:58.720] /opt/dex/src/dex/docs.rb:14:in `lookup'
[ERROR : et-8 @ 2018-05-08 20:22:58.721] src/dex.rb:31:in `block in <module:Dex>'
[ERROR : et-8 @ 2018-05-08 20:22:58.721] /opt/dex/vendor/bundle/ruby/2.5.0/bundler/gems/discordrb-a7baf7b47c05/lib/discordrb/events/generic.rb:98:in `call'
[ERROR : et-8 @ 2018-05-08 20:22:58.721] /opt/dex/vendor/bundle/ruby/2.5.0/bundler/gems/discordrb-a7baf7b47c05/lib/discordrb/bot.rb:1244:in `block in call_event'
[INFO : et-9 @ 2018-05-08 20:23:16.102] [ruby_discordrb | Nekka#0001] Lookup: Bot#message
[INFO : et-9 @ 2018-05-08 20:23:16.181] Found: Dex::Docs::InstanceMethod @ Bot#message
[INFO : et-10 @ 2018-05-08 20:24:10.158] [ruby_discordrb | Nekka#0001] Lookup: MessageEventHandler
[INFO : et-10 @ 2018-05-08 20:24:10.220] Error: Docs for `MessageEventHandler` not found

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.