Module: DiscordBot::Client::Guilds::Channels

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

Overview

Channels module

Instance Method Summary collapse

Instance Method Details

#get_guild_channels(guild_id:) ⇒ Object

Get guild channels list



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

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