Sha256: ffd4eee831ac55577e7c7c85e77d6be7d579da81a03093bed4b6e9d56c41937f

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

module DiscordBot
  class Client
    # Channel module
    module Channels
      # Get channel module
      module Channel
        # Get channel
        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
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
discord_bot-0.2.1 lib/discord_bot/client/channels/channel.rb