Class: LibDiscord::ApplicationCommand
- Inherits:
-
Resource
- Object
- Resource
- LibDiscord::ApplicationCommand
show all
- Defined in:
- lib/lib_discord/application_command.rb
Overview
Instance Method Summary
collapse
-
#batch_edit_application_command_permissions(application_id:, guild_id:, json:) ⇒ Response
deprecated
Deprecated.
-
#bulk_overwrite_global_application_commands(application_id:, json:) ⇒ Response
-
#bulk_overwrite_guild_application_commands(application_id:, guild_id:, json:) ⇒ Response
-
#create_global_application_command(application_id:, json:) ⇒ Response
-
#create_guild_application_command(application_id:, guild_id:, json:) ⇒ Response
-
#delete_global_application_command(application_id:, command_id:) ⇒ Response
-
#delete_guild_application_command(application_id:, guild_id:, command_id:) ⇒ Response
-
#edit_application_command_permissions(application_id:, guild_id:, command_id:, json:) ⇒ Response
-
#edit_global_application_command(application_id:, command_id:, json:) ⇒ Response
-
#edit_guild_application_command(application_id:, guild_id:, command_id:, json:) ⇒ Response
-
#get_application_command_permissions(application_id:, guild_id:, command_id:) ⇒ Object
-
#get_global_application_command(application_id:, command_id:) ⇒ Response
-
#get_global_application_commands(application_id:, params: {}) ⇒ Response
-
#get_guild_application_command(application_id:, guild_id:, command_id:) ⇒ Response
-
#get_guild_application_command_permissions(application_id:, guild_id:) ⇒ Response
-
#get_guild_application_commands(application_id:, guild_id:, params: {}) ⇒ Response
Methods inherited from Resource
#initialize
Instance Method Details
#batch_edit_application_command_permissions(application_id:, guild_id:, json:) ⇒ Response
337
338
339
|
# File 'lib/lib_discord/application_command.rb', line 337
def batch_edit_application_command_permissions(application_id:, guild_id:, json:)
send_request(:put, "/applications/#{application_id}/guilds/#{guild_id}/commands/permissions", json:)
end
|
#bulk_overwrite_global_application_commands(application_id:, json:) ⇒ Response
124
125
126
|
# File 'lib/lib_discord/application_command.rb', line 124
def bulk_overwrite_global_application_commands(application_id:, json:)
send_request(:put, "/applications/#{application_id}/commands", json:)
end
|
#bulk_overwrite_guild_application_commands(application_id:, guild_id:, json:) ⇒ Response
250
251
252
|
# File 'lib/lib_discord/application_command.rb', line 250
def bulk_overwrite_guild_application_commands(application_id:, guild_id:, json:)
send_request(:put, "/applications/#{application_id}/guilds/#{guild_id}/commands", json:)
end
|
#create_global_application_command(application_id:, json:) ⇒ Response
51
52
53
|
# File 'lib/lib_discord/application_command.rb', line 51
def create_global_application_command(application_id:, json:)
send_request(:post, "/applications/#{application_id}/commands", json:)
end
|
#create_guild_application_command(application_id:, guild_id:, json:) ⇒ Response
165
166
167
|
# File 'lib/lib_discord/application_command.rb', line 165
def create_guild_application_command(application_id:, guild_id:, json:)
send_request(:post, "/applications/#{application_id}/guilds/#{guild_id}/commands", json:)
end
|
#delete_global_application_command(application_id:, command_id:) ⇒ Response
107
108
109
|
# File 'lib/lib_discord/application_command.rb', line 107
def delete_global_application_command(application_id:, command_id:)
send_request(:delete, "/applications/#{application_id}/commands/#{command_id}")
end
|
#delete_guild_application_command(application_id:, guild_id:, command_id:) ⇒ Response
230
231
232
|
# File 'lib/lib_discord/application_command.rb', line 230
def delete_guild_application_command(application_id:, guild_id:, command_id:)
send_request(:delete, "/applications/#{application_id}/guilds/#{guild_id}/commands/#{command_id}")
end
|
#edit_application_command_permissions(application_id:, guild_id:, command_id:, json:) ⇒ Response
310
311
312
|
# File 'lib/lib_discord/application_command.rb', line 310
def edit_application_command_permissions(application_id:, guild_id:, command_id:, json:)
send_request(:put, "/applications/#{application_id}/guilds/#{guild_id}/commands/#{command_id}/permissions", json:)
end
|
#edit_global_application_command(application_id:, command_id:, json:) ⇒ Response
89
90
91
|
# File 'lib/lib_discord/application_command.rb', line 89
def edit_global_application_command(application_id:, command_id:, json:)
send_request(:patch, "/applications/#{application_id}/commands/#{command_id}", json:)
end
|
#edit_guild_application_command(application_id:, guild_id:, command_id:, json:) ⇒ Response
209
210
211
|
# File 'lib/lib_discord/application_command.rb', line 209
def edit_guild_application_command(application_id:, guild_id:, command_id:, json:)
send_request(:patch, "/applications/#{application_id}/guilds/#{guild_id}/commands/#{command_id}", json:)
end
|
#get_application_command_permissions(application_id:, guild_id:, command_id:) ⇒ Object
287
288
289
|
# File 'lib/lib_discord/application_command.rb', line 287
def get_application_command_permissions(application_id:, guild_id:, command_id:)
send_request(:get, "/applications/#{application_id}/guilds/#{guild_id}/commands/#{command_id}/permissions")
end
|
#get_global_application_command(application_id:, command_id:) ⇒ Response
69
70
71
|
# File 'lib/lib_discord/application_command.rb', line 69
def get_global_application_command(application_id:, command_id:)
send_request(:get, "/applications/#{application_id}/commands/#{command_id}")
end
|
#get_global_application_commands(application_id:, params: {}) ⇒ Response
34
35
36
|
# File 'lib/lib_discord/application_command.rb', line 34
def get_global_application_commands(application_id:, params: {})
send_request(:get, "/applications/#{application_id}/commands", params:)
end
|
#get_guild_application_command(application_id:, guild_id:, command_id:) ⇒ Response
186
187
188
|
# File 'lib/lib_discord/application_command.rb', line 186
def get_guild_application_command(application_id:, guild_id:, command_id:)
send_request(:get, "/applications/#{application_id}/guilds/#{guild_id}/commands/#{command_id}")
end
|
#get_guild_application_command_permissions(application_id:, guild_id:) ⇒ Response
268
269
270
|
# File 'lib/lib_discord/application_command.rb', line 268
def get_guild_application_command_permissions(application_id:, guild_id:)
send_request(:get, "/applications/#{application_id}/guilds/#{guild_id}/commands/permissions")
end
|
#get_guild_application_commands(application_id:, guild_id:, params: {}) ⇒ Response
145
146
147
|
# File 'lib/lib_discord/application_command.rb', line 145
def get_guild_application_commands(application_id:, guild_id:, params: {})
send_request(:get, "/applications/#{application_id}/guilds/#{guild_id}/commands", params:)
end
|