Class: Zernio::DiscordApi
- Inherits:
-
Object
- Object
- Zernio::DiscordApi
- Defined in:
- lib/zernio-sdk/api/discord_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_discord_member_role(guild_id, user_id, role_id, account_id, opts = {}) ⇒ AddDiscordMemberRole200Response
Assign a role to a guild member Assign one role to one member.
-
#add_discord_member_role_with_http_info(guild_id, user_id, role_id, account_id, opts = {}) ⇒ Array<(AddDiscordMemberRole200Response, Integer, Hash)>
Assign a role to a guild member Assign one role to one member.
-
#create_discord_guild_role(guild_id, account_id, create_discord_guild_role_request, opts = {}) ⇒ CreateDiscordGuildRole201Response
Create a Discord guild role Creates a new role in the guild.
-
#create_discord_guild_role_with_http_info(guild_id, account_id, create_discord_guild_role_request, opts = {}) ⇒ Array<(CreateDiscordGuildRole201Response, Integer, Hash)>
Create a Discord guild role Creates a new role in the guild.
-
#create_discord_scheduled_event(guild_id, create_discord_scheduled_event_request, opts = {}) ⇒ CreateDiscordScheduledEvent200Response
Create a Discord scheduled event Create a guild scheduled event.
-
#create_discord_scheduled_event_with_http_info(guild_id, create_discord_scheduled_event_request, opts = {}) ⇒ Array<(CreateDiscordScheduledEvent200Response, Integer, Hash)>
Create a Discord scheduled event Create a guild scheduled event.
-
#create_discord_thread(channel_id, account_id, create_discord_thread_request, opts = {}) ⇒ CreateDiscordThread200Response
Create a Discord public thread Creates a public thread in a channel.
-
#create_discord_thread_with_http_info(channel_id, account_id, create_discord_thread_request, opts = {}) ⇒ Array<(CreateDiscordThread200Response, Integer, Hash)>
Create a Discord public thread Creates a public thread in a channel.
-
#crosspost_discord_message(channel_id, message_id, account_id, opts = {}) ⇒ CrosspostDiscordMessage200Response
Crosspost Discord message Publishes a message from an announcement channel so it propagates to every server following that channel.
-
#crosspost_discord_message_with_http_info(channel_id, message_id, account_id, opts = {}) ⇒ Array<(CrosspostDiscordMessage200Response, Integer, Hash)>
Crosspost Discord message Publishes a message from an announcement channel so it propagates to every server following that channel.
-
#delete_discord_guild_role(guild_id, role_id, account_id, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Delete a Discord guild role Permanently deletes a role from the guild and removes it from every member.
-
#delete_discord_guild_role_with_http_info(guild_id, role_id, account_id, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Delete a Discord guild role Permanently deletes a role from the guild and removes it from every member.
-
#delete_discord_message(channel_id, message_id, account_id, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Delete a Discord channel message Deletes a message from a channel, for moderation and cleanup.
-
#delete_discord_message_with_http_info(channel_id, message_id, account_id, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Delete a Discord channel message Deletes a message from a channel, for moderation and cleanup.
-
#delete_discord_scheduled_event(guild_id, event_id, account_id, opts = {}) ⇒ DeleteDiscordScheduledEvent200Response
Delete a Discord scheduled event Hard-delete an event.
-
#delete_discord_scheduled_event_with_http_info(guild_id, event_id, account_id, opts = {}) ⇒ Array<(DeleteDiscordScheduledEvent200Response, Integer, Hash)>
Delete a Discord scheduled event Hard-delete an event.
-
#edit_discord_guild_role(guild_id, role_id, account_id, edit_discord_guild_role_request, opts = {}) ⇒ CreateDiscordGuildRole201Response
Edit a Discord guild role Updates a role's name, color, hoist, mentionable flag, or permission bitfield.
-
#edit_discord_guild_role_with_http_info(guild_id, role_id, account_id, edit_discord_guild_role_request, opts = {}) ⇒ Array<(CreateDiscordGuildRole201Response, Integer, Hash)>
Edit a Discord guild role Updates a role's name, color, hoist, mentionable flag, or permission bitfield.
-
#get_discord_channels(account_id, opts = {}) ⇒ GetDiscordChannels200Response
List Discord guild channels Returns the text, announcement, and forum channels in the connected Discord guild.
-
#get_discord_channels_with_http_info(account_id, opts = {}) ⇒ Array<(GetDiscordChannels200Response, Integer, Hash)>
List Discord guild channels Returns the text, announcement, and forum channels in the connected Discord guild.
-
#get_discord_guild_member(guild_id, user_id, account_id, opts = {}) ⇒ GetDiscordGuildMember200Response
Get a Discord guild member Fetch a single guild member by Discord user id.
-
#get_discord_guild_member_with_http_info(guild_id, user_id, account_id, opts = {}) ⇒ Array<(GetDiscordGuildMember200Response, Integer, Hash)>
Get a Discord guild member Fetch a single guild member by Discord user id.
-
#get_discord_scheduled_event(guild_id, event_id, account_id, opts = {}) ⇒ CreateDiscordScheduledEvent200Response
Get a Discord scheduled event.
-
#get_discord_scheduled_event_with_http_info(guild_id, event_id, account_id, opts = {}) ⇒ Array<(CreateDiscordScheduledEvent200Response, Integer, Hash)>
Get a Discord scheduled event.
-
#get_discord_settings(account_id, opts = {}) ⇒ GetDiscordSettings200Response
Get Discord account settings Returns the current Discord account settings including webhook identity (display name and avatar), connected channel, and guild information.
-
#get_discord_settings_with_http_info(account_id, opts = {}) ⇒ Array<(GetDiscordSettings200Response, Integer, Hash)>
Get Discord account settings Returns the current Discord account settings including webhook identity (display name and avatar), connected channel, and guild information.
-
#initialize(api_client = ApiClient.default) ⇒ DiscordApi
constructor
A new instance of DiscordApi.
-
#list_discord_guild_members(guild_id, account_id, opts = {}) ⇒ ListDiscordGuildMembers200Response
List Discord guild members Cursor-paginated list of guild members.
-
#list_discord_guild_members_with_http_info(guild_id, account_id, opts = {}) ⇒ Array<(ListDiscordGuildMembers200Response, Integer, Hash)>
List Discord guild members Cursor-paginated list of guild members.
-
#list_discord_guild_roles(guild_id, account_id, opts = {}) ⇒ ListDiscordGuildRoles200Response
List Discord guild roles Returns all roles in a Discord guild.
-
#list_discord_guild_roles_with_http_info(guild_id, account_id, opts = {}) ⇒ Array<(ListDiscordGuildRoles200Response, Integer, Hash)>
List Discord guild roles Returns all roles in a Discord guild.
-
#list_discord_pinned_messages(channel_id, account_id, opts = {}) ⇒ ListDiscordPinnedMessages200Response
List pinned messages Returns the channel's pinned messages, sorted most-recently-pinned first.
-
#list_discord_pinned_messages_with_http_info(channel_id, account_id, opts = {}) ⇒ Array<(ListDiscordPinnedMessages200Response, Integer, Hash)>
List pinned messages Returns the channel's pinned messages, sorted most-recently-pinned first.
-
#list_discord_scheduled_events(guild_id, account_id, opts = {}) ⇒ ListDiscordScheduledEvents200Response
List Discord scheduled events Return all scheduled events in the guild.
-
#list_discord_scheduled_events_with_http_info(guild_id, account_id, opts = {}) ⇒ Array<(ListDiscordScheduledEvents200Response, Integer, Hash)>
List Discord scheduled events Return all scheduled events in the guild.
-
#pin_discord_message(channel_id, message_id, account_id, opts = {}) ⇒ PinDiscordMessage200Response
Pin a Discord message Pin a specific message in a channel.
-
#pin_discord_message_with_http_info(channel_id, message_id, account_id, opts = {}) ⇒ Array<(PinDiscordMessage200Response, Integer, Hash)>
Pin a Discord message Pin a specific message in a channel.
-
#remove_discord_member_role(guild_id, user_id, role_id, account_id, opts = {}) ⇒ RemoveDiscordMemberRole200Response
Remove a role from a guild member Remove one role from one member.
-
#remove_discord_member_role_with_http_info(guild_id, user_id, role_id, account_id, opts = {}) ⇒ Array<(RemoveDiscordMemberRole200Response, Integer, Hash)>
Remove a role from a guild member Remove one role from one member.
-
#search_discord_guild_members(guild_id, account_id, query, opts = {}) ⇒ SearchDiscordGuildMembers200Response
Search Discord guild members Search guild members whose username or nickname starts with the query (Discord matches prefixes only, not substrings).
-
#search_discord_guild_members_with_http_info(guild_id, account_id, query, opts = {}) ⇒ Array<(SearchDiscordGuildMembers200Response, Integer, Hash)>
Search Discord guild members Search guild members whose username or nickname starts with the query (Discord matches prefixes only, not substrings).
-
#send_discord_direct_message(send_discord_direct_message_request, opts = {}) ⇒ SendDiscordDirectMessage200Response
Send a Discord Direct Message Send a 1:1 Direct Message from the bot to a Discord user (by snowflake ID).
-
#send_discord_direct_message_with_http_info(send_discord_direct_message_request, opts = {}) ⇒ Array<(SendDiscordDirectMessage200Response, Integer, Hash)>
Send a Discord Direct Message Send a 1:1 Direct Message from the bot to a Discord user (by snowflake ID).
-
#unpin_discord_message(channel_id, message_id, account_id, opts = {}) ⇒ UnpinDiscordMessage200Response
Unpin a Discord message Unpin a message.
-
#unpin_discord_message_with_http_info(channel_id, message_id, account_id, opts = {}) ⇒ Array<(UnpinDiscordMessage200Response, Integer, Hash)>
Unpin a Discord message Unpin a message.
-
#update_discord_scheduled_event(guild_id, event_id, update_discord_scheduled_event_request, opts = {}) ⇒ CreateDiscordScheduledEvent200Response
Update a Discord scheduled event Patch any subset of fields.
-
#update_discord_scheduled_event_with_http_info(guild_id, event_id, update_discord_scheduled_event_request, opts = {}) ⇒ Array<(CreateDiscordScheduledEvent200Response, Integer, Hash)>
Update a Discord scheduled event Patch any subset of fields.
-
#update_discord_settings(account_id, update_discord_settings_request, opts = {}) ⇒ UpdateDiscordSettings200Response
Update Discord settings Update Discord account settings.
-
#update_discord_settings_with_http_info(account_id, update_discord_settings_request, opts = {}) ⇒ Array<(UpdateDiscordSettings200Response, Integer, Hash)>
Update Discord settings Update Discord account settings.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ DiscordApi
Returns a new instance of DiscordApi.
19 20 21 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_discord_member_role(guild_id, user_id, role_id, account_id, opts = {}) ⇒ AddDiscordMemberRole200Response
Assign a role to a guild member
Assign one role to one member. Idempotent on Discord's side — re-running on a member who already has the role is a 204 no-op. Path shape mirrors Discord's own API (PUT /guilds/{guild}/members/{user}/roles/{role}) for zero-translation mental mapping. Bot needs MANAGE_ROLES permission in the guild AND its highest role must be above the target role (Discord hierarchy rule). The @everyone role (where roleId == guildId) cannot be assigned.
30 31 32 33 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 30 def add_discord_member_role(guild_id, user_id, role_id, account_id, opts = {}) data, _status_code, _headers = add_discord_member_role_with_http_info(guild_id, user_id, role_id, account_id, opts) data end |
#add_discord_member_role_with_http_info(guild_id, user_id, role_id, account_id, opts = {}) ⇒ Array<(AddDiscordMemberRole200Response, Integer, Hash)>
Assign a role to a guild member Assign one role to one member. Idempotent on Discord's side — re-running on a member who already has the role is a 204 no-op. Path shape mirrors Discord's own API (`PUT /guilds/guild/members/user/roles/role`) for zero-translation mental mapping. Bot needs MANAGE_ROLES permission in the guild AND its highest role must be above the target role (Discord hierarchy rule). The `@everyone` role (where roleId == guildId) cannot be assigned.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 43 def add_discord_member_role_with_http_info(guild_id, user_id, role_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.add_discord_member_role ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.add_discord_member_role" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling DiscordApi.add_discord_member_role" end # verify the required parameter 'role_id' is set if @api_client.config.client_side_validation && role_id.nil? fail ArgumentError, "Missing the required parameter 'role_id' when calling DiscordApi.add_discord_member_role" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.add_discord_member_role" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/members/{userId}/roles/{roleId}'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'roleId' + '}', CGI.escape(role_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AddDiscordMemberRole200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.add_discord_member_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#add_discord_member_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_discord_guild_role(guild_id, account_id, create_discord_guild_role_request, opts = {}) ⇒ CreateDiscordGuildRole201Response
Create a Discord guild role Creates a new role in the guild. Requires the bot to hold the Manage Roles permission. Guilds that added the Zernio bot before role management shipped must re-invite it, because Discord applies the permission set at invite time. Discord's role hierarchy applies: the bot cannot create a role positioned at or above its own highest role, and cannot grant permissions it does not itself hold. Either attempt returns a 403 carrying Discord's own error.
111 112 113 114 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 111 def create_discord_guild_role(guild_id, account_id, create_discord_guild_role_request, opts = {}) data, _status_code, _headers = create_discord_guild_role_with_http_info(guild_id, account_id, create_discord_guild_role_request, opts) data end |
#create_discord_guild_role_with_http_info(guild_id, account_id, create_discord_guild_role_request, opts = {}) ⇒ Array<(CreateDiscordGuildRole201Response, Integer, Hash)>
Create a Discord guild role Creates a new role in the guild. Requires the bot to hold the Manage Roles permission. Guilds that added the Zernio bot before role management shipped must re-invite it, because Discord applies the permission set at invite time. Discord's role hierarchy applies: the bot cannot create a role positioned at or above its own highest role, and cannot grant permissions it does not itself hold. Either attempt returns a 403 carrying Discord's own error.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 123 def create_discord_guild_role_with_http_info(guild_id, account_id, create_discord_guild_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.create_discord_guild_role ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.create_discord_guild_role" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.create_discord_guild_role" end # verify the required parameter 'create_discord_guild_role_request' is set if @api_client.config.client_side_validation && create_discord_guild_role_request.nil? fail ArgumentError, "Missing the required parameter 'create_discord_guild_role_request' when calling DiscordApi.create_discord_guild_role" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/roles'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_discord_guild_role_request) # return_type return_type = opts[:debug_return_type] || 'CreateDiscordGuildRole201Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.create_discord_guild_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#create_discord_guild_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_discord_scheduled_event(guild_id, create_discord_scheduled_event_request, opts = {}) ⇒ CreateDiscordScheduledEvent200Response
Create a Discord scheduled event
Create a guild scheduled event. Three event types, selected via the discriminator on entity.type: - external — off-platform (Zoom, in-person, livestream). Requires both location and endsAt. Most common type for scheduler integrations. - voice — hosted in a Discord voice channel. Requires channelId. - stage — hosted in a Discord stage channel. Requires channelId. Bot needs MANAGE_EVENTS in the guild. Existing installs (pre-events PR) need a re-invite OR a server admin manually granting the permission — see route header for details.
191 192 193 194 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 191 def create_discord_scheduled_event(guild_id, create_discord_scheduled_event_request, opts = {}) data, _status_code, _headers = create_discord_scheduled_event_with_http_info(guild_id, create_discord_scheduled_event_request, opts) data end |
#create_discord_scheduled_event_with_http_info(guild_id, create_discord_scheduled_event_request, opts = {}) ⇒ Array<(CreateDiscordScheduledEvent200Response, Integer, Hash)>
Create a Discord scheduled event Create a guild scheduled event. Three event types, selected via the discriminator on `entity.type`: - `external` — off-platform (Zoom, in-person, livestream). Requires both `location` and `endsAt`. Most common type for scheduler integrations. - `voice` — hosted in a Discord voice channel. Requires `channelId`. - `stage` — hosted in a Discord stage channel. Requires `channelId`. Bot needs MANAGE_EVENTS in the guild. Existing installs (pre-events PR) need a re-invite OR a server admin manually granting the permission — see route header for details.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 202 def create_discord_scheduled_event_with_http_info(guild_id, create_discord_scheduled_event_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.create_discord_scheduled_event ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.create_discord_scheduled_event" end # verify the required parameter 'create_discord_scheduled_event_request' is set if @api_client.config.client_side_validation && create_discord_scheduled_event_request.nil? fail ArgumentError, "Missing the required parameter 'create_discord_scheduled_event_request' when calling DiscordApi.create_discord_scheduled_event" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/events'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_discord_scheduled_event_request) # return_type return_type = opts[:debug_return_type] || 'CreateDiscordScheduledEvent200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.create_discord_scheduled_event", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#create_discord_scheduled_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_discord_thread(channel_id, account_id, create_discord_thread_request, opts = {}) ⇒ CreateDiscordThread200Response
Create a Discord public thread
Creates a public thread in a channel. Pass messageId to start the thread from an existing message, or omit it to create a standalone thread. Threads created here are always public. Requires the bot to hold Create Public Threads, which the Zernio bot requests at install time.
266 267 268 269 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 266 def create_discord_thread(channel_id, account_id, create_discord_thread_request, opts = {}) data, _status_code, _headers = create_discord_thread_with_http_info(channel_id, account_id, create_discord_thread_request, opts) data end |
#create_discord_thread_with_http_info(channel_id, account_id, create_discord_thread_request, opts = {}) ⇒ Array<(CreateDiscordThread200Response, Integer, Hash)>
Create a Discord public thread Creates a public thread in a channel. Pass `messageId` to start the thread from an existing message, or omit it to create a standalone thread. Threads created here are always public. Requires the bot to hold Create Public Threads, which the Zernio bot requests at install time.
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 278 def create_discord_thread_with_http_info(channel_id, account_id, create_discord_thread_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.create_discord_thread ...' end # verify the required parameter 'channel_id' is set if @api_client.config.client_side_validation && channel_id.nil? fail ArgumentError, "Missing the required parameter 'channel_id' when calling DiscordApi.create_discord_thread" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.create_discord_thread" end # verify the required parameter 'create_discord_thread_request' is set if @api_client.config.client_side_validation && create_discord_thread_request.nil? fail ArgumentError, "Missing the required parameter 'create_discord_thread_request' when calling DiscordApi.create_discord_thread" end # resource path local_var_path = '/v1/discord/channels/{channelId}/threads'.sub('{' + 'channelId' + '}', CGI.escape(channel_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_discord_thread_request) # return_type return_type = opts[:debug_return_type] || 'CreateDiscordThread200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.create_discord_thread", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#create_discord_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#crosspost_discord_message(channel_id, message_id, account_id, opts = {}) ⇒ CrosspostDiscordMessage200Response
Crosspost Discord message Publishes a message from an announcement channel so it propagates to every server following that channel. The source channel must be an announcement channel. Calling this on a regular text channel returns a 400 before Discord is contacted, because Discord's own error for this case is opaque.
347 348 349 350 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 347 def (channel_id, , account_id, opts = {}) data, _status_code, _headers = (channel_id, , account_id, opts) data end |
#crosspost_discord_message_with_http_info(channel_id, message_id, account_id, opts = {}) ⇒ Array<(CrosspostDiscordMessage200Response, Integer, Hash)>
Crosspost Discord message Publishes a message from an announcement channel so it propagates to every server following that channel. The source channel must be an announcement channel. Calling this on a regular text channel returns a 400 before Discord is contacted, because Discord's own error for this case is opaque.
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 359 def (channel_id, , account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.crosspost_discord_message ...' end # verify the required parameter 'channel_id' is set if @api_client.config.client_side_validation && channel_id.nil? fail ArgumentError, "Missing the required parameter 'channel_id' when calling DiscordApi.crosspost_discord_message" end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling DiscordApi.crosspost_discord_message" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.crosspost_discord_message" end # resource path local_var_path = '/v1/discord/channels/{channelId}/messages/{messageId}/crosspost'.sub('{' + 'channelId' + '}', CGI.escape(channel_id.to_s)).sub('{' + 'messageId' + '}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CrosspostDiscordMessage200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.crosspost_discord_message", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#crosspost_discord_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_discord_guild_role(guild_id, role_id, account_id, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Delete a Discord guild role Permanently deletes a role from the guild and removes it from every member. This cannot be undone. Requires the bot to hold Manage Roles, and the target role must sit below the bot's highest role.
423 424 425 426 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 423 def delete_discord_guild_role(guild_id, role_id, account_id, opts = {}) data, _status_code, _headers = delete_discord_guild_role_with_http_info(guild_id, role_id, account_id, opts) data end |
#delete_discord_guild_role_with_http_info(guild_id, role_id, account_id, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Delete a Discord guild role Permanently deletes a role from the guild and removes it from every member. This cannot be undone. Requires the bot to hold Manage Roles, and the target role must sit below the bot's highest role.
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 435 def delete_discord_guild_role_with_http_info(guild_id, role_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.delete_discord_guild_role ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.delete_discord_guild_role" end # verify the required parameter 'role_id' is set if @api_client.config.client_side_validation && role_id.nil? fail ArgumentError, "Missing the required parameter 'role_id' when calling DiscordApi.delete_discord_guild_role" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.delete_discord_guild_role" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/roles/{roleId}'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)).sub('{' + 'roleId' + '}', CGI.escape(role_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.delete_discord_guild_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#delete_discord_guild_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_discord_message(channel_id, message_id, account_id, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Delete a Discord channel message Deletes a message from a channel, for moderation and cleanup. This cannot be undone. Deleting a message the bot did not send requires the bot to hold the Manage Messages permission, which the Zernio bot requests at install time. Deleting the bot's own message needs no extra permission. Ownership is verified by resolving the channel's guild and confirming the caller owns a Discord account bound to it.
499 500 501 502 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 499 def (channel_id, , account_id, opts = {}) data, _status_code, _headers = (channel_id, , account_id, opts) data end |
#delete_discord_message_with_http_info(channel_id, message_id, account_id, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Delete a Discord channel message Deletes a message from a channel, for moderation and cleanup. This cannot be undone. Deleting a message the bot did not send requires the bot to hold the Manage Messages permission, which the Zernio bot requests at install time. Deleting the bot's own message needs no extra permission. Ownership is verified by resolving the channel's guild and confirming the caller owns a Discord account bound to it.
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 511 def (channel_id, , account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.delete_discord_message ...' end # verify the required parameter 'channel_id' is set if @api_client.config.client_side_validation && channel_id.nil? fail ArgumentError, "Missing the required parameter 'channel_id' when calling DiscordApi.delete_discord_message" end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling DiscordApi.delete_discord_message" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.delete_discord_message" end # resource path local_var_path = '/v1/discord/channels/{channelId}/messages/{messageId}'.sub('{' + 'channelId' + '}', CGI.escape(channel_id.to_s)).sub('{' + 'messageId' + '}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.delete_discord_message", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#delete_discord_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_discord_scheduled_event(guild_id, event_id, account_id, opts = {}) ⇒ DeleteDiscordScheduledEvent200Response
Delete a Discord scheduled event
Hard-delete an event. Use PATCH with status: 'cancelled' instead if you want the event preserved in the guild's history.
575 576 577 578 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 575 def delete_discord_scheduled_event(guild_id, event_id, account_id, opts = {}) data, _status_code, _headers = delete_discord_scheduled_event_with_http_info(guild_id, event_id, account_id, opts) data end |
#delete_discord_scheduled_event_with_http_info(guild_id, event_id, account_id, opts = {}) ⇒ Array<(DeleteDiscordScheduledEvent200Response, Integer, Hash)>
Delete a Discord scheduled event Hard-delete an event. Use PATCH with `status: 'cancelled'` instead if you want the event preserved in the guild's history.
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 587 def delete_discord_scheduled_event_with_http_info(guild_id, event_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.delete_discord_scheduled_event ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.delete_discord_scheduled_event" end # verify the required parameter 'event_id' is set if @api_client.config.client_side_validation && event_id.nil? fail ArgumentError, "Missing the required parameter 'event_id' when calling DiscordApi.delete_discord_scheduled_event" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.delete_discord_scheduled_event" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/events/{eventId}'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)).sub('{' + 'eventId' + '}', CGI.escape(event_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeleteDiscordScheduledEvent200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.delete_discord_scheduled_event", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#delete_discord_scheduled_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_discord_guild_role(guild_id, role_id, account_id, edit_discord_guild_role_request, opts = {}) ⇒ CreateDiscordGuildRole201Response
Edit a Discord guild role Updates a role's name, color, hoist, mentionable flag, or permission bitfield. At least one field must be supplied. Omitted fields are left unchanged. Requires the bot to hold Manage Roles, and the target role must sit below the bot's highest role. See the create-role operation for the re-invite requirement.
652 653 654 655 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 652 def edit_discord_guild_role(guild_id, role_id, account_id, edit_discord_guild_role_request, opts = {}) data, _status_code, _headers = edit_discord_guild_role_with_http_info(guild_id, role_id, account_id, edit_discord_guild_role_request, opts) data end |
#edit_discord_guild_role_with_http_info(guild_id, role_id, account_id, edit_discord_guild_role_request, opts = {}) ⇒ Array<(CreateDiscordGuildRole201Response, Integer, Hash)>
Edit a Discord guild role Updates a role's name, color, hoist, mentionable flag, or permission bitfield. At least one field must be supplied. Omitted fields are left unchanged. Requires the bot to hold Manage Roles, and the target role must sit below the bot's highest role. See the create-role operation for the re-invite requirement.
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 665 def edit_discord_guild_role_with_http_info(guild_id, role_id, account_id, edit_discord_guild_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.edit_discord_guild_role ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.edit_discord_guild_role" end # verify the required parameter 'role_id' is set if @api_client.config.client_side_validation && role_id.nil? fail ArgumentError, "Missing the required parameter 'role_id' when calling DiscordApi.edit_discord_guild_role" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.edit_discord_guild_role" end # verify the required parameter 'edit_discord_guild_role_request' is set if @api_client.config.client_side_validation && edit_discord_guild_role_request.nil? fail ArgumentError, "Missing the required parameter 'edit_discord_guild_role_request' when calling DiscordApi.edit_discord_guild_role" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/roles/{roleId}'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)).sub('{' + 'roleId' + '}', CGI.escape(role_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(edit_discord_guild_role_request) # return_type return_type = opts[:debug_return_type] || 'CreateDiscordGuildRole201Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.edit_discord_guild_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#edit_discord_guild_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_discord_channels(account_id, opts = {}) ⇒ GetDiscordChannels200Response
List Discord guild channels Returns the text, announcement, and forum channels in the connected Discord guild. Use this to discover available channels when switching the connected channel via PATCH /v1/accounts/accountId/discord-settings.
736 737 738 739 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 736 def get_discord_channels(account_id, opts = {}) data, _status_code, _headers = get_discord_channels_with_http_info(account_id, opts) data end |
#get_discord_channels_with_http_info(account_id, opts = {}) ⇒ Array<(GetDiscordChannels200Response, Integer, Hash)>
List Discord guild channels Returns the text, announcement, and forum channels in the connected Discord guild. Use this to discover available channels when switching the connected channel via PATCH /v1/accounts/accountId/discord-settings.
746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 746 def get_discord_channels_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.get_discord_channels ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.get_discord_channels" end # resource path local_var_path = '/v1/accounts/{accountId}/discord-channels'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetDiscordChannels200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.get_discord_channels", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#get_discord_channels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_discord_guild_member(guild_id, user_id, account_id, opts = {}) ⇒ GetDiscordGuildMember200Response
Get a Discord guild member Fetch a single guild member by Discord user id. Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
801 802 803 804 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 801 def get_discord_guild_member(guild_id, user_id, account_id, opts = {}) data, _status_code, _headers = get_discord_guild_member_with_http_info(guild_id, user_id, account_id, opts) data end |
#get_discord_guild_member_with_http_info(guild_id, user_id, account_id, opts = {}) ⇒ Array<(GetDiscordGuildMember200Response, Integer, Hash)>
Get a Discord guild member Fetch a single guild member by Discord user id. Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 813 def get_discord_guild_member_with_http_info(guild_id, user_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.get_discord_guild_member ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.get_discord_guild_member" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling DiscordApi.get_discord_guild_member" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.get_discord_guild_member" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/members/{userId}'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetDiscordGuildMember200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.get_discord_guild_member", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#get_discord_guild_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_discord_scheduled_event(guild_id, event_id, account_id, opts = {}) ⇒ CreateDiscordScheduledEvent200Response
Get a Discord scheduled event
876 877 878 879 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 876 def get_discord_scheduled_event(guild_id, event_id, account_id, opts = {}) data, _status_code, _headers = get_discord_scheduled_event_with_http_info(guild_id, event_id, account_id, opts) data end |
#get_discord_scheduled_event_with_http_info(guild_id, event_id, account_id, opts = {}) ⇒ Array<(CreateDiscordScheduledEvent200Response, Integer, Hash)>
Get a Discord scheduled event
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 887 def get_discord_scheduled_event_with_http_info(guild_id, event_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.get_discord_scheduled_event ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.get_discord_scheduled_event" end # verify the required parameter 'event_id' is set if @api_client.config.client_side_validation && event_id.nil? fail ArgumentError, "Missing the required parameter 'event_id' when calling DiscordApi.get_discord_scheduled_event" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.get_discord_scheduled_event" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/events/{eventId}'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)).sub('{' + 'eventId' + '}', CGI.escape(event_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CreateDiscordScheduledEvent200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.get_discord_scheduled_event", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#get_discord_scheduled_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_discord_settings(account_id, opts = {}) ⇒ GetDiscordSettings200Response
Get Discord account settings Returns the current Discord account settings including webhook identity (display name and avatar), connected channel, and guild information.
949 950 951 952 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 949 def get_discord_settings(account_id, opts = {}) data, _status_code, _headers = get_discord_settings_with_http_info(account_id, opts) data end |
#get_discord_settings_with_http_info(account_id, opts = {}) ⇒ Array<(GetDiscordSettings200Response, Integer, Hash)>
Get Discord account settings Returns the current Discord account settings including webhook identity (display name and avatar), connected channel, and guild information.
959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 959 def get_discord_settings_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.get_discord_settings ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.get_discord_settings" end # resource path local_var_path = '/v1/accounts/{accountId}/discord-settings'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetDiscordSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.get_discord_settings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#get_discord_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_discord_guild_members(guild_id, account_id, opts = {}) ⇒ ListDiscordGuildMembers200Response
List Discord guild members
Cursor-paginated list of guild members. Returns Discord's raw member objects so callers can build community-ops automation (e.g. "add role to all members joined in the last 7 days") on the actual platform shape. Important: this endpoint requires the privileged "Server Members Intent" on the Discord application. If the intent is not enabled, Discord rejects the call and this endpoint returns 403. Single member lookup and prefix search (see the sibling endpoints) do not need the intent. Pagination: pass after = the last user.id from the previous page. Omit on the first call. Response includes a nextCursor and hasMore flag so callers don't need to know Discord's pagination shape.
1015 1016 1017 1018 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1015 def list_discord_guild_members(guild_id, account_id, opts = {}) data, _status_code, _headers = list_discord_guild_members_with_http_info(guild_id, account_id, opts) data end |
#list_discord_guild_members_with_http_info(guild_id, account_id, opts = {}) ⇒ Array<(ListDiscordGuildMembers200Response, Integer, Hash)>
List Discord guild members Cursor-paginated list of guild members. Returns Discord's raw member objects so callers can build community-ops automation (e.g. "add role to all members joined in the last 7 days") on the actual platform shape. Important: this endpoint requires the privileged "Server Members Intent" on the Discord application. If the intent is not enabled, Discord rejects the call and this endpoint returns 403. Single member lookup and prefix search (see the sibling endpoints) do not need the intent. Pagination: pass `after` = the last `user.id` from the previous page. Omit on the first call. Response includes a `nextCursor` and `hasMore` flag so callers don't need to know Discord's pagination shape.
1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1028 def list_discord_guild_members_with_http_info(guild_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.list_discord_guild_members ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.list_discord_guild_members" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.list_discord_guild_members" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DiscordApi.list_discord_guild_members, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DiscordApi.list_discord_guild_members, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/discord/guilds/{guildId}/members'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListDiscordGuildMembers200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.list_discord_guild_members", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#list_discord_guild_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_discord_guild_roles(guild_id, account_id, opts = {}) ⇒ ListDiscordGuildRoles200Response
List Discord guild roles
Returns all roles in a Discord guild. Useful for building role-mention pickers, role-permission UIs, or finding the role ID before calling the role-assign endpoint. Roles are returned unordered — sort client-side by position if you need Discord's UI ordering. Caller must pass accountId of a Discord SocialAccount bound to this guild (route verifies team access + guild match).
1097 1098 1099 1100 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1097 def list_discord_guild_roles(guild_id, account_id, opts = {}) data, _status_code, _headers = list_discord_guild_roles_with_http_info(guild_id, account_id, opts) data end |
#list_discord_guild_roles_with_http_info(guild_id, account_id, opts = {}) ⇒ Array<(ListDiscordGuildRoles200Response, Integer, Hash)>
List Discord guild roles Returns all roles in a Discord guild. Useful for building role-mention pickers, role-permission UIs, or finding the role ID before calling the role-assign endpoint. Roles are returned unordered — sort client-side by `position` if you need Discord's UI ordering. Caller must pass `accountId` of a Discord SocialAccount bound to this guild (route verifies team access + guild match).
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1108 def list_discord_guild_roles_with_http_info(guild_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.list_discord_guild_roles ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.list_discord_guild_roles" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.list_discord_guild_roles" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/roles'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListDiscordGuildRoles200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.list_discord_guild_roles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#list_discord_guild_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_discord_pinned_messages(channel_id, account_id, opts = {}) ⇒ ListDiscordPinnedMessages200Response
List pinned messages Returns the channel's pinned messages, sorted most-recently-pinned first. Discord caps a channel at 50 pinned messages and returns the full list unpaginated. Bot needs READ_MESSAGE_HISTORY in the channel (granted by default BOT_PERMISSIONS).
1167 1168 1169 1170 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1167 def (channel_id, account_id, opts = {}) data, _status_code, _headers = (channel_id, account_id, opts) data end |
#list_discord_pinned_messages_with_http_info(channel_id, account_id, opts = {}) ⇒ Array<(ListDiscordPinnedMessages200Response, Integer, Hash)>
List pinned messages Returns the channel's pinned messages, sorted most-recently-pinned first. Discord caps a channel at 50 pinned messages and returns the full list unpaginated. Bot needs READ_MESSAGE_HISTORY in the channel (granted by default BOT_PERMISSIONS).
1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1178 def (channel_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.list_discord_pinned_messages ...' end # verify the required parameter 'channel_id' is set if @api_client.config.client_side_validation && channel_id.nil? fail ArgumentError, "Missing the required parameter 'channel_id' when calling DiscordApi.list_discord_pinned_messages" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.list_discord_pinned_messages" end # resource path local_var_path = '/v1/discord/channels/{channelId}/pins'.sub('{' + 'channelId' + '}', CGI.escape(channel_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListDiscordPinnedMessages200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.list_discord_pinned_messages", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#list_discord_pinned_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_discord_scheduled_events(guild_id, account_id, opts = {}) ⇒ ListDiscordScheduledEvents200Response
List Discord scheduled events
Return all scheduled events in the guild. Events are distinct from messages — they appear in the server's Events panel and Discord auto-notifies interested members ahead of start time. Pass withUserCount=true to include user_count (number of members who RSVP'd) on each event. Useful for surfacing engagement.
1238 1239 1240 1241 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1238 def list_discord_scheduled_events(guild_id, account_id, opts = {}) data, _status_code, _headers = list_discord_scheduled_events_with_http_info(guild_id, account_id, opts) data end |
#list_discord_scheduled_events_with_http_info(guild_id, account_id, opts = {}) ⇒ Array<(ListDiscordScheduledEvents200Response, Integer, Hash)>
List Discord scheduled events Return all scheduled events in the guild. Events are distinct from messages — they appear in the server's Events panel and Discord auto-notifies interested members ahead of start time. Pass `withUserCount=true` to include `user_count` (number of members who RSVP'd) on each event. Useful for surfacing engagement.
1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1250 def list_discord_scheduled_events_with_http_info(guild_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.list_discord_scheduled_events ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.list_discord_scheduled_events" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.list_discord_scheduled_events" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/events'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id query_params[:'withUserCount'] = opts[:'with_user_count'] if !opts[:'with_user_count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListDiscordScheduledEvents200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.list_discord_scheduled_events", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#list_discord_scheduled_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pin_discord_message(channel_id, message_id, account_id, opts = {}) ⇒ PinDiscordMessage200Response
Pin a Discord message
Pin a specific message in a channel. Path shape mirrors Discord's own API (PUT /channels/{cid}/pins/{mid}). Idempotent — re-pinning an already-pinned message is a 204 no-op. Constraints: - Bot needs MANAGE_MESSAGES in the channel. - 50-pin cap per channel — hitting it returns 400 (Discord-side). Caller should unpin one first.
1311 1312 1313 1314 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1311 def (channel_id, , account_id, opts = {}) data, _status_code, _headers = (channel_id, , account_id, opts) data end |
#pin_discord_message_with_http_info(channel_id, message_id, account_id, opts = {}) ⇒ Array<(PinDiscordMessage200Response, Integer, Hash)>
Pin a Discord message Pin a specific message in a channel. Path shape mirrors Discord's own API (`PUT /channels/cid/pins/mid`). Idempotent — re-pinning an already-pinned message is a 204 no-op. Constraints: - Bot needs MANAGE_MESSAGES in the channel. - 50-pin cap per channel — hitting it returns 400 (Discord-side). Caller should unpin one first.
1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1323 def (channel_id, , account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.pin_discord_message ...' end # verify the required parameter 'channel_id' is set if @api_client.config.client_side_validation && channel_id.nil? fail ArgumentError, "Missing the required parameter 'channel_id' when calling DiscordApi.pin_discord_message" end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling DiscordApi.pin_discord_message" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.pin_discord_message" end # resource path local_var_path = '/v1/discord/channels/{channelId}/pins/{messageId}'.sub('{' + 'channelId' + '}', CGI.escape(channel_id.to_s)).sub('{' + 'messageId' + '}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PinDiscordMessage200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.pin_discord_message", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#pin_discord_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#remove_discord_member_role(guild_id, user_id, role_id, account_id, opts = {}) ⇒ RemoveDiscordMemberRole200Response
Remove a role from a guild member Remove one role from one member. Idempotent — removing a role the member doesn't have returns 204 no-op. Same permission + hierarchy constraints as the PUT counterpart.
1388 1389 1390 1391 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1388 def remove_discord_member_role(guild_id, user_id, role_id, account_id, opts = {}) data, _status_code, _headers = remove_discord_member_role_with_http_info(guild_id, user_id, role_id, account_id, opts) data end |
#remove_discord_member_role_with_http_info(guild_id, user_id, role_id, account_id, opts = {}) ⇒ Array<(RemoveDiscordMemberRole200Response, Integer, Hash)>
Remove a role from a guild member Remove one role from one member. Idempotent — removing a role the member doesn't have returns 204 no-op. Same permission + hierarchy constraints as the PUT counterpart.
1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1401 def remove_discord_member_role_with_http_info(guild_id, user_id, role_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.remove_discord_member_role ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.remove_discord_member_role" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling DiscordApi.remove_discord_member_role" end # verify the required parameter 'role_id' is set if @api_client.config.client_side_validation && role_id.nil? fail ArgumentError, "Missing the required parameter 'role_id' when calling DiscordApi.remove_discord_member_role" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.remove_discord_member_role" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/members/{userId}/roles/{roleId}'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'roleId' + '}', CGI.escape(role_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RemoveDiscordMemberRole200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.remove_discord_member_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#remove_discord_member_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_discord_guild_members(guild_id, account_id, query, opts = {}) ⇒ SearchDiscordGuildMembers200Response
Search Discord guild members Search guild members whose username or nickname starts with the query (Discord matches prefixes only, not substrings). Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
1470 1471 1472 1473 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1470 def search_discord_guild_members(guild_id, account_id, query, opts = {}) data, _status_code, _headers = search_discord_guild_members_with_http_info(guild_id, account_id, query, opts) data end |
#search_discord_guild_members_with_http_info(guild_id, account_id, query, opts = {}) ⇒ Array<(SearchDiscordGuildMembers200Response, Integer, Hash)>
Search Discord guild members Search guild members whose username or nickname starts with the query (Discord matches prefixes only, not substrings). Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1483 def search_discord_guild_members_with_http_info(guild_id, account_id, query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.search_discord_guild_members ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.search_discord_guild_members" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.search_discord_guild_members" end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling DiscordApi.search_discord_guild_members" end if @api_client.config.client_side_validation && query.to_s.length > 100 fail ArgumentError, 'invalid value for "query" when calling DiscordApi.search_discord_guild_members, the character length must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && query.to_s.length < 1 fail ArgumentError, 'invalid value for "query" when calling DiscordApi.search_discord_guild_members, the character length must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DiscordApi.search_discord_guild_members, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DiscordApi.search_discord_guild_members, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/discord/guilds/{guildId}/members/search'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id query_params[:'query'] = query query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SearchDiscordGuildMembers200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.search_discord_guild_members", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#search_discord_guild_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_discord_direct_message(send_discord_direct_message_request, opts = {}) ⇒ SendDiscordDirectMessage200Response
Send a Discord Direct Message
Send a 1:1 Direct Message from the bot to a Discord user (by snowflake ID). Supports the same payload shape as channel posts — content, embeds, media attachments, and TTS. Constraints (Discord platform limits): - The bot can only DM users it shares at least one guild with. - If the recipient has DMs disabled for non-friends, Discord returns 403 (surfaces as a 502 platform error). - content capped at 2,000 chars. - At least one of content, embeds, or attachments is required. - The recipient must be identified by Discord snowflake ID (not username). This is a dedicated endpoint rather than a POST /v1/posts variant because DMs are 1:1 operational messages (onboarding, billing reminders, support pings) with a different lifecycle than scheduled channel posts. DMs are not persisted to Post / ExternalPost and are always sent immediately.
1563 1564 1565 1566 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1563 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#send_discord_direct_message_with_http_info(send_discord_direct_message_request, opts = {}) ⇒ Array<(SendDiscordDirectMessage200Response, Integer, Hash)>
Send a Discord Direct Message Send a 1:1 Direct Message from the bot to a Discord user (by snowflake ID). Supports the same payload shape as channel posts — content, embeds, media attachments, and TTS. Constraints (Discord platform limits): - The bot can only DM users it shares at least one guild with. - If the recipient has DMs disabled for non-friends, Discord returns 403 (surfaces as a 502 platform error). - `content` capped at 2,000 chars. - At least one of `content`, `embeds`, or `attachments` is required. - The recipient must be identified by Discord snowflake ID (not username). This is a dedicated endpoint rather than a `POST /v1/posts` variant because DMs are 1:1 operational messages (onboarding, billing reminders, support pings) with a different lifecycle than scheduled channel posts. DMs are not persisted to `Post` / `ExternalPost` and are always sent immediately.
1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1573 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.send_discord_direct_message ...' end # verify the required parameter 'send_discord_direct_message_request' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'send_discord_direct_message_request' when calling DiscordApi.send_discord_direct_message" end # resource path local_var_path = '/v1/discord/dms' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body() # return_type return_type = opts[:debug_return_type] || 'SendDiscordDirectMessage200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.send_discord_direct_message", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#send_discord_direct_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unpin_discord_message(channel_id, message_id, account_id, opts = {}) ⇒ UnpinDiscordMessage200Response
Unpin a Discord message Unpin a message. Same MANAGE_MESSAGES permission requirement as pin. Idempotent — unpinning a non-pinned message is a 204 no-op.
1633 1634 1635 1636 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1633 def (channel_id, , account_id, opts = {}) data, _status_code, _headers = (channel_id, , account_id, opts) data end |
#unpin_discord_message_with_http_info(channel_id, message_id, account_id, opts = {}) ⇒ Array<(UnpinDiscordMessage200Response, Integer, Hash)>
Unpin a Discord message Unpin a message. Same MANAGE_MESSAGES permission requirement as pin. Idempotent — unpinning a non-pinned message is a 204 no-op.
1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1645 def (channel_id, , account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.unpin_discord_message ...' end # verify the required parameter 'channel_id' is set if @api_client.config.client_side_validation && channel_id.nil? fail ArgumentError, "Missing the required parameter 'channel_id' when calling DiscordApi.unpin_discord_message" end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling DiscordApi.unpin_discord_message" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.unpin_discord_message" end # resource path local_var_path = '/v1/discord/channels/{channelId}/pins/{messageId}'.sub('{' + 'channelId' + '}', CGI.escape(channel_id.to_s)).sub('{' + 'messageId' + '}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UnpinDiscordMessage200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.unpin_discord_message", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#unpin_discord_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_discord_scheduled_event(guild_id, event_id, update_discord_scheduled_event_request, opts = {}) ⇒ CreateDiscordScheduledEvent200Response
Update a Discord scheduled event
Patch any subset of fields. Passing status: 'cancelled' is how you cancel an event — Discord doesn't have a dedicated cancel endpoint, it's a status transition. Most status transitions Discord enforces (you can't go SCHEDULED → COMPLETED directly). The common consumer case is SCHEDULED → CANCELED.
1709 1710 1711 1712 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1709 def update_discord_scheduled_event(guild_id, event_id, update_discord_scheduled_event_request, opts = {}) data, _status_code, _headers = update_discord_scheduled_event_with_http_info(guild_id, event_id, update_discord_scheduled_event_request, opts) data end |
#update_discord_scheduled_event_with_http_info(guild_id, event_id, update_discord_scheduled_event_request, opts = {}) ⇒ Array<(CreateDiscordScheduledEvent200Response, Integer, Hash)>
Update a Discord scheduled event Patch any subset of fields. Passing `status: 'cancelled'` is how you cancel an event — Discord doesn't have a dedicated cancel endpoint, it's a status transition. Most status transitions Discord enforces (you can't go SCHEDULED → COMPLETED directly). The common consumer case is SCHEDULED → CANCELED.
1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1721 def update_discord_scheduled_event_with_http_info(guild_id, event_id, update_discord_scheduled_event_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.update_discord_scheduled_event ...' end # verify the required parameter 'guild_id' is set if @api_client.config.client_side_validation && guild_id.nil? fail ArgumentError, "Missing the required parameter 'guild_id' when calling DiscordApi.update_discord_scheduled_event" end # verify the required parameter 'event_id' is set if @api_client.config.client_side_validation && event_id.nil? fail ArgumentError, "Missing the required parameter 'event_id' when calling DiscordApi.update_discord_scheduled_event" end # verify the required parameter 'update_discord_scheduled_event_request' is set if @api_client.config.client_side_validation && update_discord_scheduled_event_request.nil? fail ArgumentError, "Missing the required parameter 'update_discord_scheduled_event_request' when calling DiscordApi.update_discord_scheduled_event" end # resource path local_var_path = '/v1/discord/guilds/{guildId}/events/{eventId}'.sub('{' + 'guildId' + '}', CGI.escape(guild_id.to_s)).sub('{' + 'eventId' + '}', CGI.escape(event_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_discord_scheduled_event_request) # return_type return_type = opts[:debug_return_type] || 'CreateDiscordScheduledEvent200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.update_discord_scheduled_event", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#update_discord_scheduled_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_discord_settings(account_id, update_discord_settings_request, opts = {}) ⇒ UpdateDiscordSettings200Response
Update Discord settings Update Discord account settings. Supports two operations (can be combined): 1. Webhook identity - Set the default display name and avatar that appear as the message author on every post. These are account-level defaults; individual posts can override them via platformSpecificData.webhookUsername / webhookAvatarUrl. 2. Switch channel - Move the connection to a different channel in the same guild. A new webhook is automatically created in the target channel.
1788 1789 1790 1791 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1788 def update_discord_settings(account_id, update_discord_settings_request, opts = {}) data, _status_code, _headers = update_discord_settings_with_http_info(account_id, update_discord_settings_request, opts) data end |
#update_discord_settings_with_http_info(account_id, update_discord_settings_request, opts = {}) ⇒ Array<(UpdateDiscordSettings200Response, Integer, Hash)>
Update Discord settings Update Discord account settings. Supports two operations (can be combined): 1. Webhook identity - Set the default display name and avatar that appear as the message author on every post. These are account-level defaults; individual posts can override them via platformSpecificData.webhookUsername / webhookAvatarUrl. 2. Switch channel - Move the connection to a different channel in the same guild. A new webhook is automatically created in the target channel.
1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 |
# File 'lib/zernio-sdk/api/discord_api.rb', line 1799 def update_discord_settings_with_http_info(account_id, update_discord_settings_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DiscordApi.update_discord_settings ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling DiscordApi.update_discord_settings" end # verify the required parameter 'update_discord_settings_request' is set if @api_client.config.client_side_validation && update_discord_settings_request.nil? fail ArgumentError, "Missing the required parameter 'update_discord_settings_request' when calling DiscordApi.update_discord_settings" end # resource path local_var_path = '/v1/accounts/{accountId}/discord-settings'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_discord_settings_request) # return_type return_type = opts[:debug_return_type] || 'UpdateDiscordSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"DiscordApi.update_discord_settings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DiscordApi#update_discord_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |