Class: Discord::ChannelsResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/discord/resources/channels.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

#retrieve(id:) ⇒ Object



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

def retrieve(id:)
  Channel.new get_request("channels/#{id}").body
end

#update(id:, **params) ⇒ Object



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

def update(id:, **params)
  Channel.new patch_request("channels/#{id}", body: params).body
end