Module: Discordrb

Defined in:
lib/discordrb.rb,
lib/discordrb/bot.rb,
lib/discordrb/data.rb,
lib/discordrb/await.rb,
lib/discordrb/logger.rb,
lib/discordrb/version.rb,
lib/discordrb/exceptions.rb,
lib/discordrb/permissions.rb,
lib/discordrb/token_cache.rb

Overview

Discordrb

Defined Under Namespace

Modules: API, Commands, Events, Voice Classes: Await, Bot, CachedToken, Channel, ColourRGB, HTTPStatusException, InvalidAuthenticationException, Invite, Logger, Message, Permissions, Profile, Role, Server, TokenCache, User

Constant Summary collapse

LOGGER =

The default debug logger used by discordrb.

Logger.new
ColorRGB =

Alias for the class ColourRGB

ColourRGB
VERSION =

The current version of discordrb.

'1.6.0'.freeze
KEYLEN =

Amount of bytes the token encryption key should be long (32 bytes = 256 bits -> AES256)

32
CACHE_PATH =

Path where the token cache file will be stored

Dir.home + '/.discordrb_token_cache.json'

Class Method Summary collapse

Class Method Details

.id_compare(one_id, other) ⇒ Object

Compares two objects based on IDs - either the objects' IDs are equal, or one object is equal to the other's ID.



13
14
15
# File 'lib/discordrb/data.rb', line 13

def self.id_compare(one_id, other)
  other.respond_to?(:resolve_id) ? (one_id.resolve_id == other.resolve_id) : (one_id == other)
end