module DiscordBot::Client::Users::CreateChannel
Create channel module
Public Instance Methods
create_user_channel(recipient_id:)
click to toggle source
Create message to channel
# File lib/discord_bot/client/users/create_channel.rb, line 8 def create_user_channel(recipient_id:) # define params for request body = { 'recipient_id' => recipient_id }.to_json headers = { 'Content-Type' => 'application/json', 'Authorization' => "Bot #{bot_token}", 'User-Agent' => user_agent } # make request self.class.post('/users/@me/channels', body: body, headers: headers).parsed_response end