Class: LibDiscord::Interaction
Overview
Interactions
Do not instantiate an Interaction directly. Instead request one from an instance fo Client.
client = LibDiscord::Client.new("Bot auth.token")
i = client["interaction"]
Instance Method Summary
collapse
-
#create_followup_message(application_id:, interaction_token:, json:) ⇒ Response
-
#create_interaction_response(interaction_id:, interaction_token:, json:) ⇒ Response
-
#delete_followup_message(application_id:, interaction_token:, message_id:) ⇒ Response
-
#delete_original_interaction_response(application_id:, interaction_token:) ⇒ Response
-
#edit_followup_message(application_id:, interaction_token:, message_id:, json:) ⇒ Response
-
#edit_original_interaction_response(application_id:, interaction_token:, json:) ⇒ Response
-
#get_followup_message(application_id:, interaction_token:, message_id:) ⇒ Response
-
#get_original_interaction_response(application_id:, interaction_token:) ⇒ Response
Methods inherited from Resource
#initialize
Instance Method Details
#create_followup_message(application_id:, interaction_token:, json:) ⇒ Response
100
101
102
|
# File 'lib/lib_discord/interaction.rb', line 100
def create_followup_message(application_id:, interaction_token:, json:)
send_request(:post, "/webhooks/#{application_id}/#{interaction_token}", json:)
end
|
#create_interaction_response(interaction_id:, interaction_token:, json:) ⇒ Response
32
33
34
|
# File 'lib/lib_discord/interaction.rb', line 32
def create_interaction_response(interaction_id:, interaction_token:, json:)
send_request(:post, "/interactions/#{interaction_id}/#{interaction_token}/callback", json:)
end
|
#delete_followup_message(application_id:, interaction_token:, message_id:) ⇒ Response
159
160
161
|
# File 'lib/lib_discord/interaction.rb', line 159
def delete_followup_message(application_id:, interaction_token:, message_id:)
send_request(:delete, "/webhooks/#{application_id}/#{interaction_token}/messages/#{message_id}")
end
|
#delete_original_interaction_response(application_id:, interaction_token:) ⇒ Response
82
83
84
|
# File 'lib/lib_discord/interaction.rb', line 82
def delete_original_interaction_response(application_id:, interaction_token:)
send_request(:delete, "/webhooks/#{application_id}/#{interaction_token}/messages/@original")
end
|
#edit_followup_message(application_id:, interaction_token:, message_id:, json:) ⇒ Response
140
141
142
|
# File 'lib/lib_discord/interaction.rb', line 140
def edit_followup_message(application_id:, interaction_token:, message_id:, json:)
send_request(:patch, "/webhooks/#{application_id}/#{interaction_token}/messages/#{message_id}", json:)
end
|
#edit_original_interaction_response(application_id:, interaction_token:, json:) ⇒ Response
66
67
68
|
# File 'lib/lib_discord/interaction.rb', line 66
def edit_original_interaction_response(application_id:, interaction_token:, json:)
send_request(:patch, "/webhooks/#{application_id}/#{interaction_token}/messages/@original", json:)
end
|
#get_followup_message(application_id:, interaction_token:, message_id:) ⇒ Response
119
120
121
|
# File 'lib/lib_discord/interaction.rb', line 119
def get_followup_message(application_id:, interaction_token:, message_id:)
send_request(:get, "/webhooks/#{application_id}/#{interaction_token}/messages/#{message_id}")
end
|
#get_original_interaction_response(application_id:, interaction_token:) ⇒ Response
48
49
50
|
# File 'lib/lib_discord/interaction.rb', line 48
def get_original_interaction_response(application_id:, interaction_token:)
send_request(:get, "/webhooks/#{application_id}/#{interaction_token}/messages/@original")
end
|