Module: DiscordBot::Client::Channels::Channel

Included in:
DiscordBot::Client
Defined in:
lib/discord_bot/client/channels/channel.rb

Overview

Get channel module

Instance Method Summary collapse

Instance Method Details

#get_channel(channel_id:) ⇒ Object

Get channel



8
9
10
11
12
13
# File 'lib/discord_bot/client/channels/channel.rb', line 8

def get_channel(channel_id:)
  # define params for request
  headers = { 'Content-Type' => 'application/json', 'Authorization' => "Bot #{bot_token}", 'User-Agent' => user_agent }
  # make request
  self.class.get("/channels/#{channel_id}", query: {}, headers: headers).parsed_response
end