Class: Discord::UsersResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/discord/resources/users.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Discord::Resource

Instance Method Details

#guildsObject



8
9
10
11
# File 'lib/discord/resources/users.rb', line 8

def guilds
  response = get_request("users/@me/guilds")
  Collection.from_response(response, type: Guild)
end

#meObject



4
5
6
# File 'lib/discord/resources/users.rb', line 4

def me
  User.new get_request("users/@me").body
end