Sha256: a30130e8315886aaf655c269d76bea4bb3b9fb9ca14fb862e0521a413a346e3a

Contents?: true

Size: 513 Bytes

Versions: 3

Compression:

Stored size: 513 Bytes

Contents

# frozen_string_literal: true

module Hahamut
  # Hahamut Client
  class Client
    attr_reader :id, :token, :secret, :sender, :uploader

    def initialize(bot_id, token, secret)
      @id = bot_id
      @token = token
      @secret = secret
      @sender = Sender.new(@token)
      @uploader = Uploader.new(@id, @token)

      Manager.register(self)
    end

    def send_to(recipient, message)
      @sender.send(recipient, message)
    end

    def upload(path)
      @uploader.upload(path)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hahamut-0.1.2 lib/hahamut/client.rb
hahamut-0.1.1 lib/hahamut/client.rb
hahamut-0.1.0 lib/hahamut/client.rb