Class: LibDiscord::Application

Inherits:
Resource
  • Object
show all
Defined in:
lib/lib_discord/application.rb

Overview

Application Resource

Do not instantiate an Application directly. Instead request one from an instance of Client.

client = LibDiscord::Client.new("Bot auth.token")
a = client["application"]

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from LibDiscord::Resource

Instance Method Details

#edit_current_application(json:) ⇒ Response

Parameters:

  • json (#to_json)

    JSON serializable payload

Returns:

Raises:

See Also:



39
40
41
# File 'lib/lib_discord/application.rb', line 39

def edit_current_application(json:)
  send_request(:patch, "/applications/@me", json:)
end

#get_current_applicationResponse

Returns:

Raises:

See Also:



25
26
27
# File 'lib/lib_discord/application.rb', line 25

def get_current_application
  send_request(:get, "/applications/@me")
end