Sha256: 417f30875ca8792c57574776a071fd8d03b38af26e8d1b7d62aaf93787bbc732
Contents?: true
Size: 595 Bytes
Versions: 1
Compression:
Stored size: 595 Bytes
Contents
module DiscordBot class Client # Users module module Users # Create channel module module CreateChannel # Create message to channel 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 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/users/create_channel.rb |