diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
new file mode 100644
index 0000000..d2157c5
--- /dev/null
+++ b/.github/workflows/python.yml
@@ -0,0 +1,34 @@
+# NOTE: This file is auto generated by OpenAPI Generator.
+# URL: https://openapi-generator.tech
+#
+# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
+
+name: dc_rest Python package
+
+on: [push, pull_request]
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements.txt
+ - name: Build package
+ run: |
+ pip install build
+ python -m build
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..43995bd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,66 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
+venv/
+.venv/
+.python-version
+.pytest_cache
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+#Ipython Notebook
+.ipynb_checkpoints
diff --git a/README.md b/README.md
index afed6dd..4e87a97 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,922 @@
-# dc-rest-python
+# Python API client for dc-rest
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+- API version: 10
+- Package version: 10
+- Build date: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+
+## Requirements.
+
+Python 3.9+
+
+## Installation & Usage
+### pip install
+
+If the python package is hosted on a repository, you can install directly using:
+
+```sh
+pip install git+https://github.com/dc-api/dc-rest-python.git
+```
+(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/dc-api/dc-rest-python.git`)
+
+Then import the package:
+```python
+import dc_rest
+```
+
+### Setuptools
+
+Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
+
+```sh
+python setup.py install --user
+```
+(or `sudo python setup.py install` to install the package for all users)
+
+Then import the package:
+```python
+import dc_rest
+```
+
+### Tests
+
+Execute `pytest` to run the tests.
+
+## Getting Started
+
+Please follow the [installation procedure](#installation--usage) and then run the following:
+
+```python
+
+import dc_rest
+from dc_rest.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://discord.com/api/v10
+# See configuration.py for a list of all supported configuration parameters.
+configuration = dc_rest.Configuration(
+ host = "https://discord.com/api/v10"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: BotToken
+configuration.api_key['BotToken'] = os.environ["API_KEY"]
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['BotToken'] = 'Bearer'
+
+
+# Enter a context with an instance of the API client
+async with dc_rest.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = dc_rest.DefaultApi(api_client)
+ channel_id = 'channel_id_example' # str |
+ user_id = 'user_id_example' # str |
+ add_group_dm_user_request = dc_rest.AddGroupDmUserRequest() # AddGroupDmUserRequest |
+
+ try:
+ api_response = await api_instance.add_group_dm_user(channel_id, user_id, add_group_dm_user_request)
+ print("The response of DefaultApi->add_group_dm_user:\n")
+ pprint(api_response)
+ except ApiException as e:
+ print("Exception when calling DefaultApi->add_group_dm_user: %s\n" % e)
+
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *https://discord.com/api/v10*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*DefaultApi* | [**add_group_dm_user**](docs/DefaultApi.md#add_group_dm_user) | **PUT** /channels/{channel_id}/recipients/{user_id} |
+*DefaultApi* | [**add_guild_member**](docs/DefaultApi.md#add_guild_member) | **PUT** /guilds/{guild_id}/members/{user_id} |
+*DefaultApi* | [**add_guild_member_role**](docs/DefaultApi.md#add_guild_member_role) | **PUT** /guilds/{guild_id}/members/{user_id}/roles/{role_id} |
+*DefaultApi* | [**add_lobby_member**](docs/DefaultApi.md#add_lobby_member) | **PUT** /lobbies/{lobby_id}/members/{user_id} |
+*DefaultApi* | [**add_my_message_reaction**](docs/DefaultApi.md#add_my_message_reaction) | **PUT** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me |
+*DefaultApi* | [**add_thread_member**](docs/DefaultApi.md#add_thread_member) | **PUT** /channels/{channel_id}/thread-members/{user_id} |
+*DefaultApi* | [**applications_get_activity_instance**](docs/DefaultApi.md#applications_get_activity_instance) | **GET** /applications/{application_id}/activity-instances/{instance_id} |
+*DefaultApi* | [**ban_user_from_guild**](docs/DefaultApi.md#ban_user_from_guild) | **PUT** /guilds/{guild_id}/bans/{user_id} |
+*DefaultApi* | [**bulk_ban_users_from_guild**](docs/DefaultApi.md#bulk_ban_users_from_guild) | **POST** /guilds/{guild_id}/bulk-ban |
+*DefaultApi* | [**bulk_delete_messages**](docs/DefaultApi.md#bulk_delete_messages) | **POST** /channels/{channel_id}/messages/bulk-delete |
+*DefaultApi* | [**bulk_set_application_commands**](docs/DefaultApi.md#bulk_set_application_commands) | **PUT** /applications/{application_id}/commands |
+*DefaultApi* | [**bulk_set_guild_application_commands**](docs/DefaultApi.md#bulk_set_guild_application_commands) | **PUT** /applications/{application_id}/guilds/{guild_id}/commands |
+*DefaultApi* | [**bulk_update_guild_channels**](docs/DefaultApi.md#bulk_update_guild_channels) | **PATCH** /guilds/{guild_id}/channels |
+*DefaultApi* | [**bulk_update_guild_roles**](docs/DefaultApi.md#bulk_update_guild_roles) | **PATCH** /guilds/{guild_id}/roles |
+*DefaultApi* | [**bulk_update_lobby_members**](docs/DefaultApi.md#bulk_update_lobby_members) | **POST** /lobbies/{lobby_id}/members/bulk |
+*DefaultApi* | [**consume_entitlement**](docs/DefaultApi.md#consume_entitlement) | **POST** /applications/{application_id}/entitlements/{entitlement_id}/consume |
+*DefaultApi* | [**create_application_command**](docs/DefaultApi.md#create_application_command) | **POST** /applications/{application_id}/commands |
+*DefaultApi* | [**create_application_emoji**](docs/DefaultApi.md#create_application_emoji) | **POST** /applications/{application_id}/emojis |
+*DefaultApi* | [**create_auto_moderation_rule**](docs/DefaultApi.md#create_auto_moderation_rule) | **POST** /guilds/{guild_id}/auto-moderation/rules |
+*DefaultApi* | [**create_channel_invite**](docs/DefaultApi.md#create_channel_invite) | **POST** /channels/{channel_id}/invites |
+*DefaultApi* | [**create_dm**](docs/DefaultApi.md#create_dm) | **POST** /users/@me/channels |
+*DefaultApi* | [**create_entitlement**](docs/DefaultApi.md#create_entitlement) | **POST** /applications/{application_id}/entitlements |
+*DefaultApi* | [**create_guild**](docs/DefaultApi.md#create_guild) | **POST** /guilds |
+*DefaultApi* | [**create_guild_application_command**](docs/DefaultApi.md#create_guild_application_command) | **POST** /applications/{application_id}/guilds/{guild_id}/commands |
+*DefaultApi* | [**create_guild_channel**](docs/DefaultApi.md#create_guild_channel) | **POST** /guilds/{guild_id}/channels |
+*DefaultApi* | [**create_guild_emoji**](docs/DefaultApi.md#create_guild_emoji) | **POST** /guilds/{guild_id}/emojis |
+*DefaultApi* | [**create_guild_from_template**](docs/DefaultApi.md#create_guild_from_template) | **POST** /guilds/templates/{code} |
+*DefaultApi* | [**create_guild_role**](docs/DefaultApi.md#create_guild_role) | **POST** /guilds/{guild_id}/roles |
+*DefaultApi* | [**create_guild_scheduled_event**](docs/DefaultApi.md#create_guild_scheduled_event) | **POST** /guilds/{guild_id}/scheduled-events |
+*DefaultApi* | [**create_guild_soundboard_sound**](docs/DefaultApi.md#create_guild_soundboard_sound) | **POST** /guilds/{guild_id}/soundboard-sounds |
+*DefaultApi* | [**create_guild_sticker**](docs/DefaultApi.md#create_guild_sticker) | **POST** /guilds/{guild_id}/stickers |
+*DefaultApi* | [**create_guild_template**](docs/DefaultApi.md#create_guild_template) | **POST** /guilds/{guild_id}/templates |
+*DefaultApi* | [**create_interaction_response**](docs/DefaultApi.md#create_interaction_response) | **POST** /interactions/{interaction_id}/{interaction_token}/callback |
+*DefaultApi* | [**create_lobby**](docs/DefaultApi.md#create_lobby) | **POST** /lobbies |
+*DefaultApi* | [**create_lobby_message**](docs/DefaultApi.md#create_lobby_message) | **POST** /lobbies/{lobby_id}/messages |
+*DefaultApi* | [**create_message**](docs/DefaultApi.md#create_message) | **POST** /channels/{channel_id}/messages |
+*DefaultApi* | [**create_or_join_lobby**](docs/DefaultApi.md#create_or_join_lobby) | **PUT** /lobbies |
+*DefaultApi* | [**create_pin**](docs/DefaultApi.md#create_pin) | **PUT** /channels/{channel_id}/messages/pins/{message_id} |
+*DefaultApi* | [**create_stage_instance**](docs/DefaultApi.md#create_stage_instance) | **POST** /stage-instances |
+*DefaultApi* | [**create_thread**](docs/DefaultApi.md#create_thread) | **POST** /channels/{channel_id}/threads |
+*DefaultApi* | [**create_thread_from_message**](docs/DefaultApi.md#create_thread_from_message) | **POST** /channels/{channel_id}/messages/{message_id}/threads |
+*DefaultApi* | [**create_webhook**](docs/DefaultApi.md#create_webhook) | **POST** /channels/{channel_id}/webhooks |
+*DefaultApi* | [**crosspost_message**](docs/DefaultApi.md#crosspost_message) | **POST** /channels/{channel_id}/messages/{message_id}/crosspost |
+*DefaultApi* | [**delete_all_message_reactions**](docs/DefaultApi.md#delete_all_message_reactions) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions |
+*DefaultApi* | [**delete_all_message_reactions_by_emoji**](docs/DefaultApi.md#delete_all_message_reactions_by_emoji) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name} |
+*DefaultApi* | [**delete_application_command**](docs/DefaultApi.md#delete_application_command) | **DELETE** /applications/{application_id}/commands/{command_id} |
+*DefaultApi* | [**delete_application_emoji**](docs/DefaultApi.md#delete_application_emoji) | **DELETE** /applications/{application_id}/emojis/{emoji_id} |
+*DefaultApi* | [**delete_application_user_role_connection**](docs/DefaultApi.md#delete_application_user_role_connection) | **DELETE** /users/@me/applications/{application_id}/role-connection |
+*DefaultApi* | [**delete_auto_moderation_rule**](docs/DefaultApi.md#delete_auto_moderation_rule) | **DELETE** /guilds/{guild_id}/auto-moderation/rules/{rule_id} |
+*DefaultApi* | [**delete_channel**](docs/DefaultApi.md#delete_channel) | **DELETE** /channels/{channel_id} |
+*DefaultApi* | [**delete_channel_permission_overwrite**](docs/DefaultApi.md#delete_channel_permission_overwrite) | **DELETE** /channels/{channel_id}/permissions/{overwrite_id} |
+*DefaultApi* | [**delete_entitlement**](docs/DefaultApi.md#delete_entitlement) | **DELETE** /applications/{application_id}/entitlements/{entitlement_id} |
+*DefaultApi* | [**delete_group_dm_user**](docs/DefaultApi.md#delete_group_dm_user) | **DELETE** /channels/{channel_id}/recipients/{user_id} |
+*DefaultApi* | [**delete_guild**](docs/DefaultApi.md#delete_guild) | **DELETE** /guilds/{guild_id} |
+*DefaultApi* | [**delete_guild_application_command**](docs/DefaultApi.md#delete_guild_application_command) | **DELETE** /applications/{application_id}/guilds/{guild_id}/commands/{command_id} |
+*DefaultApi* | [**delete_guild_emoji**](docs/DefaultApi.md#delete_guild_emoji) | **DELETE** /guilds/{guild_id}/emojis/{emoji_id} |
+*DefaultApi* | [**delete_guild_integration**](docs/DefaultApi.md#delete_guild_integration) | **DELETE** /guilds/{guild_id}/integrations/{integration_id} |
+*DefaultApi* | [**delete_guild_member**](docs/DefaultApi.md#delete_guild_member) | **DELETE** /guilds/{guild_id}/members/{user_id} |
+*DefaultApi* | [**delete_guild_member_role**](docs/DefaultApi.md#delete_guild_member_role) | **DELETE** /guilds/{guild_id}/members/{user_id}/roles/{role_id} |
+*DefaultApi* | [**delete_guild_role**](docs/DefaultApi.md#delete_guild_role) | **DELETE** /guilds/{guild_id}/roles/{role_id} |
+*DefaultApi* | [**delete_guild_scheduled_event**](docs/DefaultApi.md#delete_guild_scheduled_event) | **DELETE** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} |
+*DefaultApi* | [**delete_guild_soundboard_sound**](docs/DefaultApi.md#delete_guild_soundboard_sound) | **DELETE** /guilds/{guild_id}/soundboard-sounds/{sound_id} |
+*DefaultApi* | [**delete_guild_sticker**](docs/DefaultApi.md#delete_guild_sticker) | **DELETE** /guilds/{guild_id}/stickers/{sticker_id} |
+*DefaultApi* | [**delete_guild_template**](docs/DefaultApi.md#delete_guild_template) | **DELETE** /guilds/{guild_id}/templates/{code} |
+*DefaultApi* | [**delete_lobby_member**](docs/DefaultApi.md#delete_lobby_member) | **DELETE** /lobbies/{lobby_id}/members/{user_id} |
+*DefaultApi* | [**delete_message**](docs/DefaultApi.md#delete_message) | **DELETE** /channels/{channel_id}/messages/{message_id} |
+*DefaultApi* | [**delete_my_message_reaction**](docs/DefaultApi.md#delete_my_message_reaction) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me |
+*DefaultApi* | [**delete_original_webhook_message**](docs/DefaultApi.md#delete_original_webhook_message) | **DELETE** /webhooks/{webhook_id}/{webhook_token}/messages/@original |
+*DefaultApi* | [**delete_pin**](docs/DefaultApi.md#delete_pin) | **DELETE** /channels/{channel_id}/messages/pins/{message_id} |
+*DefaultApi* | [**delete_stage_instance**](docs/DefaultApi.md#delete_stage_instance) | **DELETE** /stage-instances/{channel_id} |
+*DefaultApi* | [**delete_thread_member**](docs/DefaultApi.md#delete_thread_member) | **DELETE** /channels/{channel_id}/thread-members/{user_id} |
+*DefaultApi* | [**delete_user_message_reaction**](docs/DefaultApi.md#delete_user_message_reaction) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/{user_id} |
+*DefaultApi* | [**delete_webhook**](docs/DefaultApi.md#delete_webhook) | **DELETE** /webhooks/{webhook_id} |
+*DefaultApi* | [**delete_webhook_by_token**](docs/DefaultApi.md#delete_webhook_by_token) | **DELETE** /webhooks/{webhook_id}/{webhook_token} |
+*DefaultApi* | [**delete_webhook_message**](docs/DefaultApi.md#delete_webhook_message) | **DELETE** /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} |
+*DefaultApi* | [**deprecated_create_pin**](docs/DefaultApi.md#deprecated_create_pin) | **PUT** /channels/{channel_id}/pins/{message_id} |
+*DefaultApi* | [**deprecated_delete_pin**](docs/DefaultApi.md#deprecated_delete_pin) | **DELETE** /channels/{channel_id}/pins/{message_id} |
+*DefaultApi* | [**deprecated_list_pins**](docs/DefaultApi.md#deprecated_list_pins) | **GET** /channels/{channel_id}/pins |
+*DefaultApi* | [**edit_lobby**](docs/DefaultApi.md#edit_lobby) | **PATCH** /lobbies/{lobby_id} |
+*DefaultApi* | [**edit_lobby_channel_link**](docs/DefaultApi.md#edit_lobby_channel_link) | **PATCH** /lobbies/{lobby_id}/channel-linking |
+*DefaultApi* | [**execute_github_compatible_webhook**](docs/DefaultApi.md#execute_github_compatible_webhook) | **POST** /webhooks/{webhook_id}/{webhook_token}/github |
+*DefaultApi* | [**execute_slack_compatible_webhook**](docs/DefaultApi.md#execute_slack_compatible_webhook) | **POST** /webhooks/{webhook_id}/{webhook_token}/slack |
+*DefaultApi* | [**execute_webhook**](docs/DefaultApi.md#execute_webhook) | **POST** /webhooks/{webhook_id}/{webhook_token} |
+*DefaultApi* | [**follow_channel**](docs/DefaultApi.md#follow_channel) | **POST** /channels/{channel_id}/followers |
+*DefaultApi* | [**get_active_guild_threads**](docs/DefaultApi.md#get_active_guild_threads) | **GET** /guilds/{guild_id}/threads/active |
+*DefaultApi* | [**get_answer_voters**](docs/DefaultApi.md#get_answer_voters) | **GET** /channels/{channel_id}/polls/{message_id}/answers/{answer_id} |
+*DefaultApi* | [**get_application**](docs/DefaultApi.md#get_application) | **GET** /applications/{application_id} |
+*DefaultApi* | [**get_application_command**](docs/DefaultApi.md#get_application_command) | **GET** /applications/{application_id}/commands/{command_id} |
+*DefaultApi* | [**get_application_emoji**](docs/DefaultApi.md#get_application_emoji) | **GET** /applications/{application_id}/emojis/{emoji_id} |
+*DefaultApi* | [**get_application_role_connections_metadata**](docs/DefaultApi.md#get_application_role_connections_metadata) | **GET** /applications/{application_id}/role-connections/metadata |
+*DefaultApi* | [**get_application_user_role_connection**](docs/DefaultApi.md#get_application_user_role_connection) | **GET** /users/@me/applications/{application_id}/role-connection |
+*DefaultApi* | [**get_auto_moderation_rule**](docs/DefaultApi.md#get_auto_moderation_rule) | **GET** /guilds/{guild_id}/auto-moderation/rules/{rule_id} |
+*DefaultApi* | [**get_bot_gateway**](docs/DefaultApi.md#get_bot_gateway) | **GET** /gateway/bot |
+*DefaultApi* | [**get_channel**](docs/DefaultApi.md#get_channel) | **GET** /channels/{channel_id} |
+*DefaultApi* | [**get_entitlement**](docs/DefaultApi.md#get_entitlement) | **GET** /applications/{application_id}/entitlements/{entitlement_id} |
+*DefaultApi* | [**get_entitlements**](docs/DefaultApi.md#get_entitlements) | **GET** /applications/{application_id}/entitlements |
+*DefaultApi* | [**get_gateway**](docs/DefaultApi.md#get_gateway) | **GET** /gateway |
+*DefaultApi* | [**get_guild**](docs/DefaultApi.md#get_guild) | **GET** /guilds/{guild_id} |
+*DefaultApi* | [**get_guild_application_command**](docs/DefaultApi.md#get_guild_application_command) | **GET** /applications/{application_id}/guilds/{guild_id}/commands/{command_id} |
+*DefaultApi* | [**get_guild_application_command_permissions**](docs/DefaultApi.md#get_guild_application_command_permissions) | **GET** /applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions |
+*DefaultApi* | [**get_guild_ban**](docs/DefaultApi.md#get_guild_ban) | **GET** /guilds/{guild_id}/bans/{user_id} |
+*DefaultApi* | [**get_guild_emoji**](docs/DefaultApi.md#get_guild_emoji) | **GET** /guilds/{guild_id}/emojis/{emoji_id} |
+*DefaultApi* | [**get_guild_member**](docs/DefaultApi.md#get_guild_member) | **GET** /guilds/{guild_id}/members/{user_id} |
+*DefaultApi* | [**get_guild_new_member_welcome**](docs/DefaultApi.md#get_guild_new_member_welcome) | **GET** /guilds/{guild_id}/new-member-welcome |
+*DefaultApi* | [**get_guild_preview**](docs/DefaultApi.md#get_guild_preview) | **GET** /guilds/{guild_id}/preview |
+*DefaultApi* | [**get_guild_role**](docs/DefaultApi.md#get_guild_role) | **GET** /guilds/{guild_id}/roles/{role_id} |
+*DefaultApi* | [**get_guild_scheduled_event**](docs/DefaultApi.md#get_guild_scheduled_event) | **GET** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} |
+*DefaultApi* | [**get_guild_soundboard_sound**](docs/DefaultApi.md#get_guild_soundboard_sound) | **GET** /guilds/{guild_id}/soundboard-sounds/{sound_id} |
+*DefaultApi* | [**get_guild_sticker**](docs/DefaultApi.md#get_guild_sticker) | **GET** /guilds/{guild_id}/stickers/{sticker_id} |
+*DefaultApi* | [**get_guild_template**](docs/DefaultApi.md#get_guild_template) | **GET** /guilds/templates/{code} |
+*DefaultApi* | [**get_guild_vanity_url**](docs/DefaultApi.md#get_guild_vanity_url) | **GET** /guilds/{guild_id}/vanity-url |
+*DefaultApi* | [**get_guild_webhooks**](docs/DefaultApi.md#get_guild_webhooks) | **GET** /guilds/{guild_id}/webhooks |
+*DefaultApi* | [**get_guild_welcome_screen**](docs/DefaultApi.md#get_guild_welcome_screen) | **GET** /guilds/{guild_id}/welcome-screen |
+*DefaultApi* | [**get_guild_widget**](docs/DefaultApi.md#get_guild_widget) | **GET** /guilds/{guild_id}/widget.json |
+*DefaultApi* | [**get_guild_widget_png**](docs/DefaultApi.md#get_guild_widget_png) | **GET** /guilds/{guild_id}/widget.png |
+*DefaultApi* | [**get_guild_widget_settings**](docs/DefaultApi.md#get_guild_widget_settings) | **GET** /guilds/{guild_id}/widget |
+*DefaultApi* | [**get_guilds_onboarding**](docs/DefaultApi.md#get_guilds_onboarding) | **GET** /guilds/{guild_id}/onboarding |
+*DefaultApi* | [**get_lobby**](docs/DefaultApi.md#get_lobby) | **GET** /lobbies/{lobby_id} |
+*DefaultApi* | [**get_lobby_messages**](docs/DefaultApi.md#get_lobby_messages) | **GET** /lobbies/{lobby_id}/messages |
+*DefaultApi* | [**get_message**](docs/DefaultApi.md#get_message) | **GET** /channels/{channel_id}/messages/{message_id} |
+*DefaultApi* | [**get_my_application**](docs/DefaultApi.md#get_my_application) | **GET** /applications/@me |
+*DefaultApi* | [**get_my_guild_member**](docs/DefaultApi.md#get_my_guild_member) | **GET** /users/@me/guilds/{guild_id}/member |
+*DefaultApi* | [**get_my_oauth2_application**](docs/DefaultApi.md#get_my_oauth2_application) | **GET** /oauth2/applications/@me |
+*DefaultApi* | [**get_my_oauth2_authorization**](docs/DefaultApi.md#get_my_oauth2_authorization) | **GET** /oauth2/@me |
+*DefaultApi* | [**get_my_user**](docs/DefaultApi.md#get_my_user) | **GET** /users/@me |
+*DefaultApi* | [**get_openid_connect_userinfo**](docs/DefaultApi.md#get_openid_connect_userinfo) | **GET** /oauth2/userinfo |
+*DefaultApi* | [**get_original_webhook_message**](docs/DefaultApi.md#get_original_webhook_message) | **GET** /webhooks/{webhook_id}/{webhook_token}/messages/@original |
+*DefaultApi* | [**get_public_keys**](docs/DefaultApi.md#get_public_keys) | **GET** /oauth2/keys |
+*DefaultApi* | [**get_self_voice_state**](docs/DefaultApi.md#get_self_voice_state) | **GET** /guilds/{guild_id}/voice-states/@me |
+*DefaultApi* | [**get_soundboard_default_sounds**](docs/DefaultApi.md#get_soundboard_default_sounds) | **GET** /soundboard-default-sounds |
+*DefaultApi* | [**get_stage_instance**](docs/DefaultApi.md#get_stage_instance) | **GET** /stage-instances/{channel_id} |
+*DefaultApi* | [**get_sticker**](docs/DefaultApi.md#get_sticker) | **GET** /stickers/{sticker_id} |
+*DefaultApi* | [**get_sticker_pack**](docs/DefaultApi.md#get_sticker_pack) | **GET** /sticker-packs/{pack_id} |
+*DefaultApi* | [**get_thread_member**](docs/DefaultApi.md#get_thread_member) | **GET** /channels/{channel_id}/thread-members/{user_id} |
+*DefaultApi* | [**get_user**](docs/DefaultApi.md#get_user) | **GET** /users/{user_id} |
+*DefaultApi* | [**get_voice_state**](docs/DefaultApi.md#get_voice_state) | **GET** /guilds/{guild_id}/voice-states/{user_id} |
+*DefaultApi* | [**get_webhook**](docs/DefaultApi.md#get_webhook) | **GET** /webhooks/{webhook_id} |
+*DefaultApi* | [**get_webhook_by_token**](docs/DefaultApi.md#get_webhook_by_token) | **GET** /webhooks/{webhook_id}/{webhook_token} |
+*DefaultApi* | [**get_webhook_message**](docs/DefaultApi.md#get_webhook_message) | **GET** /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} |
+*DefaultApi* | [**invite_resolve**](docs/DefaultApi.md#invite_resolve) | **GET** /invites/{code} |
+*DefaultApi* | [**invite_revoke**](docs/DefaultApi.md#invite_revoke) | **DELETE** /invites/{code} |
+*DefaultApi* | [**join_thread**](docs/DefaultApi.md#join_thread) | **PUT** /channels/{channel_id}/thread-members/@me |
+*DefaultApi* | [**leave_guild**](docs/DefaultApi.md#leave_guild) | **DELETE** /users/@me/guilds/{guild_id} |
+*DefaultApi* | [**leave_lobby**](docs/DefaultApi.md#leave_lobby) | **DELETE** /lobbies/{lobby_id}/members/@me |
+*DefaultApi* | [**leave_thread**](docs/DefaultApi.md#leave_thread) | **DELETE** /channels/{channel_id}/thread-members/@me |
+*DefaultApi* | [**list_application_commands**](docs/DefaultApi.md#list_application_commands) | **GET** /applications/{application_id}/commands |
+*DefaultApi* | [**list_application_emojis**](docs/DefaultApi.md#list_application_emojis) | **GET** /applications/{application_id}/emojis |
+*DefaultApi* | [**list_auto_moderation_rules**](docs/DefaultApi.md#list_auto_moderation_rules) | **GET** /guilds/{guild_id}/auto-moderation/rules |
+*DefaultApi* | [**list_channel_invites**](docs/DefaultApi.md#list_channel_invites) | **GET** /channels/{channel_id}/invites |
+*DefaultApi* | [**list_channel_webhooks**](docs/DefaultApi.md#list_channel_webhooks) | **GET** /channels/{channel_id}/webhooks |
+*DefaultApi* | [**list_guild_application_command_permissions**](docs/DefaultApi.md#list_guild_application_command_permissions) | **GET** /applications/{application_id}/guilds/{guild_id}/commands/permissions |
+*DefaultApi* | [**list_guild_application_commands**](docs/DefaultApi.md#list_guild_application_commands) | **GET** /applications/{application_id}/guilds/{guild_id}/commands |
+*DefaultApi* | [**list_guild_audit_log_entries**](docs/DefaultApi.md#list_guild_audit_log_entries) | **GET** /guilds/{guild_id}/audit-logs |
+*DefaultApi* | [**list_guild_bans**](docs/DefaultApi.md#list_guild_bans) | **GET** /guilds/{guild_id}/bans |
+*DefaultApi* | [**list_guild_channels**](docs/DefaultApi.md#list_guild_channels) | **GET** /guilds/{guild_id}/channels |
+*DefaultApi* | [**list_guild_emojis**](docs/DefaultApi.md#list_guild_emojis) | **GET** /guilds/{guild_id}/emojis |
+*DefaultApi* | [**list_guild_integrations**](docs/DefaultApi.md#list_guild_integrations) | **GET** /guilds/{guild_id}/integrations |
+*DefaultApi* | [**list_guild_invites**](docs/DefaultApi.md#list_guild_invites) | **GET** /guilds/{guild_id}/invites |
+*DefaultApi* | [**list_guild_members**](docs/DefaultApi.md#list_guild_members) | **GET** /guilds/{guild_id}/members |
+*DefaultApi* | [**list_guild_roles**](docs/DefaultApi.md#list_guild_roles) | **GET** /guilds/{guild_id}/roles |
+*DefaultApi* | [**list_guild_scheduled_event_users**](docs/DefaultApi.md#list_guild_scheduled_event_users) | **GET** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users |
+*DefaultApi* | [**list_guild_scheduled_events**](docs/DefaultApi.md#list_guild_scheduled_events) | **GET** /guilds/{guild_id}/scheduled-events |
+*DefaultApi* | [**list_guild_soundboard_sounds**](docs/DefaultApi.md#list_guild_soundboard_sounds) | **GET** /guilds/{guild_id}/soundboard-sounds |
+*DefaultApi* | [**list_guild_stickers**](docs/DefaultApi.md#list_guild_stickers) | **GET** /guilds/{guild_id}/stickers |
+*DefaultApi* | [**list_guild_templates**](docs/DefaultApi.md#list_guild_templates) | **GET** /guilds/{guild_id}/templates |
+*DefaultApi* | [**list_guild_voice_regions**](docs/DefaultApi.md#list_guild_voice_regions) | **GET** /guilds/{guild_id}/regions |
+*DefaultApi* | [**list_message_reactions_by_emoji**](docs/DefaultApi.md#list_message_reactions_by_emoji) | **GET** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name} |
+*DefaultApi* | [**list_messages**](docs/DefaultApi.md#list_messages) | **GET** /channels/{channel_id}/messages |
+*DefaultApi* | [**list_my_connections**](docs/DefaultApi.md#list_my_connections) | **GET** /users/@me/connections |
+*DefaultApi* | [**list_my_guilds**](docs/DefaultApi.md#list_my_guilds) | **GET** /users/@me/guilds |
+*DefaultApi* | [**list_my_private_archived_threads**](docs/DefaultApi.md#list_my_private_archived_threads) | **GET** /channels/{channel_id}/users/@me/threads/archived/private |
+*DefaultApi* | [**list_pins**](docs/DefaultApi.md#list_pins) | **GET** /channels/{channel_id}/messages/pins |
+*DefaultApi* | [**list_private_archived_threads**](docs/DefaultApi.md#list_private_archived_threads) | **GET** /channels/{channel_id}/threads/archived/private |
+*DefaultApi* | [**list_public_archived_threads**](docs/DefaultApi.md#list_public_archived_threads) | **GET** /channels/{channel_id}/threads/archived/public |
+*DefaultApi* | [**list_sticker_packs**](docs/DefaultApi.md#list_sticker_packs) | **GET** /sticker-packs |
+*DefaultApi* | [**list_thread_members**](docs/DefaultApi.md#list_thread_members) | **GET** /channels/{channel_id}/thread-members |
+*DefaultApi* | [**list_voice_regions**](docs/DefaultApi.md#list_voice_regions) | **GET** /voice/regions |
+*DefaultApi* | [**partner_sdk_token**](docs/DefaultApi.md#partner_sdk_token) | **POST** /partner-sdk/token |
+*DefaultApi* | [**partner_sdk_unmerge_provisional_account**](docs/DefaultApi.md#partner_sdk_unmerge_provisional_account) | **POST** /partner-sdk/provisional-accounts/unmerge |
+*DefaultApi* | [**poll_expire**](docs/DefaultApi.md#poll_expire) | **POST** /channels/{channel_id}/polls/{message_id}/expire |
+*DefaultApi* | [**preview_prune_guild**](docs/DefaultApi.md#preview_prune_guild) | **GET** /guilds/{guild_id}/prune |
+*DefaultApi* | [**prune_guild**](docs/DefaultApi.md#prune_guild) | **POST** /guilds/{guild_id}/prune |
+*DefaultApi* | [**put_guilds_onboarding**](docs/DefaultApi.md#put_guilds_onboarding) | **PUT** /guilds/{guild_id}/onboarding |
+*DefaultApi* | [**search_guild_members**](docs/DefaultApi.md#search_guild_members) | **GET** /guilds/{guild_id}/members/search |
+*DefaultApi* | [**send_soundboard_sound**](docs/DefaultApi.md#send_soundboard_sound) | **POST** /channels/{channel_id}/send-soundboard-sound |
+*DefaultApi* | [**set_channel_permission_overwrite**](docs/DefaultApi.md#set_channel_permission_overwrite) | **PUT** /channels/{channel_id}/permissions/{overwrite_id} |
+*DefaultApi* | [**set_guild_application_command_permissions**](docs/DefaultApi.md#set_guild_application_command_permissions) | **PUT** /applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions |
+*DefaultApi* | [**set_guild_mfa_level**](docs/DefaultApi.md#set_guild_mfa_level) | **POST** /guilds/{guild_id}/mfa |
+*DefaultApi* | [**sync_guild_template**](docs/DefaultApi.md#sync_guild_template) | **PUT** /guilds/{guild_id}/templates/{code} |
+*DefaultApi* | [**thread_search**](docs/DefaultApi.md#thread_search) | **GET** /channels/{channel_id}/threads/search |
+*DefaultApi* | [**trigger_typing_indicator**](docs/DefaultApi.md#trigger_typing_indicator) | **POST** /channels/{channel_id}/typing |
+*DefaultApi* | [**unban_user_from_guild**](docs/DefaultApi.md#unban_user_from_guild) | **DELETE** /guilds/{guild_id}/bans/{user_id} |
+*DefaultApi* | [**update_application**](docs/DefaultApi.md#update_application) | **PATCH** /applications/{application_id} |
+*DefaultApi* | [**update_application_command**](docs/DefaultApi.md#update_application_command) | **PATCH** /applications/{application_id}/commands/{command_id} |
+*DefaultApi* | [**update_application_emoji**](docs/DefaultApi.md#update_application_emoji) | **PATCH** /applications/{application_id}/emojis/{emoji_id} |
+*DefaultApi* | [**update_application_role_connections_metadata**](docs/DefaultApi.md#update_application_role_connections_metadata) | **PUT** /applications/{application_id}/role-connections/metadata |
+*DefaultApi* | [**update_application_user_role_connection**](docs/DefaultApi.md#update_application_user_role_connection) | **PUT** /users/@me/applications/{application_id}/role-connection |
+*DefaultApi* | [**update_auto_moderation_rule**](docs/DefaultApi.md#update_auto_moderation_rule) | **PATCH** /guilds/{guild_id}/auto-moderation/rules/{rule_id} |
+*DefaultApi* | [**update_channel**](docs/DefaultApi.md#update_channel) | **PATCH** /channels/{channel_id} |
+*DefaultApi* | [**update_guild**](docs/DefaultApi.md#update_guild) | **PATCH** /guilds/{guild_id} |
+*DefaultApi* | [**update_guild_application_command**](docs/DefaultApi.md#update_guild_application_command) | **PATCH** /applications/{application_id}/guilds/{guild_id}/commands/{command_id} |
+*DefaultApi* | [**update_guild_emoji**](docs/DefaultApi.md#update_guild_emoji) | **PATCH** /guilds/{guild_id}/emojis/{emoji_id} |
+*DefaultApi* | [**update_guild_member**](docs/DefaultApi.md#update_guild_member) | **PATCH** /guilds/{guild_id}/members/{user_id} |
+*DefaultApi* | [**update_guild_role**](docs/DefaultApi.md#update_guild_role) | **PATCH** /guilds/{guild_id}/roles/{role_id} |
+*DefaultApi* | [**update_guild_scheduled_event**](docs/DefaultApi.md#update_guild_scheduled_event) | **PATCH** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} |
+*DefaultApi* | [**update_guild_soundboard_sound**](docs/DefaultApi.md#update_guild_soundboard_sound) | **PATCH** /guilds/{guild_id}/soundboard-sounds/{sound_id} |
+*DefaultApi* | [**update_guild_sticker**](docs/DefaultApi.md#update_guild_sticker) | **PATCH** /guilds/{guild_id}/stickers/{sticker_id} |
+*DefaultApi* | [**update_guild_template**](docs/DefaultApi.md#update_guild_template) | **PATCH** /guilds/{guild_id}/templates/{code} |
+*DefaultApi* | [**update_guild_welcome_screen**](docs/DefaultApi.md#update_guild_welcome_screen) | **PATCH** /guilds/{guild_id}/welcome-screen |
+*DefaultApi* | [**update_guild_widget_settings**](docs/DefaultApi.md#update_guild_widget_settings) | **PATCH** /guilds/{guild_id}/widget |
+*DefaultApi* | [**update_message**](docs/DefaultApi.md#update_message) | **PATCH** /channels/{channel_id}/messages/{message_id} |
+*DefaultApi* | [**update_my_application**](docs/DefaultApi.md#update_my_application) | **PATCH** /applications/@me |
+*DefaultApi* | [**update_my_guild_member**](docs/DefaultApi.md#update_my_guild_member) | **PATCH** /guilds/{guild_id}/members/@me |
+*DefaultApi* | [**update_my_user**](docs/DefaultApi.md#update_my_user) | **PATCH** /users/@me |
+*DefaultApi* | [**update_original_webhook_message**](docs/DefaultApi.md#update_original_webhook_message) | **PATCH** /webhooks/{webhook_id}/{webhook_token}/messages/@original |
+*DefaultApi* | [**update_self_voice_state**](docs/DefaultApi.md#update_self_voice_state) | **PATCH** /guilds/{guild_id}/voice-states/@me |
+*DefaultApi* | [**update_stage_instance**](docs/DefaultApi.md#update_stage_instance) | **PATCH** /stage-instances/{channel_id} |
+*DefaultApi* | [**update_voice_state**](docs/DefaultApi.md#update_voice_state) | **PATCH** /guilds/{guild_id}/voice-states/{user_id} |
+*DefaultApi* | [**update_webhook**](docs/DefaultApi.md#update_webhook) | **PATCH** /webhooks/{webhook_id} |
+*DefaultApi* | [**update_webhook_by_token**](docs/DefaultApi.md#update_webhook_by_token) | **PATCH** /webhooks/{webhook_id}/{webhook_token} |
+*DefaultApi* | [**update_webhook_message**](docs/DefaultApi.md#update_webhook_message) | **PATCH** /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} |
+*DefaultApi* | [**upload_application_attachment**](docs/DefaultApi.md#upload_application_attachment) | **POST** /applications/{application_id}/attachment |
+
+
+## Documentation For Models
+
+ - [AccountResponse](docs/AccountResponse.md)
+ - [ActionRowComponentForMessageRequest](docs/ActionRowComponentForMessageRequest.md)
+ - [ActionRowComponentForMessageRequestComponentsInner](docs/ActionRowComponentForMessageRequestComponentsInner.md)
+ - [ActionRowComponentForModalRequest](docs/ActionRowComponentForModalRequest.md)
+ - [ActionRowComponentResponse](docs/ActionRowComponentResponse.md)
+ - [ActionRowComponentResponseComponentsInner](docs/ActionRowComponentResponseComponentsInner.md)
+ - [ActivitiesAttachmentResponse](docs/ActivitiesAttachmentResponse.md)
+ - [AddGroupDmUser201Response](docs/AddGroupDmUser201Response.md)
+ - [AddGroupDmUserRequest](docs/AddGroupDmUserRequest.md)
+ - [AddGuildMemberRequest](docs/AddGuildMemberRequest.md)
+ - [AddLobbyMemberRequest](docs/AddLobbyMemberRequest.md)
+ - [ApplicationCommandAttachmentOption](docs/ApplicationCommandAttachmentOption.md)
+ - [ApplicationCommandAttachmentOptionResponse](docs/ApplicationCommandAttachmentOptionResponse.md)
+ - [ApplicationCommandAutocompleteCallbackRequest](docs/ApplicationCommandAutocompleteCallbackRequest.md)
+ - [ApplicationCommandAutocompleteCallbackRequestData](docs/ApplicationCommandAutocompleteCallbackRequestData.md)
+ - [ApplicationCommandBooleanOption](docs/ApplicationCommandBooleanOption.md)
+ - [ApplicationCommandBooleanOptionResponse](docs/ApplicationCommandBooleanOptionResponse.md)
+ - [ApplicationCommandChannelOption](docs/ApplicationCommandChannelOption.md)
+ - [ApplicationCommandChannelOptionResponse](docs/ApplicationCommandChannelOptionResponse.md)
+ - [ApplicationCommandCreateRequest](docs/ApplicationCommandCreateRequest.md)
+ - [ApplicationCommandCreateRequestOptionsInner](docs/ApplicationCommandCreateRequestOptionsInner.md)
+ - [ApplicationCommandIntegerOption](docs/ApplicationCommandIntegerOption.md)
+ - [ApplicationCommandIntegerOptionResponse](docs/ApplicationCommandIntegerOptionResponse.md)
+ - [ApplicationCommandInteractionMetadataResponse](docs/ApplicationCommandInteractionMetadataResponse.md)
+ - [ApplicationCommandMentionableOption](docs/ApplicationCommandMentionableOption.md)
+ - [ApplicationCommandMentionableOptionResponse](docs/ApplicationCommandMentionableOptionResponse.md)
+ - [ApplicationCommandNumberOption](docs/ApplicationCommandNumberOption.md)
+ - [ApplicationCommandNumberOptionResponse](docs/ApplicationCommandNumberOptionResponse.md)
+ - [ApplicationCommandOptionIntegerChoice](docs/ApplicationCommandOptionIntegerChoice.md)
+ - [ApplicationCommandOptionIntegerChoiceResponse](docs/ApplicationCommandOptionIntegerChoiceResponse.md)
+ - [ApplicationCommandOptionNumberChoice](docs/ApplicationCommandOptionNumberChoice.md)
+ - [ApplicationCommandOptionNumberChoiceResponse](docs/ApplicationCommandOptionNumberChoiceResponse.md)
+ - [ApplicationCommandOptionStringChoice](docs/ApplicationCommandOptionStringChoice.md)
+ - [ApplicationCommandOptionStringChoiceResponse](docs/ApplicationCommandOptionStringChoiceResponse.md)
+ - [ApplicationCommandPatchRequestPartial](docs/ApplicationCommandPatchRequestPartial.md)
+ - [ApplicationCommandPermission](docs/ApplicationCommandPermission.md)
+ - [ApplicationCommandResponse](docs/ApplicationCommandResponse.md)
+ - [ApplicationCommandResponseOptionsInner](docs/ApplicationCommandResponseOptionsInner.md)
+ - [ApplicationCommandRoleOption](docs/ApplicationCommandRoleOption.md)
+ - [ApplicationCommandRoleOptionResponse](docs/ApplicationCommandRoleOptionResponse.md)
+ - [ApplicationCommandStringOption](docs/ApplicationCommandStringOption.md)
+ - [ApplicationCommandStringOptionResponse](docs/ApplicationCommandStringOptionResponse.md)
+ - [ApplicationCommandSubcommandGroupOption](docs/ApplicationCommandSubcommandGroupOption.md)
+ - [ApplicationCommandSubcommandGroupOptionResponse](docs/ApplicationCommandSubcommandGroupOptionResponse.md)
+ - [ApplicationCommandSubcommandOption](docs/ApplicationCommandSubcommandOption.md)
+ - [ApplicationCommandSubcommandOptionOptionsInner](docs/ApplicationCommandSubcommandOptionOptionsInner.md)
+ - [ApplicationCommandSubcommandOptionResponse](docs/ApplicationCommandSubcommandOptionResponse.md)
+ - [ApplicationCommandSubcommandOptionResponseOptionsInner](docs/ApplicationCommandSubcommandOptionResponseOptionsInner.md)
+ - [ApplicationCommandUpdateRequest](docs/ApplicationCommandUpdateRequest.md)
+ - [ApplicationCommandUserOption](docs/ApplicationCommandUserOption.md)
+ - [ApplicationCommandUserOptionResponse](docs/ApplicationCommandUserOptionResponse.md)
+ - [ApplicationFormPartial](docs/ApplicationFormPartial.md)
+ - [ApplicationFormPartialDescription](docs/ApplicationFormPartialDescription.md)
+ - [ApplicationFormPartialIntegrationTypesConfigValue](docs/ApplicationFormPartialIntegrationTypesConfigValue.md)
+ - [ApplicationIncomingWebhookResponse](docs/ApplicationIncomingWebhookResponse.md)
+ - [ApplicationIntegrationTypeConfiguration](docs/ApplicationIntegrationTypeConfiguration.md)
+ - [ApplicationIntegrationTypeConfigurationResponse](docs/ApplicationIntegrationTypeConfigurationResponse.md)
+ - [ApplicationOAuth2InstallParams](docs/ApplicationOAuth2InstallParams.md)
+ - [ApplicationOAuth2InstallParamsResponse](docs/ApplicationOAuth2InstallParamsResponse.md)
+ - [ApplicationResponse](docs/ApplicationResponse.md)
+ - [ApplicationRoleConnectionsMetadataItemRequest](docs/ApplicationRoleConnectionsMetadataItemRequest.md)
+ - [ApplicationRoleConnectionsMetadataItemResponse](docs/ApplicationRoleConnectionsMetadataItemResponse.md)
+ - [ApplicationUserRoleConnectionResponse](docs/ApplicationUserRoleConnectionResponse.md)
+ - [AttachmentResponse](docs/AttachmentResponse.md)
+ - [AuditLogEntryResponse](docs/AuditLogEntryResponse.md)
+ - [AuditLogObjectChangeResponse](docs/AuditLogObjectChangeResponse.md)
+ - [BanUserFromGuildRequest](docs/BanUserFromGuildRequest.md)
+ - [BaseCreateMessageCreateRequest](docs/BaseCreateMessageCreateRequest.md)
+ - [BaseCreateMessageCreateRequestComponentsInner](docs/BaseCreateMessageCreateRequestComponentsInner.md)
+ - [BasicApplicationResponse](docs/BasicApplicationResponse.md)
+ - [BasicMessageResponse](docs/BasicMessageResponse.md)
+ - [BasicMessageResponseComponentsInner](docs/BasicMessageResponseComponentsInner.md)
+ - [BasicMessageResponseInteractionMetadata](docs/BasicMessageResponseInteractionMetadata.md)
+ - [BasicMessageResponseNonce](docs/BasicMessageResponseNonce.md)
+ - [BlockMessageAction](docs/BlockMessageAction.md)
+ - [BlockMessageActionMetadata](docs/BlockMessageActionMetadata.md)
+ - [BlockMessageActionMetadataResponse](docs/BlockMessageActionMetadataResponse.md)
+ - [BlockMessageActionResponse](docs/BlockMessageActionResponse.md)
+ - [BotAccountPatchRequest](docs/BotAccountPatchRequest.md)
+ - [BulkBanUsersFromGuildRequest](docs/BulkBanUsersFromGuildRequest.md)
+ - [BulkBanUsersResponse](docs/BulkBanUsersResponse.md)
+ - [BulkDeleteMessagesRequest](docs/BulkDeleteMessagesRequest.md)
+ - [BulkLobbyMemberRequest](docs/BulkLobbyMemberRequest.md)
+ - [BulkUpdateGuildChannelsRequestInner](docs/BulkUpdateGuildChannelsRequestInner.md)
+ - [BulkUpdateGuildRolesRequestInner](docs/BulkUpdateGuildRolesRequestInner.md)
+ - [ButtonComponentForMessageRequest](docs/ButtonComponentForMessageRequest.md)
+ - [ButtonComponentResponse](docs/ButtonComponentResponse.md)
+ - [ChannelFollowerResponse](docs/ChannelFollowerResponse.md)
+ - [ChannelFollowerWebhookResponse](docs/ChannelFollowerWebhookResponse.md)
+ - [ChannelPermissionOverwriteRequest](docs/ChannelPermissionOverwriteRequest.md)
+ - [ChannelPermissionOverwriteResponse](docs/ChannelPermissionOverwriteResponse.md)
+ - [ChannelSelectComponentForMessageRequest](docs/ChannelSelectComponentForMessageRequest.md)
+ - [ChannelSelectComponentResponse](docs/ChannelSelectComponentResponse.md)
+ - [ChannelSelectDefaultValue](docs/ChannelSelectDefaultValue.md)
+ - [ChannelSelectDefaultValueResponse](docs/ChannelSelectDefaultValueResponse.md)
+ - [CommandPermissionResponse](docs/CommandPermissionResponse.md)
+ - [CommandPermissionsResponse](docs/CommandPermissionsResponse.md)
+ - [ComponentEmojiForMessageRequest](docs/ComponentEmojiForMessageRequest.md)
+ - [ComponentEmojiResponse](docs/ComponentEmojiResponse.md)
+ - [ConnectedAccountGuildResponse](docs/ConnectedAccountGuildResponse.md)
+ - [ConnectedAccountIntegrationResponse](docs/ConnectedAccountIntegrationResponse.md)
+ - [ConnectedAccountResponse](docs/ConnectedAccountResponse.md)
+ - [ContainerComponentForMessageRequest](docs/ContainerComponentForMessageRequest.md)
+ - [ContainerComponentForMessageRequestComponentsInner](docs/ContainerComponentForMessageRequestComponentsInner.md)
+ - [ContainerComponentResponse](docs/ContainerComponentResponse.md)
+ - [ContainerComponentResponseComponentsInner](docs/ContainerComponentResponseComponentsInner.md)
+ - [CreateApplicationEmojiRequest](docs/CreateApplicationEmojiRequest.md)
+ - [CreateAutoModerationRule200Response](docs/CreateAutoModerationRule200Response.md)
+ - [CreateAutoModerationRuleRequest](docs/CreateAutoModerationRuleRequest.md)
+ - [CreateChannelInviteRequest](docs/CreateChannelInviteRequest.md)
+ - [CreateEntitlementRequestData](docs/CreateEntitlementRequestData.md)
+ - [CreateForumThreadRequest](docs/CreateForumThreadRequest.md)
+ - [CreateGroupDMInviteRequest](docs/CreateGroupDMInviteRequest.md)
+ - [CreateGuildChannelRequest](docs/CreateGuildChannelRequest.md)
+ - [CreateGuildEmojiRequest](docs/CreateGuildEmojiRequest.md)
+ - [CreateGuildFromTemplateRequest](docs/CreateGuildFromTemplateRequest.md)
+ - [CreateGuildInviteRequest](docs/CreateGuildInviteRequest.md)
+ - [CreateGuildRequestChannelItem](docs/CreateGuildRequestChannelItem.md)
+ - [CreateGuildRequestRoleItem](docs/CreateGuildRequestRoleItem.md)
+ - [CreateGuildRoleRequest](docs/CreateGuildRoleRequest.md)
+ - [CreateGuildScheduledEventRequest](docs/CreateGuildScheduledEventRequest.md)
+ - [CreateGuildTemplateRequest](docs/CreateGuildTemplateRequest.md)
+ - [CreateInteractionResponseRequest](docs/CreateInteractionResponseRequest.md)
+ - [CreateLobbyRequest](docs/CreateLobbyRequest.md)
+ - [CreateMessageInteractionCallbackRequest](docs/CreateMessageInteractionCallbackRequest.md)
+ - [CreateMessageInteractionCallbackResponse](docs/CreateMessageInteractionCallbackResponse.md)
+ - [CreateOrJoinLobbyRequest](docs/CreateOrJoinLobbyRequest.md)
+ - [CreateOrUpdateThreadTagRequest](docs/CreateOrUpdateThreadTagRequest.md)
+ - [CreatePrivateChannelRequest](docs/CreatePrivateChannelRequest.md)
+ - [CreateStageInstanceRequest](docs/CreateStageInstanceRequest.md)
+ - [CreateTextThreadWithMessageRequest](docs/CreateTextThreadWithMessageRequest.md)
+ - [CreateTextThreadWithoutMessageRequest](docs/CreateTextThreadWithoutMessageRequest.md)
+ - [CreateThreadRequest](docs/CreateThreadRequest.md)
+ - [CreateWebhookRequest](docs/CreateWebhookRequest.md)
+ - [CreatedThreadResponse](docs/CreatedThreadResponse.md)
+ - [DefaultKeywordListTriggerMetadata](docs/DefaultKeywordListTriggerMetadata.md)
+ - [DefaultKeywordListTriggerMetadataResponse](docs/DefaultKeywordListTriggerMetadataResponse.md)
+ - [DefaultKeywordListUpsertRequest](docs/DefaultKeywordListUpsertRequest.md)
+ - [DefaultKeywordListUpsertRequestActionsInner](docs/DefaultKeywordListUpsertRequestActionsInner.md)
+ - [DefaultKeywordListUpsertRequestPartial](docs/DefaultKeywordListUpsertRequestPartial.md)
+ - [DefaultKeywordRuleResponse](docs/DefaultKeywordRuleResponse.md)
+ - [DefaultKeywordRuleResponseActionsInner](docs/DefaultKeywordRuleResponseActionsInner.md)
+ - [DefaultReactionEmojiResponse](docs/DefaultReactionEmojiResponse.md)
+ - [DiscordIntegrationResponse](docs/DiscordIntegrationResponse.md)
+ - [EditLobbyChannelLinkRequest](docs/EditLobbyChannelLinkRequest.md)
+ - [EmbeddedActivityInstance](docs/EmbeddedActivityInstance.md)
+ - [EmbeddedActivityInstanceLocation](docs/EmbeddedActivityInstanceLocation.md)
+ - [EmojiResponse](docs/EmojiResponse.md)
+ - [EntitlementResponse](docs/EntitlementResponse.md)
+ - [EntityMetadataExternal](docs/EntityMetadataExternal.md)
+ - [EntityMetadataExternalResponse](docs/EntityMetadataExternalResponse.md)
+ - [Error](docs/Error.md)
+ - [ErrorDetails](docs/ErrorDetails.md)
+ - [ErrorResponse](docs/ErrorResponse.md)
+ - [ExecuteWebhookRequest](docs/ExecuteWebhookRequest.md)
+ - [ExternalConnectionIntegrationResponse](docs/ExternalConnectionIntegrationResponse.md)
+ - [ExternalScheduledEventCreateRequest](docs/ExternalScheduledEventCreateRequest.md)
+ - [ExternalScheduledEventPatchRequestPartial](docs/ExternalScheduledEventPatchRequestPartial.md)
+ - [ExternalScheduledEventResponse](docs/ExternalScheduledEventResponse.md)
+ - [FileComponentForMessageRequest](docs/FileComponentForMessageRequest.md)
+ - [FileComponentResponse](docs/FileComponentResponse.md)
+ - [FlagToChannelAction](docs/FlagToChannelAction.md)
+ - [FlagToChannelActionMetadata](docs/FlagToChannelActionMetadata.md)
+ - [FlagToChannelActionMetadataResponse](docs/FlagToChannelActionMetadataResponse.md)
+ - [FlagToChannelActionResponse](docs/FlagToChannelActionResponse.md)
+ - [FollowChannelRequest](docs/FollowChannelRequest.md)
+ - [ForumTagResponse](docs/ForumTagResponse.md)
+ - [FriendInviteResponse](docs/FriendInviteResponse.md)
+ - [GatewayBotResponse](docs/GatewayBotResponse.md)
+ - [GatewayBotSessionStartLimitResponse](docs/GatewayBotSessionStartLimitResponse.md)
+ - [GatewayResponse](docs/GatewayResponse.md)
+ - [GetChannel200Response](docs/GetChannel200Response.md)
+ - [GetEntitlementsSkuIdsParameter](docs/GetEntitlementsSkuIdsParameter.md)
+ - [GetSticker200Response](docs/GetSticker200Response.md)
+ - [GithubAuthor](docs/GithubAuthor.md)
+ - [GithubCheckApp](docs/GithubCheckApp.md)
+ - [GithubCheckPullRequest](docs/GithubCheckPullRequest.md)
+ - [GithubCheckRun](docs/GithubCheckRun.md)
+ - [GithubCheckRunOutput](docs/GithubCheckRunOutput.md)
+ - [GithubCheckSuite](docs/GithubCheckSuite.md)
+ - [GithubComment](docs/GithubComment.md)
+ - [GithubCommit](docs/GithubCommit.md)
+ - [GithubDiscussion](docs/GithubDiscussion.md)
+ - [GithubIssue](docs/GithubIssue.md)
+ - [GithubRelease](docs/GithubRelease.md)
+ - [GithubRepository](docs/GithubRepository.md)
+ - [GithubReview](docs/GithubReview.md)
+ - [GithubUser](docs/GithubUser.md)
+ - [GithubWebhook](docs/GithubWebhook.md)
+ - [GroupDMInviteResponse](docs/GroupDMInviteResponse.md)
+ - [GuildAuditLogResponse](docs/GuildAuditLogResponse.md)
+ - [GuildAuditLogResponseIntegrationsInner](docs/GuildAuditLogResponseIntegrationsInner.md)
+ - [GuildBanResponse](docs/GuildBanResponse.md)
+ - [GuildChannelLocation](docs/GuildChannelLocation.md)
+ - [GuildChannelResponse](docs/GuildChannelResponse.md)
+ - [GuildCreateRequest](docs/GuildCreateRequest.md)
+ - [GuildHomeSettingsResponse](docs/GuildHomeSettingsResponse.md)
+ - [GuildIncomingWebhookResponse](docs/GuildIncomingWebhookResponse.md)
+ - [GuildInviteResponse](docs/GuildInviteResponse.md)
+ - [GuildMFALevelResponse](docs/GuildMFALevelResponse.md)
+ - [GuildMemberResponse](docs/GuildMemberResponse.md)
+ - [GuildOnboardingResponse](docs/GuildOnboardingResponse.md)
+ - [GuildPatchRequestPartial](docs/GuildPatchRequestPartial.md)
+ - [GuildPreviewResponse](docs/GuildPreviewResponse.md)
+ - [GuildProductPurchaseResponse](docs/GuildProductPurchaseResponse.md)
+ - [GuildPruneResponse](docs/GuildPruneResponse.md)
+ - [GuildResponse](docs/GuildResponse.md)
+ - [GuildRoleResponse](docs/GuildRoleResponse.md)
+ - [GuildRoleTagsResponse](docs/GuildRoleTagsResponse.md)
+ - [GuildStickerResponse](docs/GuildStickerResponse.md)
+ - [GuildSubscriptionIntegrationResponse](docs/GuildSubscriptionIntegrationResponse.md)
+ - [GuildTemplateChannelResponse](docs/GuildTemplateChannelResponse.md)
+ - [GuildTemplateChannelTags](docs/GuildTemplateChannelTags.md)
+ - [GuildTemplateResponse](docs/GuildTemplateResponse.md)
+ - [GuildTemplateRoleResponse](docs/GuildTemplateRoleResponse.md)
+ - [GuildTemplateSnapshotResponse](docs/GuildTemplateSnapshotResponse.md)
+ - [GuildWelcomeChannel](docs/GuildWelcomeChannel.md)
+ - [GuildWelcomeScreenChannelResponse](docs/GuildWelcomeScreenChannelResponse.md)
+ - [GuildWelcomeScreenResponse](docs/GuildWelcomeScreenResponse.md)
+ - [GuildWithCountsResponse](docs/GuildWithCountsResponse.md)
+ - [IncomingWebhookInteractionRequest](docs/IncomingWebhookInteractionRequest.md)
+ - [IncomingWebhookRequestPartial](docs/IncomingWebhookRequestPartial.md)
+ - [IncomingWebhookUpdateForInteractionCallbackRequestPartial](docs/IncomingWebhookUpdateForInteractionCallbackRequestPartial.md)
+ - [IncomingWebhookUpdateRequestPartial](docs/IncomingWebhookUpdateRequestPartial.md)
+ - [InnerErrors](docs/InnerErrors.md)
+ - [IntegrationApplicationResponse](docs/IntegrationApplicationResponse.md)
+ - [InteractionApplicationCommandAutocompleteCallbackIntegerData](docs/InteractionApplicationCommandAutocompleteCallbackIntegerData.md)
+ - [InteractionApplicationCommandAutocompleteCallbackNumberData](docs/InteractionApplicationCommandAutocompleteCallbackNumberData.md)
+ - [InteractionApplicationCommandAutocompleteCallbackStringData](docs/InteractionApplicationCommandAutocompleteCallbackStringData.md)
+ - [InteractionCallbackResponse](docs/InteractionCallbackResponse.md)
+ - [InteractionCallbackResponseResource](docs/InteractionCallbackResponseResource.md)
+ - [InteractionResponse](docs/InteractionResponse.md)
+ - [InviteApplicationResponse](docs/InviteApplicationResponse.md)
+ - [InviteChannelRecipientResponse](docs/InviteChannelRecipientResponse.md)
+ - [InviteChannelResponse](docs/InviteChannelResponse.md)
+ - [InviteGuildResponse](docs/InviteGuildResponse.md)
+ - [KeywordRuleResponse](docs/KeywordRuleResponse.md)
+ - [KeywordTriggerMetadata](docs/KeywordTriggerMetadata.md)
+ - [KeywordTriggerMetadataResponse](docs/KeywordTriggerMetadataResponse.md)
+ - [KeywordUpsertRequest](docs/KeywordUpsertRequest.md)
+ - [KeywordUpsertRequestPartial](docs/KeywordUpsertRequestPartial.md)
+ - [LaunchActivityInteractionCallbackRequest](docs/LaunchActivityInteractionCallbackRequest.md)
+ - [LaunchActivityInteractionCallbackResponse](docs/LaunchActivityInteractionCallbackResponse.md)
+ - [ListApplicationEmojisResponse](docs/ListApplicationEmojisResponse.md)
+ - [ListAutoModerationRules200ResponseInner](docs/ListAutoModerationRules200ResponseInner.md)
+ - [ListChannelInvites200ResponseInner](docs/ListChannelInvites200ResponseInner.md)
+ - [ListChannelWebhooks200ResponseInner](docs/ListChannelWebhooks200ResponseInner.md)
+ - [ListGuildIntegrations200ResponseInner](docs/ListGuildIntegrations200ResponseInner.md)
+ - [ListGuildScheduledEvents200ResponseInner](docs/ListGuildScheduledEvents200ResponseInner.md)
+ - [ListGuildSoundboardSoundsResponse](docs/ListGuildSoundboardSoundsResponse.md)
+ - [LobbyMemberRequest](docs/LobbyMemberRequest.md)
+ - [LobbyMemberResponse](docs/LobbyMemberResponse.md)
+ - [LobbyMessageResponse](docs/LobbyMessageResponse.md)
+ - [LobbyResponse](docs/LobbyResponse.md)
+ - [MLSpamRuleResponse](docs/MLSpamRuleResponse.md)
+ - [MLSpamUpsertRequest](docs/MLSpamUpsertRequest.md)
+ - [MLSpamUpsertRequestPartial](docs/MLSpamUpsertRequestPartial.md)
+ - [MediaGalleryComponentForMessageRequest](docs/MediaGalleryComponentForMessageRequest.md)
+ - [MediaGalleryComponentResponse](docs/MediaGalleryComponentResponse.md)
+ - [MediaGalleryItemRequest](docs/MediaGalleryItemRequest.md)
+ - [MediaGalleryItemResponse](docs/MediaGalleryItemResponse.md)
+ - [MentionSpamRuleResponse](docs/MentionSpamRuleResponse.md)
+ - [MentionSpamTriggerMetadata](docs/MentionSpamTriggerMetadata.md)
+ - [MentionSpamTriggerMetadataResponse](docs/MentionSpamTriggerMetadataResponse.md)
+ - [MentionSpamUpsertRequest](docs/MentionSpamUpsertRequest.md)
+ - [MentionSpamUpsertRequestPartial](docs/MentionSpamUpsertRequestPartial.md)
+ - [MentionableSelectComponentForMessageRequest](docs/MentionableSelectComponentForMessageRequest.md)
+ - [MentionableSelectComponentForMessageRequestDefaultValuesInner](docs/MentionableSelectComponentForMessageRequestDefaultValuesInner.md)
+ - [MentionableSelectComponentResponse](docs/MentionableSelectComponentResponse.md)
+ - [MentionableSelectComponentResponseDefaultValuesInner](docs/MentionableSelectComponentResponseDefaultValuesInner.md)
+ - [MessageAllowedMentionsRequest](docs/MessageAllowedMentionsRequest.md)
+ - [MessageAttachmentRequest](docs/MessageAttachmentRequest.md)
+ - [MessageAttachmentResponse](docs/MessageAttachmentResponse.md)
+ - [MessageCallResponse](docs/MessageCallResponse.md)
+ - [MessageComponentInteractionMetadataResponse](docs/MessageComponentInteractionMetadataResponse.md)
+ - [MessageCreateRequest](docs/MessageCreateRequest.md)
+ - [MessageEditRequestPartial](docs/MessageEditRequestPartial.md)
+ - [MessageEmbedAuthorResponse](docs/MessageEmbedAuthorResponse.md)
+ - [MessageEmbedFieldResponse](docs/MessageEmbedFieldResponse.md)
+ - [MessageEmbedFooterResponse](docs/MessageEmbedFooterResponse.md)
+ - [MessageEmbedImageResponse](docs/MessageEmbedImageResponse.md)
+ - [MessageEmbedProviderResponse](docs/MessageEmbedProviderResponse.md)
+ - [MessageEmbedResponse](docs/MessageEmbedResponse.md)
+ - [MessageEmbedVideoResponse](docs/MessageEmbedVideoResponse.md)
+ - [MessageInteractionResponse](docs/MessageInteractionResponse.md)
+ - [MessageMentionChannelResponse](docs/MessageMentionChannelResponse.md)
+ - [MessageReactionCountDetailsResponse](docs/MessageReactionCountDetailsResponse.md)
+ - [MessageReactionEmojiResponse](docs/MessageReactionEmojiResponse.md)
+ - [MessageReactionResponse](docs/MessageReactionResponse.md)
+ - [MessageReferenceRequest](docs/MessageReferenceRequest.md)
+ - [MessageReferenceResponse](docs/MessageReferenceResponse.md)
+ - [MessageResponse](docs/MessageResponse.md)
+ - [MessageRoleSubscriptionDataResponse](docs/MessageRoleSubscriptionDataResponse.md)
+ - [MessageSnapshotResponse](docs/MessageSnapshotResponse.md)
+ - [MessageStickerItemResponse](docs/MessageStickerItemResponse.md)
+ - [MinimalContentMessageResponse](docs/MinimalContentMessageResponse.md)
+ - [ModalInteractionCallbackRequest](docs/ModalInteractionCallbackRequest.md)
+ - [ModalInteractionCallbackRequestData](docs/ModalInteractionCallbackRequestData.md)
+ - [ModalSubmitInteractionMetadataResponse](docs/ModalSubmitInteractionMetadataResponse.md)
+ - [ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata](docs/ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.md)
+ - [MyGuildResponse](docs/MyGuildResponse.md)
+ - [NewMemberActionResponse](docs/NewMemberActionResponse.md)
+ - [OAuth2GetAuthorizationResponse](docs/OAuth2GetAuthorizationResponse.md)
+ - [OAuth2GetKeys](docs/OAuth2GetKeys.md)
+ - [OAuth2GetOpenIDConnectUserInfoResponse](docs/OAuth2GetOpenIDConnectUserInfoResponse.md)
+ - [OAuth2Key](docs/OAuth2Key.md)
+ - [OnboardingPromptOptionRequest](docs/OnboardingPromptOptionRequest.md)
+ - [OnboardingPromptOptionResponse](docs/OnboardingPromptOptionResponse.md)
+ - [OnboardingPromptResponse](docs/OnboardingPromptResponse.md)
+ - [PartialDiscordIntegrationResponse](docs/PartialDiscordIntegrationResponse.md)
+ - [PartialExternalConnectionIntegrationResponse](docs/PartialExternalConnectionIntegrationResponse.md)
+ - [PartialGuildSubscriptionIntegrationResponse](docs/PartialGuildSubscriptionIntegrationResponse.md)
+ - [PartnerSdkUnmergeProvisionalAccountRequest](docs/PartnerSdkUnmergeProvisionalAccountRequest.md)
+ - [PinnedMessageResponse](docs/PinnedMessageResponse.md)
+ - [PinnedMessagesResponse](docs/PinnedMessagesResponse.md)
+ - [PollAnswerCreateRequest](docs/PollAnswerCreateRequest.md)
+ - [PollAnswerDetailsResponse](docs/PollAnswerDetailsResponse.md)
+ - [PollAnswerResponse](docs/PollAnswerResponse.md)
+ - [PollCreateRequest](docs/PollCreateRequest.md)
+ - [PollEmoji](docs/PollEmoji.md)
+ - [PollEmojiCreateRequest](docs/PollEmojiCreateRequest.md)
+ - [PollMedia](docs/PollMedia.md)
+ - [PollMediaCreateRequest](docs/PollMediaCreateRequest.md)
+ - [PollMediaResponse](docs/PollMediaResponse.md)
+ - [PollResponse](docs/PollResponse.md)
+ - [PollResultsEntryResponse](docs/PollResultsEntryResponse.md)
+ - [PollResultsResponse](docs/PollResultsResponse.md)
+ - [PongInteractionCallbackRequest](docs/PongInteractionCallbackRequest.md)
+ - [PrivateApplicationResponse](docs/PrivateApplicationResponse.md)
+ - [PrivateChannelLocation](docs/PrivateChannelLocation.md)
+ - [PrivateChannelResponse](docs/PrivateChannelResponse.md)
+ - [PrivateGroupChannelResponse](docs/PrivateGroupChannelResponse.md)
+ - [PrivateGuildMemberResponse](docs/PrivateGuildMemberResponse.md)
+ - [ProvisionalTokenResponse](docs/ProvisionalTokenResponse.md)
+ - [PruneGuildRequest](docs/PruneGuildRequest.md)
+ - [PruneGuildRequestIncludeRoles](docs/PruneGuildRequestIncludeRoles.md)
+ - [PurchaseNotificationResponse](docs/PurchaseNotificationResponse.md)
+ - [QuarantineUserAction](docs/QuarantineUserAction.md)
+ - [QuarantineUserActionResponse](docs/QuarantineUserActionResponse.md)
+ - [ResolvedObjectsResponse](docs/ResolvedObjectsResponse.md)
+ - [ResourceChannelResponse](docs/ResourceChannelResponse.md)
+ - [RichEmbed](docs/RichEmbed.md)
+ - [RichEmbedAuthor](docs/RichEmbedAuthor.md)
+ - [RichEmbedField](docs/RichEmbedField.md)
+ - [RichEmbedFooter](docs/RichEmbedFooter.md)
+ - [RichEmbedImage](docs/RichEmbedImage.md)
+ - [RichEmbedProvider](docs/RichEmbedProvider.md)
+ - [RichEmbedThumbnail](docs/RichEmbedThumbnail.md)
+ - [RichEmbedVideo](docs/RichEmbedVideo.md)
+ - [RoleSelectComponentForMessageRequest](docs/RoleSelectComponentForMessageRequest.md)
+ - [RoleSelectComponentResponse](docs/RoleSelectComponentResponse.md)
+ - [RoleSelectDefaultValue](docs/RoleSelectDefaultValue.md)
+ - [RoleSelectDefaultValueResponse](docs/RoleSelectDefaultValueResponse.md)
+ - [SDKMessageRequest](docs/SDKMessageRequest.md)
+ - [ScheduledEventResponse](docs/ScheduledEventResponse.md)
+ - [ScheduledEventUserResponse](docs/ScheduledEventUserResponse.md)
+ - [SectionComponentForMessageRequest](docs/SectionComponentForMessageRequest.md)
+ - [SectionComponentForMessageRequestAccessory](docs/SectionComponentForMessageRequestAccessory.md)
+ - [SectionComponentResponse](docs/SectionComponentResponse.md)
+ - [SectionComponentResponseAccessory](docs/SectionComponentResponseAccessory.md)
+ - [SeparatorComponentForMessageRequest](docs/SeparatorComponentForMessageRequest.md)
+ - [SeparatorComponentResponse](docs/SeparatorComponentResponse.md)
+ - [SetChannelPermissionOverwriteRequest](docs/SetChannelPermissionOverwriteRequest.md)
+ - [SetGuildApplicationCommandPermissionsRequest](docs/SetGuildApplicationCommandPermissionsRequest.md)
+ - [SetGuildMfaLevelRequest](docs/SetGuildMfaLevelRequest.md)
+ - [SettingsEmojiResponse](docs/SettingsEmojiResponse.md)
+ - [SlackWebhook](docs/SlackWebhook.md)
+ - [SoundboardCreateRequest](docs/SoundboardCreateRequest.md)
+ - [SoundboardPatchRequestPartial](docs/SoundboardPatchRequestPartial.md)
+ - [SoundboardSoundResponse](docs/SoundboardSoundResponse.md)
+ - [SoundboardSoundSendRequest](docs/SoundboardSoundSendRequest.md)
+ - [SpamLinkRuleResponse](docs/SpamLinkRuleResponse.md)
+ - [StageInstanceResponse](docs/StageInstanceResponse.md)
+ - [StageScheduledEventCreateRequest](docs/StageScheduledEventCreateRequest.md)
+ - [StageScheduledEventPatchRequestPartial](docs/StageScheduledEventPatchRequestPartial.md)
+ - [StageScheduledEventResponse](docs/StageScheduledEventResponse.md)
+ - [StandardStickerResponse](docs/StandardStickerResponse.md)
+ - [StickerPackCollectionResponse](docs/StickerPackCollectionResponse.md)
+ - [StickerPackResponse](docs/StickerPackResponse.md)
+ - [StringSelectComponentForMessageRequest](docs/StringSelectComponentForMessageRequest.md)
+ - [StringSelectComponentResponse](docs/StringSelectComponentResponse.md)
+ - [StringSelectOptionForMessageRequest](docs/StringSelectOptionForMessageRequest.md)
+ - [StringSelectOptionResponse](docs/StringSelectOptionResponse.md)
+ - [TeamMemberResponse](docs/TeamMemberResponse.md)
+ - [TeamResponse](docs/TeamResponse.md)
+ - [TextDisplayComponentForMessageRequest](docs/TextDisplayComponentForMessageRequest.md)
+ - [TextDisplayComponentResponse](docs/TextDisplayComponentResponse.md)
+ - [TextInputComponentForModalRequest](docs/TextInputComponentForModalRequest.md)
+ - [TextInputComponentResponse](docs/TextInputComponentResponse.md)
+ - [ThreadMemberResponse](docs/ThreadMemberResponse.md)
+ - [ThreadMetadataResponse](docs/ThreadMetadataResponse.md)
+ - [ThreadResponse](docs/ThreadResponse.md)
+ - [ThreadSearchResponse](docs/ThreadSearchResponse.md)
+ - [ThreadSearchTagParameter](docs/ThreadSearchTagParameter.md)
+ - [ThreadsResponse](docs/ThreadsResponse.md)
+ - [ThumbnailComponentForMessageRequest](docs/ThumbnailComponentForMessageRequest.md)
+ - [ThumbnailComponentResponse](docs/ThumbnailComponentResponse.md)
+ - [UnfurledMediaRequest](docs/UnfurledMediaRequest.md)
+ - [UnfurledMediaRequestWithAttachmentReferenceRequired](docs/UnfurledMediaRequestWithAttachmentReferenceRequired.md)
+ - [UnfurledMediaResponse](docs/UnfurledMediaResponse.md)
+ - [UpdateApplicationEmojiRequest](docs/UpdateApplicationEmojiRequest.md)
+ - [UpdateApplicationUserRoleConnectionRequest](docs/UpdateApplicationUserRoleConnectionRequest.md)
+ - [UpdateAutoModerationRuleRequest](docs/UpdateAutoModerationRuleRequest.md)
+ - [UpdateChannelRequest](docs/UpdateChannelRequest.md)
+ - [UpdateDMRequestPartial](docs/UpdateDMRequestPartial.md)
+ - [UpdateDefaultReactionEmojiRequest](docs/UpdateDefaultReactionEmojiRequest.md)
+ - [UpdateGroupDMRequestPartial](docs/UpdateGroupDMRequestPartial.md)
+ - [UpdateGuildChannelRequestPartial](docs/UpdateGuildChannelRequestPartial.md)
+ - [UpdateGuildEmojiRequest](docs/UpdateGuildEmojiRequest.md)
+ - [UpdateGuildMemberRequest](docs/UpdateGuildMemberRequest.md)
+ - [UpdateGuildOnboardingRequest](docs/UpdateGuildOnboardingRequest.md)
+ - [UpdateGuildScheduledEventRequest](docs/UpdateGuildScheduledEventRequest.md)
+ - [UpdateGuildStickerRequest](docs/UpdateGuildStickerRequest.md)
+ - [UpdateGuildTemplateRequest](docs/UpdateGuildTemplateRequest.md)
+ - [UpdateGuildWidgetSettingsRequest](docs/UpdateGuildWidgetSettingsRequest.md)
+ - [UpdateMessageInteractionCallbackRequest](docs/UpdateMessageInteractionCallbackRequest.md)
+ - [UpdateMessageInteractionCallbackResponse](docs/UpdateMessageInteractionCallbackResponse.md)
+ - [UpdateMyGuildMemberRequest](docs/UpdateMyGuildMemberRequest.md)
+ - [UpdateOnboardingPromptRequest](docs/UpdateOnboardingPromptRequest.md)
+ - [UpdateSelfVoiceStateRequest](docs/UpdateSelfVoiceStateRequest.md)
+ - [UpdateStageInstanceRequest](docs/UpdateStageInstanceRequest.md)
+ - [UpdateThreadRequestPartial](docs/UpdateThreadRequestPartial.md)
+ - [UpdateThreadTagRequest](docs/UpdateThreadTagRequest.md)
+ - [UpdateVoiceStateRequest](docs/UpdateVoiceStateRequest.md)
+ - [UpdateWebhookByTokenRequest](docs/UpdateWebhookByTokenRequest.md)
+ - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md)
+ - [UserAvatarDecorationResponse](docs/UserAvatarDecorationResponse.md)
+ - [UserCollectiblesResponse](docs/UserCollectiblesResponse.md)
+ - [UserCommunicationDisabledAction](docs/UserCommunicationDisabledAction.md)
+ - [UserCommunicationDisabledActionMetadata](docs/UserCommunicationDisabledActionMetadata.md)
+ - [UserCommunicationDisabledActionMetadataResponse](docs/UserCommunicationDisabledActionMetadataResponse.md)
+ - [UserCommunicationDisabledActionResponse](docs/UserCommunicationDisabledActionResponse.md)
+ - [UserGuildOnboardingResponse](docs/UserGuildOnboardingResponse.md)
+ - [UserNameplateResponse](docs/UserNameplateResponse.md)
+ - [UserPIIResponse](docs/UserPIIResponse.md)
+ - [UserPrimaryGuildResponse](docs/UserPrimaryGuildResponse.md)
+ - [UserResponse](docs/UserResponse.md)
+ - [UserSelectComponentForMessageRequest](docs/UserSelectComponentForMessageRequest.md)
+ - [UserSelectComponentResponse](docs/UserSelectComponentResponse.md)
+ - [UserSelectDefaultValue](docs/UserSelectDefaultValue.md)
+ - [UserSelectDefaultValueResponse](docs/UserSelectDefaultValueResponse.md)
+ - [VanityURLErrorResponse](docs/VanityURLErrorResponse.md)
+ - [VanityURLResponse](docs/VanityURLResponse.md)
+ - [VoiceRegionResponse](docs/VoiceRegionResponse.md)
+ - [VoiceScheduledEventCreateRequest](docs/VoiceScheduledEventCreateRequest.md)
+ - [VoiceScheduledEventPatchRequestPartial](docs/VoiceScheduledEventPatchRequestPartial.md)
+ - [VoiceScheduledEventResponse](docs/VoiceScheduledEventResponse.md)
+ - [VoiceStateResponse](docs/VoiceStateResponse.md)
+ - [WebhookSlackEmbed](docs/WebhookSlackEmbed.md)
+ - [WebhookSlackEmbedField](docs/WebhookSlackEmbedField.md)
+ - [WebhookSourceChannelResponse](docs/WebhookSourceChannelResponse.md)
+ - [WebhookSourceGuildResponse](docs/WebhookSourceGuildResponse.md)
+ - [WelcomeMessageResponse](docs/WelcomeMessageResponse.md)
+ - [WelcomeScreenPatchRequestPartial](docs/WelcomeScreenPatchRequestPartial.md)
+ - [WidgetActivity](docs/WidgetActivity.md)
+ - [WidgetChannel](docs/WidgetChannel.md)
+ - [WidgetMember](docs/WidgetMember.md)
+ - [WidgetResponse](docs/WidgetResponse.md)
+ - [WidgetSettingsResponse](docs/WidgetSettingsResponse.md)
+
+
+
+## Documentation For Authorization
+
+
+Authentication schemes defined for the API:
+
+### BotToken
+
+- **Type**: API key
+- **API key parameter name**: Authorization
+- **Location**: HTTP header
+
+
+### OAuth2
+
+- **Type**: OAuth
+- **Flow**: implicit
+- **Authorization URL**: https://discord.com/api/oauth2/authorize
+- **Scopes**:
+ - **activities.invites.write**: allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ - **activities.read**: allows your app to fetch data from a user's \"Now Playing/Recently Played\" list - requires Discord approval
+ - **activities.write**: allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ - **applications.builds.read**: allows your app to read build data for a user's applications
+ - **applications.builds.upload**: allows your app to upload/update builds for a user's applications - requires Discord approval
+ - **applications.commands**: allows your app to use commands in a guild
+ - **applications.commands.permissions.update**: allows your app to update permissions for its commands in a guild a user has permissions to
+ - **applications.entitlements**: allows your app to read entitlements for a user's applications
+ - **applications.store.update**: allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
+ - **bot**: for oauth2 bots, this puts the bot in the user's selected guild by default
+ - **connections**: allows /users/@me/connections to return linked third-party accounts
+ - **dm_channels.read**: allows your app to see information about the user's DMs and group DMs - requires Discord approval
+ - **email**: enables /users/@me to return an email
+ - **gdm.join**: allows your app to join users to a group dm
+ - **guilds**: allows /users/@me/guilds to return basic information about all of a user's guilds
+ - **guilds.join**: allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild
+ - **guilds.members.read**: allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
+ - **identify**: allows /users/@me without email
+ - **messages.read**: for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates)
+ - **openid**: for OpenID Connect, this allows your app to receive user id and basic profile information
+ - **relationships.read**: allows your app to know a user's friends and implicit relationships - requires Discord approval
+ - **rpc**: for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
+ - **rpc.activities.write**: for local rpc server access, this allows you to update a user's activity - requires Discord approval
+ - **rpc.notifications.read**: for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval
+ - **rpc.screenshare.read**: for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval
+ - **rpc.screenshare.write**: for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval
+ - **rpc.video.read**: for local rpc server access, this allows you to read a user's video status - requires Discord approval
+ - **rpc.video.write**: for local rpc server access, this allows you to update a user's video settings - requires Discord approval
+ - **rpc.voice.read**: for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval
+ - **rpc.voice.write**: for local rpc server access, this allows you to update a user's voice settings - requires Discord approval
+ - **voice**: allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval
+ - **webhook.incoming**: this generates a webhook that is returned in the oauth token response for authorization code grants
+
+
+### OAuth2
+
+- **Type**: OAuth
+- **Flow**: application
+- **Authorization URL**:
+- **Scopes**:
+ - **activities.invites.write**: allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ - **activities.read**: allows your app to fetch data from a user's \"Now Playing/Recently Played\" list - requires Discord approval
+ - **activities.write**: allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ - **applications.builds.read**: allows your app to read build data for a user's applications
+ - **applications.builds.upload**: allows your app to upload/update builds for a user's applications - requires Discord approval
+ - **applications.commands**: allows your app to use commands in a guild
+ - **applications.commands.permissions.update**: allows your app to update permissions for its commands in a guild a user has permissions to
+ - **applications.commands.update**: allows your app to update its commands using a Bearer token - client credentials grant only
+ - **applications.entitlements**: allows your app to read entitlements for a user's applications
+ - **applications.store.update**: allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
+ - **bot**: for oauth2 bots, this puts the bot in the user's selected guild by default
+ - **connections**: allows /users/@me/connections to return linked third-party accounts
+ - **dm_channels.read**: allows your app to see information about the user's DMs and group DMs - requires Discord approval
+ - **email**: enables /users/@me to return an email
+ - **gdm.join**: allows your app to join users to a group dm
+ - **guilds**: allows /users/@me/guilds to return basic information about all of a user's guilds
+ - **guilds.join**: allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild
+ - **guilds.members.read**: allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
+ - **identify**: allows /users/@me without email
+ - **messages.read**: for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates)
+ - **openid**: for OpenID Connect, this allows your app to receive user id and basic profile information
+ - **relationships.read**: allows your app to know a user's friends and implicit relationships - requires Discord approval
+ - **rpc**: for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
+ - **rpc.activities.write**: for local rpc server access, this allows you to update a user's activity - requires Discord approval
+ - **rpc.notifications.read**: for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval
+ - **rpc.screenshare.read**: for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval
+ - **rpc.screenshare.write**: for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval
+ - **rpc.video.read**: for local rpc server access, this allows you to read a user's video status - requires Discord approval
+ - **rpc.video.write**: for local rpc server access, this allows you to update a user's video settings - requires Discord approval
+ - **rpc.voice.read**: for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval
+ - **rpc.voice.write**: for local rpc server access, this allows you to update a user's voice settings - requires Discord approval
+ - **voice**: allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval
+ - **webhook.incoming**: this generates a webhook that is returned in the oauth token response for authorization code grants
+
+
+### OAuth2
+
+- **Type**: OAuth
+- **Flow**: accessCode
+- **Authorization URL**: https://discord.com/api/oauth2/authorize
+- **Scopes**:
+ - **activities.invites.write**: allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ - **activities.read**: allows your app to fetch data from a user's \"Now Playing/Recently Played\" list - requires Discord approval
+ - **activities.write**: allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ - **applications.builds.read**: allows your app to read build data for a user's applications
+ - **applications.builds.upload**: allows your app to upload/update builds for a user's applications - requires Discord approval
+ - **applications.commands**: allows your app to use commands in a guild
+ - **applications.commands.permissions.update**: allows your app to update permissions for its commands in a guild a user has permissions to
+ - **applications.entitlements**: allows your app to read entitlements for a user's applications
+ - **applications.store.update**: allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
+ - **bot**: for oauth2 bots, this puts the bot in the user's selected guild by default
+ - **connections**: allows /users/@me/connections to return linked third-party accounts
+ - **dm_channels.read**: allows your app to see information about the user's DMs and group DMs - requires Discord approval
+ - **email**: enables /users/@me to return an email
+ - **gdm.join**: allows your app to join users to a group dm
+ - **guilds**: allows /users/@me/guilds to return basic information about all of a user's guilds
+ - **guilds.join**: allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild
+ - **guilds.members.read**: allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
+ - **identify**: allows /users/@me without email
+ - **messages.read**: for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates)
+ - **openid**: for OpenID Connect, this allows your app to receive user id and basic profile information
+ - **relationships.read**: allows your app to know a user's friends and implicit relationships - requires Discord approval
+ - **role_connections.write**: allows your app to update a user's connection and metadata for the app
+ - **rpc**: for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
+ - **rpc.activities.write**: for local rpc server access, this allows you to update a user's activity - requires Discord approval
+ - **rpc.notifications.read**: for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval
+ - **rpc.screenshare.read**: for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval
+ - **rpc.screenshare.write**: for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval
+ - **rpc.video.read**: for local rpc server access, this allows you to read a user's video status - requires Discord approval
+ - **rpc.video.write**: for local rpc server access, this allows you to update a user's video settings - requires Discord approval
+ - **rpc.voice.read**: for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval
+ - **rpc.voice.write**: for local rpc server access, this allows you to update a user's voice settings - requires Discord approval
+ - **voice**: allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval
+ - **webhook.incoming**: this generates a webhook that is returned in the oauth token response for authorization code grants
+
+
+## Author
+
+
+
+
diff --git a/dc_rest/__init__.py b/dc_rest/__init__.py
new file mode 100644
index 0000000..7e0d08b
--- /dev/null
+++ b/dc_rest/__init__.py
@@ -0,0 +1,999 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+__version__ = "10"
+
+# Define package exports
+__all__ = [
+ "DefaultApi",
+ "ApiResponse",
+ "ApiClient",
+ "Configuration",
+ "OpenApiException",
+ "ApiTypeError",
+ "ApiValueError",
+ "ApiKeyError",
+ "ApiAttributeError",
+ "ApiException",
+ "AccountResponse",
+ "ActionRowComponentForMessageRequest",
+ "ActionRowComponentForMessageRequestComponentsInner",
+ "ActionRowComponentForModalRequest",
+ "ActionRowComponentResponse",
+ "ActionRowComponentResponseComponentsInner",
+ "ActivitiesAttachmentResponse",
+ "AddGroupDmUser201Response",
+ "AddGroupDmUserRequest",
+ "AddGuildMemberRequest",
+ "AddLobbyMemberRequest",
+ "ApplicationCommandAttachmentOption",
+ "ApplicationCommandAttachmentOptionResponse",
+ "ApplicationCommandAutocompleteCallbackRequest",
+ "ApplicationCommandAutocompleteCallbackRequestData",
+ "ApplicationCommandBooleanOption",
+ "ApplicationCommandBooleanOptionResponse",
+ "ApplicationCommandChannelOption",
+ "ApplicationCommandChannelOptionResponse",
+ "ApplicationCommandCreateRequest",
+ "ApplicationCommandCreateRequestOptionsInner",
+ "ApplicationCommandIntegerOption",
+ "ApplicationCommandIntegerOptionResponse",
+ "ApplicationCommandInteractionMetadataResponse",
+ "ApplicationCommandMentionableOption",
+ "ApplicationCommandMentionableOptionResponse",
+ "ApplicationCommandNumberOption",
+ "ApplicationCommandNumberOptionResponse",
+ "ApplicationCommandOptionIntegerChoice",
+ "ApplicationCommandOptionIntegerChoiceResponse",
+ "ApplicationCommandOptionNumberChoice",
+ "ApplicationCommandOptionNumberChoiceResponse",
+ "ApplicationCommandOptionStringChoice",
+ "ApplicationCommandOptionStringChoiceResponse",
+ "ApplicationCommandPatchRequestPartial",
+ "ApplicationCommandPermission",
+ "ApplicationCommandResponse",
+ "ApplicationCommandResponseOptionsInner",
+ "ApplicationCommandRoleOption",
+ "ApplicationCommandRoleOptionResponse",
+ "ApplicationCommandStringOption",
+ "ApplicationCommandStringOptionResponse",
+ "ApplicationCommandSubcommandGroupOption",
+ "ApplicationCommandSubcommandGroupOptionResponse",
+ "ApplicationCommandSubcommandOption",
+ "ApplicationCommandSubcommandOptionOptionsInner",
+ "ApplicationCommandSubcommandOptionResponse",
+ "ApplicationCommandSubcommandOptionResponseOptionsInner",
+ "ApplicationCommandUpdateRequest",
+ "ApplicationCommandUserOption",
+ "ApplicationCommandUserOptionResponse",
+ "ApplicationFormPartial",
+ "ApplicationFormPartialDescription",
+ "ApplicationFormPartialIntegrationTypesConfigValue",
+ "ApplicationIncomingWebhookResponse",
+ "ApplicationIntegrationTypeConfiguration",
+ "ApplicationIntegrationTypeConfigurationResponse",
+ "ApplicationOAuth2InstallParams",
+ "ApplicationOAuth2InstallParamsResponse",
+ "ApplicationResponse",
+ "ApplicationRoleConnectionsMetadataItemRequest",
+ "ApplicationRoleConnectionsMetadataItemResponse",
+ "ApplicationUserRoleConnectionResponse",
+ "AttachmentResponse",
+ "AuditLogEntryResponse",
+ "AuditLogObjectChangeResponse",
+ "BanUserFromGuildRequest",
+ "BaseCreateMessageCreateRequest",
+ "BaseCreateMessageCreateRequestComponentsInner",
+ "BasicApplicationResponse",
+ "BasicMessageResponse",
+ "BasicMessageResponseComponentsInner",
+ "BasicMessageResponseInteractionMetadata",
+ "BasicMessageResponseNonce",
+ "BlockMessageAction",
+ "BlockMessageActionMetadata",
+ "BlockMessageActionMetadataResponse",
+ "BlockMessageActionResponse",
+ "BotAccountPatchRequest",
+ "BulkBanUsersFromGuildRequest",
+ "BulkBanUsersResponse",
+ "BulkDeleteMessagesRequest",
+ "BulkLobbyMemberRequest",
+ "BulkUpdateGuildChannelsRequestInner",
+ "BulkUpdateGuildRolesRequestInner",
+ "ButtonComponentForMessageRequest",
+ "ButtonComponentResponse",
+ "ChannelFollowerResponse",
+ "ChannelFollowerWebhookResponse",
+ "ChannelPermissionOverwriteRequest",
+ "ChannelPermissionOverwriteResponse",
+ "ChannelSelectComponentForMessageRequest",
+ "ChannelSelectComponentResponse",
+ "ChannelSelectDefaultValue",
+ "ChannelSelectDefaultValueResponse",
+ "CommandPermissionResponse",
+ "CommandPermissionsResponse",
+ "ComponentEmojiForMessageRequest",
+ "ComponentEmojiResponse",
+ "ConnectedAccountGuildResponse",
+ "ConnectedAccountIntegrationResponse",
+ "ConnectedAccountResponse",
+ "ContainerComponentForMessageRequest",
+ "ContainerComponentForMessageRequestComponentsInner",
+ "ContainerComponentResponse",
+ "ContainerComponentResponseComponentsInner",
+ "CreateApplicationEmojiRequest",
+ "CreateAutoModerationRule200Response",
+ "CreateAutoModerationRuleRequest",
+ "CreateChannelInviteRequest",
+ "CreateEntitlementRequestData",
+ "CreateForumThreadRequest",
+ "CreateGroupDMInviteRequest",
+ "CreateGuildChannelRequest",
+ "CreateGuildEmojiRequest",
+ "CreateGuildFromTemplateRequest",
+ "CreateGuildInviteRequest",
+ "CreateGuildRequestChannelItem",
+ "CreateGuildRequestRoleItem",
+ "CreateGuildRoleRequest",
+ "CreateGuildScheduledEventRequest",
+ "CreateGuildTemplateRequest",
+ "CreateInteractionResponseRequest",
+ "CreateLobbyRequest",
+ "CreateMessageInteractionCallbackRequest",
+ "CreateMessageInteractionCallbackResponse",
+ "CreateOrJoinLobbyRequest",
+ "CreateOrUpdateThreadTagRequest",
+ "CreatePrivateChannelRequest",
+ "CreateStageInstanceRequest",
+ "CreateTextThreadWithMessageRequest",
+ "CreateTextThreadWithoutMessageRequest",
+ "CreateThreadRequest",
+ "CreateWebhookRequest",
+ "CreatedThreadResponse",
+ "DefaultKeywordListTriggerMetadata",
+ "DefaultKeywordListTriggerMetadataResponse",
+ "DefaultKeywordListUpsertRequest",
+ "DefaultKeywordListUpsertRequestActionsInner",
+ "DefaultKeywordListUpsertRequestPartial",
+ "DefaultKeywordRuleResponse",
+ "DefaultKeywordRuleResponseActionsInner",
+ "DefaultReactionEmojiResponse",
+ "DiscordIntegrationResponse",
+ "EditLobbyChannelLinkRequest",
+ "EmbeddedActivityInstance",
+ "EmbeddedActivityInstanceLocation",
+ "EmojiResponse",
+ "EntitlementResponse",
+ "EntityMetadataExternal",
+ "EntityMetadataExternalResponse",
+ "Error",
+ "ErrorDetails",
+ "ErrorResponse",
+ "ExecuteWebhookRequest",
+ "ExternalConnectionIntegrationResponse",
+ "ExternalScheduledEventCreateRequest",
+ "ExternalScheduledEventPatchRequestPartial",
+ "ExternalScheduledEventResponse",
+ "FileComponentForMessageRequest",
+ "FileComponentResponse",
+ "FlagToChannelAction",
+ "FlagToChannelActionMetadata",
+ "FlagToChannelActionMetadataResponse",
+ "FlagToChannelActionResponse",
+ "FollowChannelRequest",
+ "ForumTagResponse",
+ "FriendInviteResponse",
+ "GatewayBotResponse",
+ "GatewayBotSessionStartLimitResponse",
+ "GatewayResponse",
+ "GetChannel200Response",
+ "GetEntitlementsSkuIdsParameter",
+ "GetSticker200Response",
+ "GithubAuthor",
+ "GithubCheckApp",
+ "GithubCheckPullRequest",
+ "GithubCheckRun",
+ "GithubCheckRunOutput",
+ "GithubCheckSuite",
+ "GithubComment",
+ "GithubCommit",
+ "GithubDiscussion",
+ "GithubIssue",
+ "GithubRelease",
+ "GithubRepository",
+ "GithubReview",
+ "GithubUser",
+ "GithubWebhook",
+ "GroupDMInviteResponse",
+ "GuildAuditLogResponse",
+ "GuildAuditLogResponseIntegrationsInner",
+ "GuildBanResponse",
+ "GuildChannelLocation",
+ "GuildChannelResponse",
+ "GuildCreateRequest",
+ "GuildHomeSettingsResponse",
+ "GuildIncomingWebhookResponse",
+ "GuildInviteResponse",
+ "GuildMFALevelResponse",
+ "GuildMemberResponse",
+ "GuildOnboardingResponse",
+ "GuildPatchRequestPartial",
+ "GuildPreviewResponse",
+ "GuildProductPurchaseResponse",
+ "GuildPruneResponse",
+ "GuildResponse",
+ "GuildRoleResponse",
+ "GuildRoleTagsResponse",
+ "GuildStickerResponse",
+ "GuildSubscriptionIntegrationResponse",
+ "GuildTemplateChannelResponse",
+ "GuildTemplateChannelTags",
+ "GuildTemplateResponse",
+ "GuildTemplateRoleResponse",
+ "GuildTemplateSnapshotResponse",
+ "GuildWelcomeChannel",
+ "GuildWelcomeScreenChannelResponse",
+ "GuildWelcomeScreenResponse",
+ "GuildWithCountsResponse",
+ "IncomingWebhookInteractionRequest",
+ "IncomingWebhookRequestPartial",
+ "IncomingWebhookUpdateForInteractionCallbackRequestPartial",
+ "IncomingWebhookUpdateRequestPartial",
+ "InnerErrors",
+ "IntegrationApplicationResponse",
+ "InteractionApplicationCommandAutocompleteCallbackIntegerData",
+ "InteractionApplicationCommandAutocompleteCallbackNumberData",
+ "InteractionApplicationCommandAutocompleteCallbackStringData",
+ "InteractionCallbackResponse",
+ "InteractionCallbackResponseResource",
+ "InteractionResponse",
+ "InviteApplicationResponse",
+ "InviteChannelRecipientResponse",
+ "InviteChannelResponse",
+ "InviteGuildResponse",
+ "KeywordRuleResponse",
+ "KeywordTriggerMetadata",
+ "KeywordTriggerMetadataResponse",
+ "KeywordUpsertRequest",
+ "KeywordUpsertRequestPartial",
+ "LaunchActivityInteractionCallbackRequest",
+ "LaunchActivityInteractionCallbackResponse",
+ "ListApplicationEmojisResponse",
+ "ListAutoModerationRules200ResponseInner",
+ "ListChannelInvites200ResponseInner",
+ "ListChannelWebhooks200ResponseInner",
+ "ListGuildIntegrations200ResponseInner",
+ "ListGuildScheduledEvents200ResponseInner",
+ "ListGuildSoundboardSoundsResponse",
+ "LobbyMemberRequest",
+ "LobbyMemberResponse",
+ "LobbyMessageResponse",
+ "LobbyResponse",
+ "MLSpamRuleResponse",
+ "MLSpamUpsertRequest",
+ "MLSpamUpsertRequestPartial",
+ "MediaGalleryComponentForMessageRequest",
+ "MediaGalleryComponentResponse",
+ "MediaGalleryItemRequest",
+ "MediaGalleryItemResponse",
+ "MentionSpamRuleResponse",
+ "MentionSpamTriggerMetadata",
+ "MentionSpamTriggerMetadataResponse",
+ "MentionSpamUpsertRequest",
+ "MentionSpamUpsertRequestPartial",
+ "MentionableSelectComponentForMessageRequest",
+ "MentionableSelectComponentForMessageRequestDefaultValuesInner",
+ "MentionableSelectComponentResponse",
+ "MentionableSelectComponentResponseDefaultValuesInner",
+ "MessageAllowedMentionsRequest",
+ "MessageAttachmentRequest",
+ "MessageAttachmentResponse",
+ "MessageCallResponse",
+ "MessageComponentInteractionMetadataResponse",
+ "MessageCreateRequest",
+ "MessageEditRequestPartial",
+ "MessageEmbedAuthorResponse",
+ "MessageEmbedFieldResponse",
+ "MessageEmbedFooterResponse",
+ "MessageEmbedImageResponse",
+ "MessageEmbedProviderResponse",
+ "MessageEmbedResponse",
+ "MessageEmbedVideoResponse",
+ "MessageInteractionResponse",
+ "MessageMentionChannelResponse",
+ "MessageReactionCountDetailsResponse",
+ "MessageReactionEmojiResponse",
+ "MessageReactionResponse",
+ "MessageReferenceRequest",
+ "MessageReferenceResponse",
+ "MessageResponse",
+ "MessageRoleSubscriptionDataResponse",
+ "MessageSnapshotResponse",
+ "MessageStickerItemResponse",
+ "MinimalContentMessageResponse",
+ "ModalInteractionCallbackRequest",
+ "ModalInteractionCallbackRequestData",
+ "ModalSubmitInteractionMetadataResponse",
+ "ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata",
+ "MyGuildResponse",
+ "NewMemberActionResponse",
+ "OAuth2GetAuthorizationResponse",
+ "OAuth2GetKeys",
+ "OAuth2GetOpenIDConnectUserInfoResponse",
+ "OAuth2Key",
+ "OnboardingPromptOptionRequest",
+ "OnboardingPromptOptionResponse",
+ "OnboardingPromptResponse",
+ "PartialDiscordIntegrationResponse",
+ "PartialExternalConnectionIntegrationResponse",
+ "PartialGuildSubscriptionIntegrationResponse",
+ "PartnerSdkUnmergeProvisionalAccountRequest",
+ "PinnedMessageResponse",
+ "PinnedMessagesResponse",
+ "PollAnswerCreateRequest",
+ "PollAnswerDetailsResponse",
+ "PollAnswerResponse",
+ "PollCreateRequest",
+ "PollEmoji",
+ "PollEmojiCreateRequest",
+ "PollMedia",
+ "PollMediaCreateRequest",
+ "PollMediaResponse",
+ "PollResponse",
+ "PollResultsEntryResponse",
+ "PollResultsResponse",
+ "PongInteractionCallbackRequest",
+ "PrivateApplicationResponse",
+ "PrivateChannelLocation",
+ "PrivateChannelResponse",
+ "PrivateGroupChannelResponse",
+ "PrivateGuildMemberResponse",
+ "ProvisionalTokenResponse",
+ "PruneGuildRequest",
+ "PruneGuildRequestIncludeRoles",
+ "PurchaseNotificationResponse",
+ "QuarantineUserAction",
+ "QuarantineUserActionResponse",
+ "ResolvedObjectsResponse",
+ "ResourceChannelResponse",
+ "RichEmbed",
+ "RichEmbedAuthor",
+ "RichEmbedField",
+ "RichEmbedFooter",
+ "RichEmbedImage",
+ "RichEmbedProvider",
+ "RichEmbedThumbnail",
+ "RichEmbedVideo",
+ "RoleSelectComponentForMessageRequest",
+ "RoleSelectComponentResponse",
+ "RoleSelectDefaultValue",
+ "RoleSelectDefaultValueResponse",
+ "SDKMessageRequest",
+ "ScheduledEventResponse",
+ "ScheduledEventUserResponse",
+ "SectionComponentForMessageRequest",
+ "SectionComponentForMessageRequestAccessory",
+ "SectionComponentResponse",
+ "SectionComponentResponseAccessory",
+ "SeparatorComponentForMessageRequest",
+ "SeparatorComponentResponse",
+ "SetChannelPermissionOverwriteRequest",
+ "SetGuildApplicationCommandPermissionsRequest",
+ "SetGuildMfaLevelRequest",
+ "SettingsEmojiResponse",
+ "SlackWebhook",
+ "SoundboardCreateRequest",
+ "SoundboardPatchRequestPartial",
+ "SoundboardSoundResponse",
+ "SoundboardSoundSendRequest",
+ "SpamLinkRuleResponse",
+ "StageInstanceResponse",
+ "StageScheduledEventCreateRequest",
+ "StageScheduledEventPatchRequestPartial",
+ "StageScheduledEventResponse",
+ "StandardStickerResponse",
+ "StickerPackCollectionResponse",
+ "StickerPackResponse",
+ "StringSelectComponentForMessageRequest",
+ "StringSelectComponentResponse",
+ "StringSelectOptionForMessageRequest",
+ "StringSelectOptionResponse",
+ "TeamMemberResponse",
+ "TeamResponse",
+ "TextDisplayComponentForMessageRequest",
+ "TextDisplayComponentResponse",
+ "TextInputComponentForModalRequest",
+ "TextInputComponentResponse",
+ "ThreadMemberResponse",
+ "ThreadMetadataResponse",
+ "ThreadResponse",
+ "ThreadSearchResponse",
+ "ThreadSearchTagParameter",
+ "ThreadsResponse",
+ "ThumbnailComponentForMessageRequest",
+ "ThumbnailComponentResponse",
+ "UnfurledMediaRequest",
+ "UnfurledMediaRequestWithAttachmentReferenceRequired",
+ "UnfurledMediaResponse",
+ "UpdateApplicationEmojiRequest",
+ "UpdateApplicationUserRoleConnectionRequest",
+ "UpdateAutoModerationRuleRequest",
+ "UpdateChannelRequest",
+ "UpdateDMRequestPartial",
+ "UpdateDefaultReactionEmojiRequest",
+ "UpdateGroupDMRequestPartial",
+ "UpdateGuildChannelRequestPartial",
+ "UpdateGuildEmojiRequest",
+ "UpdateGuildMemberRequest",
+ "UpdateGuildOnboardingRequest",
+ "UpdateGuildScheduledEventRequest",
+ "UpdateGuildStickerRequest",
+ "UpdateGuildTemplateRequest",
+ "UpdateGuildWidgetSettingsRequest",
+ "UpdateMessageInteractionCallbackRequest",
+ "UpdateMessageInteractionCallbackResponse",
+ "UpdateMyGuildMemberRequest",
+ "UpdateOnboardingPromptRequest",
+ "UpdateSelfVoiceStateRequest",
+ "UpdateStageInstanceRequest",
+ "UpdateThreadRequestPartial",
+ "UpdateThreadTagRequest",
+ "UpdateVoiceStateRequest",
+ "UpdateWebhookByTokenRequest",
+ "UpdateWebhookRequest",
+ "UserAvatarDecorationResponse",
+ "UserCollectiblesResponse",
+ "UserCommunicationDisabledAction",
+ "UserCommunicationDisabledActionMetadata",
+ "UserCommunicationDisabledActionMetadataResponse",
+ "UserCommunicationDisabledActionResponse",
+ "UserGuildOnboardingResponse",
+ "UserNameplateResponse",
+ "UserPIIResponse",
+ "UserPrimaryGuildResponse",
+ "UserResponse",
+ "UserSelectComponentForMessageRequest",
+ "UserSelectComponentResponse",
+ "UserSelectDefaultValue",
+ "UserSelectDefaultValueResponse",
+ "VanityURLErrorResponse",
+ "VanityURLResponse",
+ "VoiceRegionResponse",
+ "VoiceScheduledEventCreateRequest",
+ "VoiceScheduledEventPatchRequestPartial",
+ "VoiceScheduledEventResponse",
+ "VoiceStateResponse",
+ "WebhookSlackEmbed",
+ "WebhookSlackEmbedField",
+ "WebhookSourceChannelResponse",
+ "WebhookSourceGuildResponse",
+ "WelcomeMessageResponse",
+ "WelcomeScreenPatchRequestPartial",
+ "WidgetActivity",
+ "WidgetChannel",
+ "WidgetMember",
+ "WidgetResponse",
+ "WidgetSettingsResponse",
+]
+
+# import apis into sdk package
+from dc_rest.api.default_api import DefaultApi as DefaultApi
+
+# import ApiClient
+from dc_rest.api_response import ApiResponse as ApiResponse
+from dc_rest.api_client import ApiClient as ApiClient
+from dc_rest.configuration import Configuration as Configuration
+from dc_rest.exceptions import OpenApiException as OpenApiException
+from dc_rest.exceptions import ApiTypeError as ApiTypeError
+from dc_rest.exceptions import ApiValueError as ApiValueError
+from dc_rest.exceptions import ApiKeyError as ApiKeyError
+from dc_rest.exceptions import ApiAttributeError as ApiAttributeError
+from dc_rest.exceptions import ApiException as ApiException
+
+# import models into sdk package
+from dc_rest.models.account_response import AccountResponse as AccountResponse
+from dc_rest.models.action_row_component_for_message_request import ActionRowComponentForMessageRequest as ActionRowComponentForMessageRequest
+from dc_rest.models.action_row_component_for_message_request_components_inner import ActionRowComponentForMessageRequestComponentsInner as ActionRowComponentForMessageRequestComponentsInner
+from dc_rest.models.action_row_component_for_modal_request import ActionRowComponentForModalRequest as ActionRowComponentForModalRequest
+from dc_rest.models.action_row_component_response import ActionRowComponentResponse as ActionRowComponentResponse
+from dc_rest.models.action_row_component_response_components_inner import ActionRowComponentResponseComponentsInner as ActionRowComponentResponseComponentsInner
+from dc_rest.models.activities_attachment_response import ActivitiesAttachmentResponse as ActivitiesAttachmentResponse
+from dc_rest.models.add_group_dm_user201_response import AddGroupDmUser201Response as AddGroupDmUser201Response
+from dc_rest.models.add_group_dm_user_request import AddGroupDmUserRequest as AddGroupDmUserRequest
+from dc_rest.models.add_guild_member_request import AddGuildMemberRequest as AddGuildMemberRequest
+from dc_rest.models.add_lobby_member_request import AddLobbyMemberRequest as AddLobbyMemberRequest
+from dc_rest.models.application_command_attachment_option import ApplicationCommandAttachmentOption as ApplicationCommandAttachmentOption
+from dc_rest.models.application_command_attachment_option_response import ApplicationCommandAttachmentOptionResponse as ApplicationCommandAttachmentOptionResponse
+from dc_rest.models.application_command_autocomplete_callback_request import ApplicationCommandAutocompleteCallbackRequest as ApplicationCommandAutocompleteCallbackRequest
+from dc_rest.models.application_command_autocomplete_callback_request_data import ApplicationCommandAutocompleteCallbackRequestData as ApplicationCommandAutocompleteCallbackRequestData
+from dc_rest.models.application_command_boolean_option import ApplicationCommandBooleanOption as ApplicationCommandBooleanOption
+from dc_rest.models.application_command_boolean_option_response import ApplicationCommandBooleanOptionResponse as ApplicationCommandBooleanOptionResponse
+from dc_rest.models.application_command_channel_option import ApplicationCommandChannelOption as ApplicationCommandChannelOption
+from dc_rest.models.application_command_channel_option_response import ApplicationCommandChannelOptionResponse as ApplicationCommandChannelOptionResponse
+from dc_rest.models.application_command_create_request import ApplicationCommandCreateRequest as ApplicationCommandCreateRequest
+from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner as ApplicationCommandCreateRequestOptionsInner
+from dc_rest.models.application_command_integer_option import ApplicationCommandIntegerOption as ApplicationCommandIntegerOption
+from dc_rest.models.application_command_integer_option_response import ApplicationCommandIntegerOptionResponse as ApplicationCommandIntegerOptionResponse
+from dc_rest.models.application_command_interaction_metadata_response import ApplicationCommandInteractionMetadataResponse as ApplicationCommandInteractionMetadataResponse
+from dc_rest.models.application_command_mentionable_option import ApplicationCommandMentionableOption as ApplicationCommandMentionableOption
+from dc_rest.models.application_command_mentionable_option_response import ApplicationCommandMentionableOptionResponse as ApplicationCommandMentionableOptionResponse
+from dc_rest.models.application_command_number_option import ApplicationCommandNumberOption as ApplicationCommandNumberOption
+from dc_rest.models.application_command_number_option_response import ApplicationCommandNumberOptionResponse as ApplicationCommandNumberOptionResponse
+from dc_rest.models.application_command_option_integer_choice import ApplicationCommandOptionIntegerChoice as ApplicationCommandOptionIntegerChoice
+from dc_rest.models.application_command_option_integer_choice_response import ApplicationCommandOptionIntegerChoiceResponse as ApplicationCommandOptionIntegerChoiceResponse
+from dc_rest.models.application_command_option_number_choice import ApplicationCommandOptionNumberChoice as ApplicationCommandOptionNumberChoice
+from dc_rest.models.application_command_option_number_choice_response import ApplicationCommandOptionNumberChoiceResponse as ApplicationCommandOptionNumberChoiceResponse
+from dc_rest.models.application_command_option_string_choice import ApplicationCommandOptionStringChoice as ApplicationCommandOptionStringChoice
+from dc_rest.models.application_command_option_string_choice_response import ApplicationCommandOptionStringChoiceResponse as ApplicationCommandOptionStringChoiceResponse
+from dc_rest.models.application_command_patch_request_partial import ApplicationCommandPatchRequestPartial as ApplicationCommandPatchRequestPartial
+from dc_rest.models.application_command_permission import ApplicationCommandPermission as ApplicationCommandPermission
+from dc_rest.models.application_command_response import ApplicationCommandResponse as ApplicationCommandResponse
+from dc_rest.models.application_command_response_options_inner import ApplicationCommandResponseOptionsInner as ApplicationCommandResponseOptionsInner
+from dc_rest.models.application_command_role_option import ApplicationCommandRoleOption as ApplicationCommandRoleOption
+from dc_rest.models.application_command_role_option_response import ApplicationCommandRoleOptionResponse as ApplicationCommandRoleOptionResponse
+from dc_rest.models.application_command_string_option import ApplicationCommandStringOption as ApplicationCommandStringOption
+from dc_rest.models.application_command_string_option_response import ApplicationCommandStringOptionResponse as ApplicationCommandStringOptionResponse
+from dc_rest.models.application_command_subcommand_group_option import ApplicationCommandSubcommandGroupOption as ApplicationCommandSubcommandGroupOption
+from dc_rest.models.application_command_subcommand_group_option_response import ApplicationCommandSubcommandGroupOptionResponse as ApplicationCommandSubcommandGroupOptionResponse
+from dc_rest.models.application_command_subcommand_option import ApplicationCommandSubcommandOption as ApplicationCommandSubcommandOption
+from dc_rest.models.application_command_subcommand_option_options_inner import ApplicationCommandSubcommandOptionOptionsInner as ApplicationCommandSubcommandOptionOptionsInner
+from dc_rest.models.application_command_subcommand_option_response import ApplicationCommandSubcommandOptionResponse as ApplicationCommandSubcommandOptionResponse
+from dc_rest.models.application_command_subcommand_option_response_options_inner import ApplicationCommandSubcommandOptionResponseOptionsInner as ApplicationCommandSubcommandOptionResponseOptionsInner
+from dc_rest.models.application_command_update_request import ApplicationCommandUpdateRequest as ApplicationCommandUpdateRequest
+from dc_rest.models.application_command_user_option import ApplicationCommandUserOption as ApplicationCommandUserOption
+from dc_rest.models.application_command_user_option_response import ApplicationCommandUserOptionResponse as ApplicationCommandUserOptionResponse
+from dc_rest.models.application_form_partial import ApplicationFormPartial as ApplicationFormPartial
+from dc_rest.models.application_form_partial_description import ApplicationFormPartialDescription as ApplicationFormPartialDescription
+from dc_rest.models.application_form_partial_integration_types_config_value import ApplicationFormPartialIntegrationTypesConfigValue as ApplicationFormPartialIntegrationTypesConfigValue
+from dc_rest.models.application_incoming_webhook_response import ApplicationIncomingWebhookResponse as ApplicationIncomingWebhookResponse
+from dc_rest.models.application_integration_type_configuration import ApplicationIntegrationTypeConfiguration as ApplicationIntegrationTypeConfiguration
+from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse as ApplicationIntegrationTypeConfigurationResponse
+from dc_rest.models.application_o_auth2_install_params import ApplicationOAuth2InstallParams as ApplicationOAuth2InstallParams
+from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse as ApplicationOAuth2InstallParamsResponse
+from dc_rest.models.application_response import ApplicationResponse as ApplicationResponse
+from dc_rest.models.application_role_connections_metadata_item_request import ApplicationRoleConnectionsMetadataItemRequest as ApplicationRoleConnectionsMetadataItemRequest
+from dc_rest.models.application_role_connections_metadata_item_response import ApplicationRoleConnectionsMetadataItemResponse as ApplicationRoleConnectionsMetadataItemResponse
+from dc_rest.models.application_user_role_connection_response import ApplicationUserRoleConnectionResponse as ApplicationUserRoleConnectionResponse
+from dc_rest.models.attachment_response import AttachmentResponse as AttachmentResponse
+from dc_rest.models.audit_log_entry_response import AuditLogEntryResponse as AuditLogEntryResponse
+from dc_rest.models.audit_log_object_change_response import AuditLogObjectChangeResponse as AuditLogObjectChangeResponse
+from dc_rest.models.ban_user_from_guild_request import BanUserFromGuildRequest as BanUserFromGuildRequest
+from dc_rest.models.base_create_message_create_request import BaseCreateMessageCreateRequest as BaseCreateMessageCreateRequest
+from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner as BaseCreateMessageCreateRequestComponentsInner
+from dc_rest.models.basic_application_response import BasicApplicationResponse as BasicApplicationResponse
+from dc_rest.models.basic_message_response import BasicMessageResponse as BasicMessageResponse
+from dc_rest.models.basic_message_response_components_inner import BasicMessageResponseComponentsInner as BasicMessageResponseComponentsInner
+from dc_rest.models.basic_message_response_interaction_metadata import BasicMessageResponseInteractionMetadata as BasicMessageResponseInteractionMetadata
+from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce as BasicMessageResponseNonce
+from dc_rest.models.block_message_action import BlockMessageAction as BlockMessageAction
+from dc_rest.models.block_message_action_metadata import BlockMessageActionMetadata as BlockMessageActionMetadata
+from dc_rest.models.block_message_action_metadata_response import BlockMessageActionMetadataResponse as BlockMessageActionMetadataResponse
+from dc_rest.models.block_message_action_response import BlockMessageActionResponse as BlockMessageActionResponse
+from dc_rest.models.bot_account_patch_request import BotAccountPatchRequest as BotAccountPatchRequest
+from dc_rest.models.bulk_ban_users_from_guild_request import BulkBanUsersFromGuildRequest as BulkBanUsersFromGuildRequest
+from dc_rest.models.bulk_ban_users_response import BulkBanUsersResponse as BulkBanUsersResponse
+from dc_rest.models.bulk_delete_messages_request import BulkDeleteMessagesRequest as BulkDeleteMessagesRequest
+from dc_rest.models.bulk_lobby_member_request import BulkLobbyMemberRequest as BulkLobbyMemberRequest
+from dc_rest.models.bulk_update_guild_channels_request_inner import BulkUpdateGuildChannelsRequestInner as BulkUpdateGuildChannelsRequestInner
+from dc_rest.models.bulk_update_guild_roles_request_inner import BulkUpdateGuildRolesRequestInner as BulkUpdateGuildRolesRequestInner
+from dc_rest.models.button_component_for_message_request import ButtonComponentForMessageRequest as ButtonComponentForMessageRequest
+from dc_rest.models.button_component_response import ButtonComponentResponse as ButtonComponentResponse
+from dc_rest.models.channel_follower_response import ChannelFollowerResponse as ChannelFollowerResponse
+from dc_rest.models.channel_follower_webhook_response import ChannelFollowerWebhookResponse as ChannelFollowerWebhookResponse
+from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest as ChannelPermissionOverwriteRequest
+from dc_rest.models.channel_permission_overwrite_response import ChannelPermissionOverwriteResponse as ChannelPermissionOverwriteResponse
+from dc_rest.models.channel_select_component_for_message_request import ChannelSelectComponentForMessageRequest as ChannelSelectComponentForMessageRequest
+from dc_rest.models.channel_select_component_response import ChannelSelectComponentResponse as ChannelSelectComponentResponse
+from dc_rest.models.channel_select_default_value import ChannelSelectDefaultValue as ChannelSelectDefaultValue
+from dc_rest.models.channel_select_default_value_response import ChannelSelectDefaultValueResponse as ChannelSelectDefaultValueResponse
+from dc_rest.models.command_permission_response import CommandPermissionResponse as CommandPermissionResponse
+from dc_rest.models.command_permissions_response import CommandPermissionsResponse as CommandPermissionsResponse
+from dc_rest.models.component_emoji_for_message_request import ComponentEmojiForMessageRequest as ComponentEmojiForMessageRequest
+from dc_rest.models.component_emoji_response import ComponentEmojiResponse as ComponentEmojiResponse
+from dc_rest.models.connected_account_guild_response import ConnectedAccountGuildResponse as ConnectedAccountGuildResponse
+from dc_rest.models.connected_account_integration_response import ConnectedAccountIntegrationResponse as ConnectedAccountIntegrationResponse
+from dc_rest.models.connected_account_response import ConnectedAccountResponse as ConnectedAccountResponse
+from dc_rest.models.container_component_for_message_request import ContainerComponentForMessageRequest as ContainerComponentForMessageRequest
+from dc_rest.models.container_component_for_message_request_components_inner import ContainerComponentForMessageRequestComponentsInner as ContainerComponentForMessageRequestComponentsInner
+from dc_rest.models.container_component_response import ContainerComponentResponse as ContainerComponentResponse
+from dc_rest.models.container_component_response_components_inner import ContainerComponentResponseComponentsInner as ContainerComponentResponseComponentsInner
+from dc_rest.models.create_application_emoji_request import CreateApplicationEmojiRequest as CreateApplicationEmojiRequest
+from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response as CreateAutoModerationRule200Response
+from dc_rest.models.create_auto_moderation_rule_request import CreateAutoModerationRuleRequest as CreateAutoModerationRuleRequest
+from dc_rest.models.create_channel_invite_request import CreateChannelInviteRequest as CreateChannelInviteRequest
+from dc_rest.models.create_entitlement_request_data import CreateEntitlementRequestData as CreateEntitlementRequestData
+from dc_rest.models.create_forum_thread_request import CreateForumThreadRequest as CreateForumThreadRequest
+from dc_rest.models.create_group_dm_invite_request import CreateGroupDMInviteRequest as CreateGroupDMInviteRequest
+from dc_rest.models.create_guild_channel_request import CreateGuildChannelRequest as CreateGuildChannelRequest
+from dc_rest.models.create_guild_emoji_request import CreateGuildEmojiRequest as CreateGuildEmojiRequest
+from dc_rest.models.create_guild_from_template_request import CreateGuildFromTemplateRequest as CreateGuildFromTemplateRequest
+from dc_rest.models.create_guild_invite_request import CreateGuildInviteRequest as CreateGuildInviteRequest
+from dc_rest.models.create_guild_request_channel_item import CreateGuildRequestChannelItem as CreateGuildRequestChannelItem
+from dc_rest.models.create_guild_request_role_item import CreateGuildRequestRoleItem as CreateGuildRequestRoleItem
+from dc_rest.models.create_guild_role_request import CreateGuildRoleRequest as CreateGuildRoleRequest
+from dc_rest.models.create_guild_scheduled_event_request import CreateGuildScheduledEventRequest as CreateGuildScheduledEventRequest
+from dc_rest.models.create_guild_template_request import CreateGuildTemplateRequest as CreateGuildTemplateRequest
+from dc_rest.models.create_interaction_response_request import CreateInteractionResponseRequest as CreateInteractionResponseRequest
+from dc_rest.models.create_lobby_request import CreateLobbyRequest as CreateLobbyRequest
+from dc_rest.models.create_message_interaction_callback_request import CreateMessageInteractionCallbackRequest as CreateMessageInteractionCallbackRequest
+from dc_rest.models.create_message_interaction_callback_response import CreateMessageInteractionCallbackResponse as CreateMessageInteractionCallbackResponse
+from dc_rest.models.create_or_join_lobby_request import CreateOrJoinLobbyRequest as CreateOrJoinLobbyRequest
+from dc_rest.models.create_or_update_thread_tag_request import CreateOrUpdateThreadTagRequest as CreateOrUpdateThreadTagRequest
+from dc_rest.models.create_private_channel_request import CreatePrivateChannelRequest as CreatePrivateChannelRequest
+from dc_rest.models.create_stage_instance_request import CreateStageInstanceRequest as CreateStageInstanceRequest
+from dc_rest.models.create_text_thread_with_message_request import CreateTextThreadWithMessageRequest as CreateTextThreadWithMessageRequest
+from dc_rest.models.create_text_thread_without_message_request import CreateTextThreadWithoutMessageRequest as CreateTextThreadWithoutMessageRequest
+from dc_rest.models.create_thread_request import CreateThreadRequest as CreateThreadRequest
+from dc_rest.models.create_webhook_request import CreateWebhookRequest as CreateWebhookRequest
+from dc_rest.models.created_thread_response import CreatedThreadResponse as CreatedThreadResponse
+from dc_rest.models.default_keyword_list_trigger_metadata import DefaultKeywordListTriggerMetadata as DefaultKeywordListTriggerMetadata
+from dc_rest.models.default_keyword_list_trigger_metadata_response import DefaultKeywordListTriggerMetadataResponse as DefaultKeywordListTriggerMetadataResponse
+from dc_rest.models.default_keyword_list_upsert_request import DefaultKeywordListUpsertRequest as DefaultKeywordListUpsertRequest
+from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner as DefaultKeywordListUpsertRequestActionsInner
+from dc_rest.models.default_keyword_list_upsert_request_partial import DefaultKeywordListUpsertRequestPartial as DefaultKeywordListUpsertRequestPartial
+from dc_rest.models.default_keyword_rule_response import DefaultKeywordRuleResponse as DefaultKeywordRuleResponse
+from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner as DefaultKeywordRuleResponseActionsInner
+from dc_rest.models.default_reaction_emoji_response import DefaultReactionEmojiResponse as DefaultReactionEmojiResponse
+from dc_rest.models.discord_integration_response import DiscordIntegrationResponse as DiscordIntegrationResponse
+from dc_rest.models.edit_lobby_channel_link_request import EditLobbyChannelLinkRequest as EditLobbyChannelLinkRequest
+from dc_rest.models.embedded_activity_instance import EmbeddedActivityInstance as EmbeddedActivityInstance
+from dc_rest.models.embedded_activity_instance_location import EmbeddedActivityInstanceLocation as EmbeddedActivityInstanceLocation
+from dc_rest.models.emoji_response import EmojiResponse as EmojiResponse
+from dc_rest.models.entitlement_response import EntitlementResponse as EntitlementResponse
+from dc_rest.models.entity_metadata_external import EntityMetadataExternal as EntityMetadataExternal
+from dc_rest.models.entity_metadata_external_response import EntityMetadataExternalResponse as EntityMetadataExternalResponse
+from dc_rest.models.error import Error as Error
+from dc_rest.models.error_details import ErrorDetails as ErrorDetails
+from dc_rest.models.error_response import ErrorResponse as ErrorResponse
+from dc_rest.models.execute_webhook_request import ExecuteWebhookRequest as ExecuteWebhookRequest
+from dc_rest.models.external_connection_integration_response import ExternalConnectionIntegrationResponse as ExternalConnectionIntegrationResponse
+from dc_rest.models.external_scheduled_event_create_request import ExternalScheduledEventCreateRequest as ExternalScheduledEventCreateRequest
+from dc_rest.models.external_scheduled_event_patch_request_partial import ExternalScheduledEventPatchRequestPartial as ExternalScheduledEventPatchRequestPartial
+from dc_rest.models.external_scheduled_event_response import ExternalScheduledEventResponse as ExternalScheduledEventResponse
+from dc_rest.models.file_component_for_message_request import FileComponentForMessageRequest as FileComponentForMessageRequest
+from dc_rest.models.file_component_response import FileComponentResponse as FileComponentResponse
+from dc_rest.models.flag_to_channel_action import FlagToChannelAction as FlagToChannelAction
+from dc_rest.models.flag_to_channel_action_metadata import FlagToChannelActionMetadata as FlagToChannelActionMetadata
+from dc_rest.models.flag_to_channel_action_metadata_response import FlagToChannelActionMetadataResponse as FlagToChannelActionMetadataResponse
+from dc_rest.models.flag_to_channel_action_response import FlagToChannelActionResponse as FlagToChannelActionResponse
+from dc_rest.models.follow_channel_request import FollowChannelRequest as FollowChannelRequest
+from dc_rest.models.forum_tag_response import ForumTagResponse as ForumTagResponse
+from dc_rest.models.friend_invite_response import FriendInviteResponse as FriendInviteResponse
+from dc_rest.models.gateway_bot_response import GatewayBotResponse as GatewayBotResponse
+from dc_rest.models.gateway_bot_session_start_limit_response import GatewayBotSessionStartLimitResponse as GatewayBotSessionStartLimitResponse
+from dc_rest.models.gateway_response import GatewayResponse as GatewayResponse
+from dc_rest.models.get_channel200_response import GetChannel200Response as GetChannel200Response
+from dc_rest.models.get_entitlements_sku_ids_parameter import GetEntitlementsSkuIdsParameter as GetEntitlementsSkuIdsParameter
+from dc_rest.models.get_sticker200_response import GetSticker200Response as GetSticker200Response
+from dc_rest.models.github_author import GithubAuthor as GithubAuthor
+from dc_rest.models.github_check_app import GithubCheckApp as GithubCheckApp
+from dc_rest.models.github_check_pull_request import GithubCheckPullRequest as GithubCheckPullRequest
+from dc_rest.models.github_check_run import GithubCheckRun as GithubCheckRun
+from dc_rest.models.github_check_run_output import GithubCheckRunOutput as GithubCheckRunOutput
+from dc_rest.models.github_check_suite import GithubCheckSuite as GithubCheckSuite
+from dc_rest.models.github_comment import GithubComment as GithubComment
+from dc_rest.models.github_commit import GithubCommit as GithubCommit
+from dc_rest.models.github_discussion import GithubDiscussion as GithubDiscussion
+from dc_rest.models.github_issue import GithubIssue as GithubIssue
+from dc_rest.models.github_release import GithubRelease as GithubRelease
+from dc_rest.models.github_repository import GithubRepository as GithubRepository
+from dc_rest.models.github_review import GithubReview as GithubReview
+from dc_rest.models.github_user import GithubUser as GithubUser
+from dc_rest.models.github_webhook import GithubWebhook as GithubWebhook
+from dc_rest.models.group_dm_invite_response import GroupDMInviteResponse as GroupDMInviteResponse
+from dc_rest.models.guild_audit_log_response import GuildAuditLogResponse as GuildAuditLogResponse
+from dc_rest.models.guild_audit_log_response_integrations_inner import GuildAuditLogResponseIntegrationsInner as GuildAuditLogResponseIntegrationsInner
+from dc_rest.models.guild_ban_response import GuildBanResponse as GuildBanResponse
+from dc_rest.models.guild_channel_location import GuildChannelLocation as GuildChannelLocation
+from dc_rest.models.guild_channel_response import GuildChannelResponse as GuildChannelResponse
+from dc_rest.models.guild_create_request import GuildCreateRequest as GuildCreateRequest
+from dc_rest.models.guild_home_settings_response import GuildHomeSettingsResponse as GuildHomeSettingsResponse
+from dc_rest.models.guild_incoming_webhook_response import GuildIncomingWebhookResponse as GuildIncomingWebhookResponse
+from dc_rest.models.guild_invite_response import GuildInviteResponse as GuildInviteResponse
+from dc_rest.models.guild_mfa_level_response import GuildMFALevelResponse as GuildMFALevelResponse
+from dc_rest.models.guild_member_response import GuildMemberResponse as GuildMemberResponse
+from dc_rest.models.guild_onboarding_response import GuildOnboardingResponse as GuildOnboardingResponse
+from dc_rest.models.guild_patch_request_partial import GuildPatchRequestPartial as GuildPatchRequestPartial
+from dc_rest.models.guild_preview_response import GuildPreviewResponse as GuildPreviewResponse
+from dc_rest.models.guild_product_purchase_response import GuildProductPurchaseResponse as GuildProductPurchaseResponse
+from dc_rest.models.guild_prune_response import GuildPruneResponse as GuildPruneResponse
+from dc_rest.models.guild_response import GuildResponse as GuildResponse
+from dc_rest.models.guild_role_response import GuildRoleResponse as GuildRoleResponse
+from dc_rest.models.guild_role_tags_response import GuildRoleTagsResponse as GuildRoleTagsResponse
+from dc_rest.models.guild_sticker_response import GuildStickerResponse as GuildStickerResponse
+from dc_rest.models.guild_subscription_integration_response import GuildSubscriptionIntegrationResponse as GuildSubscriptionIntegrationResponse
+from dc_rest.models.guild_template_channel_response import GuildTemplateChannelResponse as GuildTemplateChannelResponse
+from dc_rest.models.guild_template_channel_tags import GuildTemplateChannelTags as GuildTemplateChannelTags
+from dc_rest.models.guild_template_response import GuildTemplateResponse as GuildTemplateResponse
+from dc_rest.models.guild_template_role_response import GuildTemplateRoleResponse as GuildTemplateRoleResponse
+from dc_rest.models.guild_template_snapshot_response import GuildTemplateSnapshotResponse as GuildTemplateSnapshotResponse
+from dc_rest.models.guild_welcome_channel import GuildWelcomeChannel as GuildWelcomeChannel
+from dc_rest.models.guild_welcome_screen_channel_response import GuildWelcomeScreenChannelResponse as GuildWelcomeScreenChannelResponse
+from dc_rest.models.guild_welcome_screen_response import GuildWelcomeScreenResponse as GuildWelcomeScreenResponse
+from dc_rest.models.guild_with_counts_response import GuildWithCountsResponse as GuildWithCountsResponse
+from dc_rest.models.incoming_webhook_interaction_request import IncomingWebhookInteractionRequest as IncomingWebhookInteractionRequest
+from dc_rest.models.incoming_webhook_request_partial import IncomingWebhookRequestPartial as IncomingWebhookRequestPartial
+from dc_rest.models.incoming_webhook_update_for_interaction_callback_request_partial import IncomingWebhookUpdateForInteractionCallbackRequestPartial as IncomingWebhookUpdateForInteractionCallbackRequestPartial
+from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial as IncomingWebhookUpdateRequestPartial
+from dc_rest.models.inner_errors import InnerErrors as InnerErrors
+from dc_rest.models.integration_application_response import IntegrationApplicationResponse as IntegrationApplicationResponse
+from dc_rest.models.interaction_application_command_autocomplete_callback_integer_data import InteractionApplicationCommandAutocompleteCallbackIntegerData as InteractionApplicationCommandAutocompleteCallbackIntegerData
+from dc_rest.models.interaction_application_command_autocomplete_callback_number_data import InteractionApplicationCommandAutocompleteCallbackNumberData as InteractionApplicationCommandAutocompleteCallbackNumberData
+from dc_rest.models.interaction_application_command_autocomplete_callback_string_data import InteractionApplicationCommandAutocompleteCallbackStringData as InteractionApplicationCommandAutocompleteCallbackStringData
+from dc_rest.models.interaction_callback_response import InteractionCallbackResponse as InteractionCallbackResponse
+from dc_rest.models.interaction_callback_response_resource import InteractionCallbackResponseResource as InteractionCallbackResponseResource
+from dc_rest.models.interaction_response import InteractionResponse as InteractionResponse
+from dc_rest.models.invite_application_response import InviteApplicationResponse as InviteApplicationResponse
+from dc_rest.models.invite_channel_recipient_response import InviteChannelRecipientResponse as InviteChannelRecipientResponse
+from dc_rest.models.invite_channel_response import InviteChannelResponse as InviteChannelResponse
+from dc_rest.models.invite_guild_response import InviteGuildResponse as InviteGuildResponse
+from dc_rest.models.keyword_rule_response import KeywordRuleResponse as KeywordRuleResponse
+from dc_rest.models.keyword_trigger_metadata import KeywordTriggerMetadata as KeywordTriggerMetadata
+from dc_rest.models.keyword_trigger_metadata_response import KeywordTriggerMetadataResponse as KeywordTriggerMetadataResponse
+from dc_rest.models.keyword_upsert_request import KeywordUpsertRequest as KeywordUpsertRequest
+from dc_rest.models.keyword_upsert_request_partial import KeywordUpsertRequestPartial as KeywordUpsertRequestPartial
+from dc_rest.models.launch_activity_interaction_callback_request import LaunchActivityInteractionCallbackRequest as LaunchActivityInteractionCallbackRequest
+from dc_rest.models.launch_activity_interaction_callback_response import LaunchActivityInteractionCallbackResponse as LaunchActivityInteractionCallbackResponse
+from dc_rest.models.list_application_emojis_response import ListApplicationEmojisResponse as ListApplicationEmojisResponse
+from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner as ListAutoModerationRules200ResponseInner
+from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner as ListChannelInvites200ResponseInner
+from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner as ListChannelWebhooks200ResponseInner
+from dc_rest.models.list_guild_integrations200_response_inner import ListGuildIntegrations200ResponseInner as ListGuildIntegrations200ResponseInner
+from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner as ListGuildScheduledEvents200ResponseInner
+from dc_rest.models.list_guild_soundboard_sounds_response import ListGuildSoundboardSoundsResponse as ListGuildSoundboardSoundsResponse
+from dc_rest.models.lobby_member_request import LobbyMemberRequest as LobbyMemberRequest
+from dc_rest.models.lobby_member_response import LobbyMemberResponse as LobbyMemberResponse
+from dc_rest.models.lobby_message_response import LobbyMessageResponse as LobbyMessageResponse
+from dc_rest.models.lobby_response import LobbyResponse as LobbyResponse
+from dc_rest.models.ml_spam_rule_response import MLSpamRuleResponse as MLSpamRuleResponse
+from dc_rest.models.ml_spam_upsert_request import MLSpamUpsertRequest as MLSpamUpsertRequest
+from dc_rest.models.ml_spam_upsert_request_partial import MLSpamUpsertRequestPartial as MLSpamUpsertRequestPartial
+from dc_rest.models.media_gallery_component_for_message_request import MediaGalleryComponentForMessageRequest as MediaGalleryComponentForMessageRequest
+from dc_rest.models.media_gallery_component_response import MediaGalleryComponentResponse as MediaGalleryComponentResponse
+from dc_rest.models.media_gallery_item_request import MediaGalleryItemRequest as MediaGalleryItemRequest
+from dc_rest.models.media_gallery_item_response import MediaGalleryItemResponse as MediaGalleryItemResponse
+from dc_rest.models.mention_spam_rule_response import MentionSpamRuleResponse as MentionSpamRuleResponse
+from dc_rest.models.mention_spam_trigger_metadata import MentionSpamTriggerMetadata as MentionSpamTriggerMetadata
+from dc_rest.models.mention_spam_trigger_metadata_response import MentionSpamTriggerMetadataResponse as MentionSpamTriggerMetadataResponse
+from dc_rest.models.mention_spam_upsert_request import MentionSpamUpsertRequest as MentionSpamUpsertRequest
+from dc_rest.models.mention_spam_upsert_request_partial import MentionSpamUpsertRequestPartial as MentionSpamUpsertRequestPartial
+from dc_rest.models.mentionable_select_component_for_message_request import MentionableSelectComponentForMessageRequest as MentionableSelectComponentForMessageRequest
+from dc_rest.models.mentionable_select_component_for_message_request_default_values_inner import MentionableSelectComponentForMessageRequestDefaultValuesInner as MentionableSelectComponentForMessageRequestDefaultValuesInner
+from dc_rest.models.mentionable_select_component_response import MentionableSelectComponentResponse as MentionableSelectComponentResponse
+from dc_rest.models.mentionable_select_component_response_default_values_inner import MentionableSelectComponentResponseDefaultValuesInner as MentionableSelectComponentResponseDefaultValuesInner
+from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest as MessageAllowedMentionsRequest
+from dc_rest.models.message_attachment_request import MessageAttachmentRequest as MessageAttachmentRequest
+from dc_rest.models.message_attachment_response import MessageAttachmentResponse as MessageAttachmentResponse
+from dc_rest.models.message_call_response import MessageCallResponse as MessageCallResponse
+from dc_rest.models.message_component_interaction_metadata_response import MessageComponentInteractionMetadataResponse as MessageComponentInteractionMetadataResponse
+from dc_rest.models.message_create_request import MessageCreateRequest as MessageCreateRequest
+from dc_rest.models.message_edit_request_partial import MessageEditRequestPartial as MessageEditRequestPartial
+from dc_rest.models.message_embed_author_response import MessageEmbedAuthorResponse as MessageEmbedAuthorResponse
+from dc_rest.models.message_embed_field_response import MessageEmbedFieldResponse as MessageEmbedFieldResponse
+from dc_rest.models.message_embed_footer_response import MessageEmbedFooterResponse as MessageEmbedFooterResponse
+from dc_rest.models.message_embed_image_response import MessageEmbedImageResponse as MessageEmbedImageResponse
+from dc_rest.models.message_embed_provider_response import MessageEmbedProviderResponse as MessageEmbedProviderResponse
+from dc_rest.models.message_embed_response import MessageEmbedResponse as MessageEmbedResponse
+from dc_rest.models.message_embed_video_response import MessageEmbedVideoResponse as MessageEmbedVideoResponse
+from dc_rest.models.message_interaction_response import MessageInteractionResponse as MessageInteractionResponse
+from dc_rest.models.message_mention_channel_response import MessageMentionChannelResponse as MessageMentionChannelResponse
+from dc_rest.models.message_reaction_count_details_response import MessageReactionCountDetailsResponse as MessageReactionCountDetailsResponse
+from dc_rest.models.message_reaction_emoji_response import MessageReactionEmojiResponse as MessageReactionEmojiResponse
+from dc_rest.models.message_reaction_response import MessageReactionResponse as MessageReactionResponse
+from dc_rest.models.message_reference_request import MessageReferenceRequest as MessageReferenceRequest
+from dc_rest.models.message_reference_response import MessageReferenceResponse as MessageReferenceResponse
+from dc_rest.models.message_response import MessageResponse as MessageResponse
+from dc_rest.models.message_role_subscription_data_response import MessageRoleSubscriptionDataResponse as MessageRoleSubscriptionDataResponse
+from dc_rest.models.message_snapshot_response import MessageSnapshotResponse as MessageSnapshotResponse
+from dc_rest.models.message_sticker_item_response import MessageStickerItemResponse as MessageStickerItemResponse
+from dc_rest.models.minimal_content_message_response import MinimalContentMessageResponse as MinimalContentMessageResponse
+from dc_rest.models.modal_interaction_callback_request import ModalInteractionCallbackRequest as ModalInteractionCallbackRequest
+from dc_rest.models.modal_interaction_callback_request_data import ModalInteractionCallbackRequestData as ModalInteractionCallbackRequestData
+from dc_rest.models.modal_submit_interaction_metadata_response import ModalSubmitInteractionMetadataResponse as ModalSubmitInteractionMetadataResponse
+from dc_rest.models.modal_submit_interaction_metadata_response_triggering_interaction_metadata import ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata as ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata
+from dc_rest.models.my_guild_response import MyGuildResponse as MyGuildResponse
+from dc_rest.models.new_member_action_response import NewMemberActionResponse as NewMemberActionResponse
+from dc_rest.models.o_auth2_get_authorization_response import OAuth2GetAuthorizationResponse as OAuth2GetAuthorizationResponse
+from dc_rest.models.o_auth2_get_keys import OAuth2GetKeys as OAuth2GetKeys
+from dc_rest.models.o_auth2_get_open_id_connect_user_info_response import OAuth2GetOpenIDConnectUserInfoResponse as OAuth2GetOpenIDConnectUserInfoResponse
+from dc_rest.models.o_auth2_key import OAuth2Key as OAuth2Key
+from dc_rest.models.onboarding_prompt_option_request import OnboardingPromptOptionRequest as OnboardingPromptOptionRequest
+from dc_rest.models.onboarding_prompt_option_response import OnboardingPromptOptionResponse as OnboardingPromptOptionResponse
+from dc_rest.models.onboarding_prompt_response import OnboardingPromptResponse as OnboardingPromptResponse
+from dc_rest.models.partial_discord_integration_response import PartialDiscordIntegrationResponse as PartialDiscordIntegrationResponse
+from dc_rest.models.partial_external_connection_integration_response import PartialExternalConnectionIntegrationResponse as PartialExternalConnectionIntegrationResponse
+from dc_rest.models.partial_guild_subscription_integration_response import PartialGuildSubscriptionIntegrationResponse as PartialGuildSubscriptionIntegrationResponse
+from dc_rest.models.partner_sdk_unmerge_provisional_account_request import PartnerSdkUnmergeProvisionalAccountRequest as PartnerSdkUnmergeProvisionalAccountRequest
+from dc_rest.models.pinned_message_response import PinnedMessageResponse as PinnedMessageResponse
+from dc_rest.models.pinned_messages_response import PinnedMessagesResponse as PinnedMessagesResponse
+from dc_rest.models.poll_answer_create_request import PollAnswerCreateRequest as PollAnswerCreateRequest
+from dc_rest.models.poll_answer_details_response import PollAnswerDetailsResponse as PollAnswerDetailsResponse
+from dc_rest.models.poll_answer_response import PollAnswerResponse as PollAnswerResponse
+from dc_rest.models.poll_create_request import PollCreateRequest as PollCreateRequest
+from dc_rest.models.poll_emoji import PollEmoji as PollEmoji
+from dc_rest.models.poll_emoji_create_request import PollEmojiCreateRequest as PollEmojiCreateRequest
+from dc_rest.models.poll_media import PollMedia as PollMedia
+from dc_rest.models.poll_media_create_request import PollMediaCreateRequest as PollMediaCreateRequest
+from dc_rest.models.poll_media_response import PollMediaResponse as PollMediaResponse
+from dc_rest.models.poll_response import PollResponse as PollResponse
+from dc_rest.models.poll_results_entry_response import PollResultsEntryResponse as PollResultsEntryResponse
+from dc_rest.models.poll_results_response import PollResultsResponse as PollResultsResponse
+from dc_rest.models.pong_interaction_callback_request import PongInteractionCallbackRequest as PongInteractionCallbackRequest
+from dc_rest.models.private_application_response import PrivateApplicationResponse as PrivateApplicationResponse
+from dc_rest.models.private_channel_location import PrivateChannelLocation as PrivateChannelLocation
+from dc_rest.models.private_channel_response import PrivateChannelResponse as PrivateChannelResponse
+from dc_rest.models.private_group_channel_response import PrivateGroupChannelResponse as PrivateGroupChannelResponse
+from dc_rest.models.private_guild_member_response import PrivateGuildMemberResponse as PrivateGuildMemberResponse
+from dc_rest.models.provisional_token_response import ProvisionalTokenResponse as ProvisionalTokenResponse
+from dc_rest.models.prune_guild_request import PruneGuildRequest as PruneGuildRequest
+from dc_rest.models.prune_guild_request_include_roles import PruneGuildRequestIncludeRoles as PruneGuildRequestIncludeRoles
+from dc_rest.models.purchase_notification_response import PurchaseNotificationResponse as PurchaseNotificationResponse
+from dc_rest.models.quarantine_user_action import QuarantineUserAction as QuarantineUserAction
+from dc_rest.models.quarantine_user_action_response import QuarantineUserActionResponse as QuarantineUserActionResponse
+from dc_rest.models.resolved_objects_response import ResolvedObjectsResponse as ResolvedObjectsResponse
+from dc_rest.models.resource_channel_response import ResourceChannelResponse as ResourceChannelResponse
+from dc_rest.models.rich_embed import RichEmbed as RichEmbed
+from dc_rest.models.rich_embed_author import RichEmbedAuthor as RichEmbedAuthor
+from dc_rest.models.rich_embed_field import RichEmbedField as RichEmbedField
+from dc_rest.models.rich_embed_footer import RichEmbedFooter as RichEmbedFooter
+from dc_rest.models.rich_embed_image import RichEmbedImage as RichEmbedImage
+from dc_rest.models.rich_embed_provider import RichEmbedProvider as RichEmbedProvider
+from dc_rest.models.rich_embed_thumbnail import RichEmbedThumbnail as RichEmbedThumbnail
+from dc_rest.models.rich_embed_video import RichEmbedVideo as RichEmbedVideo
+from dc_rest.models.role_select_component_for_message_request import RoleSelectComponentForMessageRequest as RoleSelectComponentForMessageRequest
+from dc_rest.models.role_select_component_response import RoleSelectComponentResponse as RoleSelectComponentResponse
+from dc_rest.models.role_select_default_value import RoleSelectDefaultValue as RoleSelectDefaultValue
+from dc_rest.models.role_select_default_value_response import RoleSelectDefaultValueResponse as RoleSelectDefaultValueResponse
+from dc_rest.models.sdk_message_request import SDKMessageRequest as SDKMessageRequest
+from dc_rest.models.scheduled_event_response import ScheduledEventResponse as ScheduledEventResponse
+from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse as ScheduledEventUserResponse
+from dc_rest.models.section_component_for_message_request import SectionComponentForMessageRequest as SectionComponentForMessageRequest
+from dc_rest.models.section_component_for_message_request_accessory import SectionComponentForMessageRequestAccessory as SectionComponentForMessageRequestAccessory
+from dc_rest.models.section_component_response import SectionComponentResponse as SectionComponentResponse
+from dc_rest.models.section_component_response_accessory import SectionComponentResponseAccessory as SectionComponentResponseAccessory
+from dc_rest.models.separator_component_for_message_request import SeparatorComponentForMessageRequest as SeparatorComponentForMessageRequest
+from dc_rest.models.separator_component_response import SeparatorComponentResponse as SeparatorComponentResponse
+from dc_rest.models.set_channel_permission_overwrite_request import SetChannelPermissionOverwriteRequest as SetChannelPermissionOverwriteRequest
+from dc_rest.models.set_guild_application_command_permissions_request import SetGuildApplicationCommandPermissionsRequest as SetGuildApplicationCommandPermissionsRequest
+from dc_rest.models.set_guild_mfa_level_request import SetGuildMfaLevelRequest as SetGuildMfaLevelRequest
+from dc_rest.models.settings_emoji_response import SettingsEmojiResponse as SettingsEmojiResponse
+from dc_rest.models.slack_webhook import SlackWebhook as SlackWebhook
+from dc_rest.models.soundboard_create_request import SoundboardCreateRequest as SoundboardCreateRequest
+from dc_rest.models.soundboard_patch_request_partial import SoundboardPatchRequestPartial as SoundboardPatchRequestPartial
+from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse as SoundboardSoundResponse
+from dc_rest.models.soundboard_sound_send_request import SoundboardSoundSendRequest as SoundboardSoundSendRequest
+from dc_rest.models.spam_link_rule_response import SpamLinkRuleResponse as SpamLinkRuleResponse
+from dc_rest.models.stage_instance_response import StageInstanceResponse as StageInstanceResponse
+from dc_rest.models.stage_scheduled_event_create_request import StageScheduledEventCreateRequest as StageScheduledEventCreateRequest
+from dc_rest.models.stage_scheduled_event_patch_request_partial import StageScheduledEventPatchRequestPartial as StageScheduledEventPatchRequestPartial
+from dc_rest.models.stage_scheduled_event_response import StageScheduledEventResponse as StageScheduledEventResponse
+from dc_rest.models.standard_sticker_response import StandardStickerResponse as StandardStickerResponse
+from dc_rest.models.sticker_pack_collection_response import StickerPackCollectionResponse as StickerPackCollectionResponse
+from dc_rest.models.sticker_pack_response import StickerPackResponse as StickerPackResponse
+from dc_rest.models.string_select_component_for_message_request import StringSelectComponentForMessageRequest as StringSelectComponentForMessageRequest
+from dc_rest.models.string_select_component_response import StringSelectComponentResponse as StringSelectComponentResponse
+from dc_rest.models.string_select_option_for_message_request import StringSelectOptionForMessageRequest as StringSelectOptionForMessageRequest
+from dc_rest.models.string_select_option_response import StringSelectOptionResponse as StringSelectOptionResponse
+from dc_rest.models.team_member_response import TeamMemberResponse as TeamMemberResponse
+from dc_rest.models.team_response import TeamResponse as TeamResponse
+from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest as TextDisplayComponentForMessageRequest
+from dc_rest.models.text_display_component_response import TextDisplayComponentResponse as TextDisplayComponentResponse
+from dc_rest.models.text_input_component_for_modal_request import TextInputComponentForModalRequest as TextInputComponentForModalRequest
+from dc_rest.models.text_input_component_response import TextInputComponentResponse as TextInputComponentResponse
+from dc_rest.models.thread_member_response import ThreadMemberResponse as ThreadMemberResponse
+from dc_rest.models.thread_metadata_response import ThreadMetadataResponse as ThreadMetadataResponse
+from dc_rest.models.thread_response import ThreadResponse as ThreadResponse
+from dc_rest.models.thread_search_response import ThreadSearchResponse as ThreadSearchResponse
+from dc_rest.models.thread_search_tag_parameter import ThreadSearchTagParameter as ThreadSearchTagParameter
+from dc_rest.models.threads_response import ThreadsResponse as ThreadsResponse
+from dc_rest.models.thumbnail_component_for_message_request import ThumbnailComponentForMessageRequest as ThumbnailComponentForMessageRequest
+from dc_rest.models.thumbnail_component_response import ThumbnailComponentResponse as ThumbnailComponentResponse
+from dc_rest.models.unfurled_media_request import UnfurledMediaRequest as UnfurledMediaRequest
+from dc_rest.models.unfurled_media_request_with_attachment_reference_required import UnfurledMediaRequestWithAttachmentReferenceRequired as UnfurledMediaRequestWithAttachmentReferenceRequired
+from dc_rest.models.unfurled_media_response import UnfurledMediaResponse as UnfurledMediaResponse
+from dc_rest.models.update_application_emoji_request import UpdateApplicationEmojiRequest as UpdateApplicationEmojiRequest
+from dc_rest.models.update_application_user_role_connection_request import UpdateApplicationUserRoleConnectionRequest as UpdateApplicationUserRoleConnectionRequest
+from dc_rest.models.update_auto_moderation_rule_request import UpdateAutoModerationRuleRequest as UpdateAutoModerationRuleRequest
+from dc_rest.models.update_channel_request import UpdateChannelRequest as UpdateChannelRequest
+from dc_rest.models.update_dm_request_partial import UpdateDMRequestPartial as UpdateDMRequestPartial
+from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest as UpdateDefaultReactionEmojiRequest
+from dc_rest.models.update_group_dm_request_partial import UpdateGroupDMRequestPartial as UpdateGroupDMRequestPartial
+from dc_rest.models.update_guild_channel_request_partial import UpdateGuildChannelRequestPartial as UpdateGuildChannelRequestPartial
+from dc_rest.models.update_guild_emoji_request import UpdateGuildEmojiRequest as UpdateGuildEmojiRequest
+from dc_rest.models.update_guild_member_request import UpdateGuildMemberRequest as UpdateGuildMemberRequest
+from dc_rest.models.update_guild_onboarding_request import UpdateGuildOnboardingRequest as UpdateGuildOnboardingRequest
+from dc_rest.models.update_guild_scheduled_event_request import UpdateGuildScheduledEventRequest as UpdateGuildScheduledEventRequest
+from dc_rest.models.update_guild_sticker_request import UpdateGuildStickerRequest as UpdateGuildStickerRequest
+from dc_rest.models.update_guild_template_request import UpdateGuildTemplateRequest as UpdateGuildTemplateRequest
+from dc_rest.models.update_guild_widget_settings_request import UpdateGuildWidgetSettingsRequest as UpdateGuildWidgetSettingsRequest
+from dc_rest.models.update_message_interaction_callback_request import UpdateMessageInteractionCallbackRequest as UpdateMessageInteractionCallbackRequest
+from dc_rest.models.update_message_interaction_callback_response import UpdateMessageInteractionCallbackResponse as UpdateMessageInteractionCallbackResponse
+from dc_rest.models.update_my_guild_member_request import UpdateMyGuildMemberRequest as UpdateMyGuildMemberRequest
+from dc_rest.models.update_onboarding_prompt_request import UpdateOnboardingPromptRequest as UpdateOnboardingPromptRequest
+from dc_rest.models.update_self_voice_state_request import UpdateSelfVoiceStateRequest as UpdateSelfVoiceStateRequest
+from dc_rest.models.update_stage_instance_request import UpdateStageInstanceRequest as UpdateStageInstanceRequest
+from dc_rest.models.update_thread_request_partial import UpdateThreadRequestPartial as UpdateThreadRequestPartial
+from dc_rest.models.update_thread_tag_request import UpdateThreadTagRequest as UpdateThreadTagRequest
+from dc_rest.models.update_voice_state_request import UpdateVoiceStateRequest as UpdateVoiceStateRequest
+from dc_rest.models.update_webhook_by_token_request import UpdateWebhookByTokenRequest as UpdateWebhookByTokenRequest
+from dc_rest.models.update_webhook_request import UpdateWebhookRequest as UpdateWebhookRequest
+from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse as UserAvatarDecorationResponse
+from dc_rest.models.user_collectibles_response import UserCollectiblesResponse as UserCollectiblesResponse
+from dc_rest.models.user_communication_disabled_action import UserCommunicationDisabledAction as UserCommunicationDisabledAction
+from dc_rest.models.user_communication_disabled_action_metadata import UserCommunicationDisabledActionMetadata as UserCommunicationDisabledActionMetadata
+from dc_rest.models.user_communication_disabled_action_metadata_response import UserCommunicationDisabledActionMetadataResponse as UserCommunicationDisabledActionMetadataResponse
+from dc_rest.models.user_communication_disabled_action_response import UserCommunicationDisabledActionResponse as UserCommunicationDisabledActionResponse
+from dc_rest.models.user_guild_onboarding_response import UserGuildOnboardingResponse as UserGuildOnboardingResponse
+from dc_rest.models.user_nameplate_response import UserNameplateResponse as UserNameplateResponse
+from dc_rest.models.user_pii_response import UserPIIResponse as UserPIIResponse
+from dc_rest.models.user_primary_guild_response import UserPrimaryGuildResponse as UserPrimaryGuildResponse
+from dc_rest.models.user_response import UserResponse as UserResponse
+from dc_rest.models.user_select_component_for_message_request import UserSelectComponentForMessageRequest as UserSelectComponentForMessageRequest
+from dc_rest.models.user_select_component_response import UserSelectComponentResponse as UserSelectComponentResponse
+from dc_rest.models.user_select_default_value import UserSelectDefaultValue as UserSelectDefaultValue
+from dc_rest.models.user_select_default_value_response import UserSelectDefaultValueResponse as UserSelectDefaultValueResponse
+from dc_rest.models.vanity_url_error_response import VanityURLErrorResponse as VanityURLErrorResponse
+from dc_rest.models.vanity_url_response import VanityURLResponse as VanityURLResponse
+from dc_rest.models.voice_region_response import VoiceRegionResponse as VoiceRegionResponse
+from dc_rest.models.voice_scheduled_event_create_request import VoiceScheduledEventCreateRequest as VoiceScheduledEventCreateRequest
+from dc_rest.models.voice_scheduled_event_patch_request_partial import VoiceScheduledEventPatchRequestPartial as VoiceScheduledEventPatchRequestPartial
+from dc_rest.models.voice_scheduled_event_response import VoiceScheduledEventResponse as VoiceScheduledEventResponse
+from dc_rest.models.voice_state_response import VoiceStateResponse as VoiceStateResponse
+from dc_rest.models.webhook_slack_embed import WebhookSlackEmbed as WebhookSlackEmbed
+from dc_rest.models.webhook_slack_embed_field import WebhookSlackEmbedField as WebhookSlackEmbedField
+from dc_rest.models.webhook_source_channel_response import WebhookSourceChannelResponse as WebhookSourceChannelResponse
+from dc_rest.models.webhook_source_guild_response import WebhookSourceGuildResponse as WebhookSourceGuildResponse
+from dc_rest.models.welcome_message_response import WelcomeMessageResponse as WelcomeMessageResponse
+from dc_rest.models.welcome_screen_patch_request_partial import WelcomeScreenPatchRequestPartial as WelcomeScreenPatchRequestPartial
+from dc_rest.models.widget_activity import WidgetActivity as WidgetActivity
+from dc_rest.models.widget_channel import WidgetChannel as WidgetChannel
+from dc_rest.models.widget_member import WidgetMember as WidgetMember
+from dc_rest.models.widget_response import WidgetResponse as WidgetResponse
+from dc_rest.models.widget_settings_response import WidgetSettingsResponse as WidgetSettingsResponse
diff --git a/dc_rest/api/__init__.py b/dc_rest/api/__init__.py
new file mode 100644
index 0000000..5c51c5e
--- /dev/null
+++ b/dc_rest/api/__init__.py
@@ -0,0 +1,5 @@
+# flake8: noqa
+
+# import apis into api package
+from dc_rest.api.default_api import DefaultApi
+
diff --git a/dc_rest/api/default_api.py b/dc_rest/api/default_api.py
new file mode 100644
index 0000000..e075cdc
--- /dev/null
+++ b/dc_rest/api/default_api.py
@@ -0,0 +1,63438 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from datetime import datetime
+from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.activities_attachment_response import ActivitiesAttachmentResponse
+from dc_rest.models.add_group_dm_user201_response import AddGroupDmUser201Response
+from dc_rest.models.add_group_dm_user_request import AddGroupDmUserRequest
+from dc_rest.models.add_guild_member_request import AddGuildMemberRequest
+from dc_rest.models.add_lobby_member_request import AddLobbyMemberRequest
+from dc_rest.models.application_command_create_request import ApplicationCommandCreateRequest
+from dc_rest.models.application_command_patch_request_partial import ApplicationCommandPatchRequestPartial
+from dc_rest.models.application_command_response import ApplicationCommandResponse
+from dc_rest.models.application_command_update_request import ApplicationCommandUpdateRequest
+from dc_rest.models.application_form_partial import ApplicationFormPartial
+from dc_rest.models.application_role_connections_metadata_item_request import ApplicationRoleConnectionsMetadataItemRequest
+from dc_rest.models.application_role_connections_metadata_item_response import ApplicationRoleConnectionsMetadataItemResponse
+from dc_rest.models.application_user_role_connection_response import ApplicationUserRoleConnectionResponse
+from dc_rest.models.ban_user_from_guild_request import BanUserFromGuildRequest
+from dc_rest.models.bot_account_patch_request import BotAccountPatchRequest
+from dc_rest.models.bulk_ban_users_from_guild_request import BulkBanUsersFromGuildRequest
+from dc_rest.models.bulk_ban_users_response import BulkBanUsersResponse
+from dc_rest.models.bulk_delete_messages_request import BulkDeleteMessagesRequest
+from dc_rest.models.bulk_lobby_member_request import BulkLobbyMemberRequest
+from dc_rest.models.bulk_update_guild_channels_request_inner import BulkUpdateGuildChannelsRequestInner
+from dc_rest.models.bulk_update_guild_roles_request_inner import BulkUpdateGuildRolesRequestInner
+from dc_rest.models.channel_follower_response import ChannelFollowerResponse
+from dc_rest.models.command_permissions_response import CommandPermissionsResponse
+from dc_rest.models.connected_account_response import ConnectedAccountResponse
+from dc_rest.models.create_application_emoji_request import CreateApplicationEmojiRequest
+from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response
+from dc_rest.models.create_auto_moderation_rule_request import CreateAutoModerationRuleRequest
+from dc_rest.models.create_channel_invite_request import CreateChannelInviteRequest
+from dc_rest.models.create_entitlement_request_data import CreateEntitlementRequestData
+from dc_rest.models.create_guild_channel_request import CreateGuildChannelRequest
+from dc_rest.models.create_guild_emoji_request import CreateGuildEmojiRequest
+from dc_rest.models.create_guild_from_template_request import CreateGuildFromTemplateRequest
+from dc_rest.models.create_guild_role_request import CreateGuildRoleRequest
+from dc_rest.models.create_guild_scheduled_event_request import CreateGuildScheduledEventRequest
+from dc_rest.models.create_guild_template_request import CreateGuildTemplateRequest
+from dc_rest.models.create_interaction_response_request import CreateInteractionResponseRequest
+from dc_rest.models.create_lobby_request import CreateLobbyRequest
+from dc_rest.models.create_or_join_lobby_request import CreateOrJoinLobbyRequest
+from dc_rest.models.create_private_channel_request import CreatePrivateChannelRequest
+from dc_rest.models.create_stage_instance_request import CreateStageInstanceRequest
+from dc_rest.models.create_text_thread_with_message_request import CreateTextThreadWithMessageRequest
+from dc_rest.models.create_thread_request import CreateThreadRequest
+from dc_rest.models.create_webhook_request import CreateWebhookRequest
+from dc_rest.models.created_thread_response import CreatedThreadResponse
+from dc_rest.models.edit_lobby_channel_link_request import EditLobbyChannelLinkRequest
+from dc_rest.models.embedded_activity_instance import EmbeddedActivityInstance
+from dc_rest.models.emoji_response import EmojiResponse
+from dc_rest.models.entitlement_response import EntitlementResponse
+from dc_rest.models.execute_webhook_request import ExecuteWebhookRequest
+from dc_rest.models.follow_channel_request import FollowChannelRequest
+from dc_rest.models.gateway_bot_response import GatewayBotResponse
+from dc_rest.models.gateway_response import GatewayResponse
+from dc_rest.models.get_channel200_response import GetChannel200Response
+from dc_rest.models.get_sticker200_response import GetSticker200Response
+from dc_rest.models.github_webhook import GithubWebhook
+from dc_rest.models.guild_audit_log_response import GuildAuditLogResponse
+from dc_rest.models.guild_ban_response import GuildBanResponse
+from dc_rest.models.guild_channel_response import GuildChannelResponse
+from dc_rest.models.guild_create_request import GuildCreateRequest
+from dc_rest.models.guild_home_settings_response import GuildHomeSettingsResponse
+from dc_rest.models.guild_incoming_webhook_response import GuildIncomingWebhookResponse
+from dc_rest.models.guild_mfa_level_response import GuildMFALevelResponse
+from dc_rest.models.guild_member_response import GuildMemberResponse
+from dc_rest.models.guild_onboarding_response import GuildOnboardingResponse
+from dc_rest.models.guild_patch_request_partial import GuildPatchRequestPartial
+from dc_rest.models.guild_preview_response import GuildPreviewResponse
+from dc_rest.models.guild_prune_response import GuildPruneResponse
+from dc_rest.models.guild_response import GuildResponse
+from dc_rest.models.guild_role_response import GuildRoleResponse
+from dc_rest.models.guild_sticker_response import GuildStickerResponse
+from dc_rest.models.guild_template_response import GuildTemplateResponse
+from dc_rest.models.guild_welcome_screen_response import GuildWelcomeScreenResponse
+from dc_rest.models.guild_with_counts_response import GuildWithCountsResponse
+from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial
+from dc_rest.models.interaction_callback_response import InteractionCallbackResponse
+from dc_rest.models.list_application_emojis_response import ListApplicationEmojisResponse
+from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner
+from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner
+from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner
+from dc_rest.models.list_guild_integrations200_response_inner import ListGuildIntegrations200ResponseInner
+from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner
+from dc_rest.models.list_guild_soundboard_sounds_response import ListGuildSoundboardSoundsResponse
+from dc_rest.models.lobby_member_response import LobbyMemberResponse
+from dc_rest.models.lobby_message_response import LobbyMessageResponse
+from dc_rest.models.lobby_response import LobbyResponse
+from dc_rest.models.message_create_request import MessageCreateRequest
+from dc_rest.models.message_edit_request_partial import MessageEditRequestPartial
+from dc_rest.models.message_response import MessageResponse
+from dc_rest.models.my_guild_response import MyGuildResponse
+from dc_rest.models.o_auth2_get_authorization_response import OAuth2GetAuthorizationResponse
+from dc_rest.models.o_auth2_get_keys import OAuth2GetKeys
+from dc_rest.models.o_auth2_get_open_id_connect_user_info_response import OAuth2GetOpenIDConnectUserInfoResponse
+from dc_rest.models.partner_sdk_unmerge_provisional_account_request import PartnerSdkUnmergeProvisionalAccountRequest
+from dc_rest.models.pinned_messages_response import PinnedMessagesResponse
+from dc_rest.models.poll_answer_details_response import PollAnswerDetailsResponse
+from dc_rest.models.private_application_response import PrivateApplicationResponse
+from dc_rest.models.private_guild_member_response import PrivateGuildMemberResponse
+from dc_rest.models.provisional_token_response import ProvisionalTokenResponse
+from dc_rest.models.prune_guild_request import PruneGuildRequest
+from dc_rest.models.sdk_message_request import SDKMessageRequest
+from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse
+from dc_rest.models.set_channel_permission_overwrite_request import SetChannelPermissionOverwriteRequest
+from dc_rest.models.set_guild_application_command_permissions_request import SetGuildApplicationCommandPermissionsRequest
+from dc_rest.models.set_guild_mfa_level_request import SetGuildMfaLevelRequest
+from dc_rest.models.slack_webhook import SlackWebhook
+from dc_rest.models.soundboard_create_request import SoundboardCreateRequest
+from dc_rest.models.soundboard_patch_request_partial import SoundboardPatchRequestPartial
+from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse
+from dc_rest.models.soundboard_sound_send_request import SoundboardSoundSendRequest
+from dc_rest.models.stage_instance_response import StageInstanceResponse
+from dc_rest.models.sticker_pack_collection_response import StickerPackCollectionResponse
+from dc_rest.models.sticker_pack_response import StickerPackResponse
+from dc_rest.models.thread_member_response import ThreadMemberResponse
+from dc_rest.models.thread_response import ThreadResponse
+from dc_rest.models.thread_search_response import ThreadSearchResponse
+from dc_rest.models.threads_response import ThreadsResponse
+from dc_rest.models.update_application_emoji_request import UpdateApplicationEmojiRequest
+from dc_rest.models.update_application_user_role_connection_request import UpdateApplicationUserRoleConnectionRequest
+from dc_rest.models.update_auto_moderation_rule_request import UpdateAutoModerationRuleRequest
+from dc_rest.models.update_channel_request import UpdateChannelRequest
+from dc_rest.models.update_guild_emoji_request import UpdateGuildEmojiRequest
+from dc_rest.models.update_guild_member_request import UpdateGuildMemberRequest
+from dc_rest.models.update_guild_onboarding_request import UpdateGuildOnboardingRequest
+from dc_rest.models.update_guild_scheduled_event_request import UpdateGuildScheduledEventRequest
+from dc_rest.models.update_guild_sticker_request import UpdateGuildStickerRequest
+from dc_rest.models.update_guild_template_request import UpdateGuildTemplateRequest
+from dc_rest.models.update_guild_widget_settings_request import UpdateGuildWidgetSettingsRequest
+from dc_rest.models.update_my_guild_member_request import UpdateMyGuildMemberRequest
+from dc_rest.models.update_self_voice_state_request import UpdateSelfVoiceStateRequest
+from dc_rest.models.update_stage_instance_request import UpdateStageInstanceRequest
+from dc_rest.models.update_voice_state_request import UpdateVoiceStateRequest
+from dc_rest.models.update_webhook_by_token_request import UpdateWebhookByTokenRequest
+from dc_rest.models.update_webhook_request import UpdateWebhookRequest
+from dc_rest.models.user_guild_onboarding_response import UserGuildOnboardingResponse
+from dc_rest.models.user_pii_response import UserPIIResponse
+from dc_rest.models.user_response import UserResponse
+from dc_rest.models.vanity_url_response import VanityURLResponse
+from dc_rest.models.voice_region_response import VoiceRegionResponse
+from dc_rest.models.voice_state_response import VoiceStateResponse
+from dc_rest.models.welcome_screen_patch_request_partial import WelcomeScreenPatchRequestPartial
+from dc_rest.models.widget_response import WidgetResponse
+from dc_rest.models.widget_settings_response import WidgetSettingsResponse
+
+from dc_rest.api_client import ApiClient, RequestSerialized
+from dc_rest.api_response import ApiResponse
+from dc_rest.rest import RESTResponseType
+
+
+class DefaultApi:
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ async def add_group_dm_user(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ add_group_dm_user_request: AddGroupDmUserRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> AddGroupDmUser201Response:
+ """add_group_dm_user
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param add_group_dm_user_request: (required)
+ :type add_group_dm_user_request: AddGroupDmUserRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_group_dm_user_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ add_group_dm_user_request=add_group_dm_user_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "AddGroupDmUser201Response",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def add_group_dm_user_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ add_group_dm_user_request: AddGroupDmUserRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[AddGroupDmUser201Response]:
+ """add_group_dm_user
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param add_group_dm_user_request: (required)
+ :type add_group_dm_user_request: AddGroupDmUserRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_group_dm_user_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ add_group_dm_user_request=add_group_dm_user_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "AddGroupDmUser201Response",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def add_group_dm_user_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ add_group_dm_user_request: AddGroupDmUserRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """add_group_dm_user
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param add_group_dm_user_request: (required)
+ :type add_group_dm_user_request: AddGroupDmUserRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_group_dm_user_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ add_group_dm_user_request=add_group_dm_user_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "AddGroupDmUser201Response",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_group_dm_user_serialize(
+ self,
+ channel_id,
+ user_id,
+ add_group_dm_user_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if add_group_dm_user_request is not None:
+ _body_params = add_group_dm_user_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/channels/{channel_id}/recipients/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def add_guild_member(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ add_guild_member_request: AddGuildMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildMemberResponse:
+ """add_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param add_guild_member_request: (required)
+ :type add_guild_member_request: AddGuildMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ add_guild_member_request=add_guild_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildMemberResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def add_guild_member_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ add_guild_member_request: AddGuildMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildMemberResponse]:
+ """add_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param add_guild_member_request: (required)
+ :type add_guild_member_request: AddGuildMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ add_guild_member_request=add_guild_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildMemberResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def add_guild_member_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ add_guild_member_request: AddGuildMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """add_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param add_guild_member_request: (required)
+ :type add_guild_member_request: AddGuildMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ add_guild_member_request=add_guild_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildMemberResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_guild_member_serialize(
+ self,
+ guild_id,
+ user_id,
+ add_guild_member_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if add_guild_member_request is not None:
+ _body_params = add_guild_member_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/guilds/{guild_id}/members/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def add_guild_member_role(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """add_guild_member_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_guild_member_role_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def add_guild_member_role_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """add_guild_member_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_guild_member_role_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def add_guild_member_role_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """add_guild_member_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_guild_member_role_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_guild_member_role_serialize(
+ self,
+ guild_id,
+ user_id,
+ role_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ if role_id is not None:
+ _path_params['role_id'] = role_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/guilds/{guild_id}/members/{user_id}/roles/{role_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def add_lobby_member(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ add_lobby_member_request: AddLobbyMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> LobbyMemberResponse:
+ """add_lobby_member
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param add_lobby_member_request: (required)
+ :type add_lobby_member_request: AddLobbyMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_lobby_member_serialize(
+ lobby_id=lobby_id,
+ user_id=user_id,
+ add_lobby_member_request=add_lobby_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def add_lobby_member_with_http_info(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ add_lobby_member_request: AddLobbyMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[LobbyMemberResponse]:
+ """add_lobby_member
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param add_lobby_member_request: (required)
+ :type add_lobby_member_request: AddLobbyMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_lobby_member_serialize(
+ lobby_id=lobby_id,
+ user_id=user_id,
+ add_lobby_member_request=add_lobby_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def add_lobby_member_without_preload_content(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ add_lobby_member_request: AddLobbyMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """add_lobby_member
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param add_lobby_member_request: (required)
+ :type add_lobby_member_request: AddLobbyMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_lobby_member_serialize(
+ lobby_id=lobby_id,
+ user_id=user_id,
+ add_lobby_member_request=add_lobby_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_lobby_member_serialize(
+ self,
+ lobby_id,
+ user_id,
+ add_lobby_member_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if lobby_id is not None:
+ _path_params['lobby_id'] = lobby_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if add_lobby_member_request is not None:
+ _body_params = add_lobby_member_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/lobbies/{lobby_id}/members/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def add_my_message_reaction(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """add_my_message_reaction
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_my_message_reaction_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def add_my_message_reaction_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """add_my_message_reaction
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_my_message_reaction_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def add_my_message_reaction_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """add_my_message_reaction
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_my_message_reaction_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_my_message_reaction_serialize(
+ self,
+ channel_id,
+ message_id,
+ emoji_name,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ if emoji_name is not None:
+ _path_params['emoji_name'] = emoji_name
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def add_thread_member(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """add_thread_member
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_thread_member_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def add_thread_member_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """add_thread_member
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_thread_member_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def add_thread_member_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """add_thread_member
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_thread_member_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_thread_member_serialize(
+ self,
+ channel_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/channels/{channel_id}/thread-members/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def applications_get_activity_instance(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ instance_id: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EmbeddedActivityInstance:
+ """applications_get_activity_instance
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param instance_id: (required)
+ :type instance_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._applications_get_activity_instance_serialize(
+ application_id=application_id,
+ instance_id=instance_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmbeddedActivityInstance",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def applications_get_activity_instance_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ instance_id: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EmbeddedActivityInstance]:
+ """applications_get_activity_instance
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param instance_id: (required)
+ :type instance_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._applications_get_activity_instance_serialize(
+ application_id=application_id,
+ instance_id=instance_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmbeddedActivityInstance",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def applications_get_activity_instance_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ instance_id: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """applications_get_activity_instance
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param instance_id: (required)
+ :type instance_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._applications_get_activity_instance_serialize(
+ application_id=application_id,
+ instance_id=instance_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmbeddedActivityInstance",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _applications_get_activity_instance_serialize(
+ self,
+ application_id,
+ instance_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if instance_id is not None:
+ _path_params['instance_id'] = instance_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/activity-instances/{instance_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def ban_user_from_guild(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ ban_user_from_guild_request: BanUserFromGuildRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """ban_user_from_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param ban_user_from_guild_request: (required)
+ :type ban_user_from_guild_request: BanUserFromGuildRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._ban_user_from_guild_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ ban_user_from_guild_request=ban_user_from_guild_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def ban_user_from_guild_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ ban_user_from_guild_request: BanUserFromGuildRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """ban_user_from_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param ban_user_from_guild_request: (required)
+ :type ban_user_from_guild_request: BanUserFromGuildRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._ban_user_from_guild_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ ban_user_from_guild_request=ban_user_from_guild_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def ban_user_from_guild_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ ban_user_from_guild_request: BanUserFromGuildRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """ban_user_from_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param ban_user_from_guild_request: (required)
+ :type ban_user_from_guild_request: BanUserFromGuildRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._ban_user_from_guild_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ ban_user_from_guild_request=ban_user_from_guild_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _ban_user_from_guild_serialize(
+ self,
+ guild_id,
+ user_id,
+ ban_user_from_guild_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if ban_user_from_guild_request is not None:
+ _body_params = ban_user_from_guild_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/guilds/{guild_id}/bans/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def bulk_ban_users_from_guild(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> BulkBanUsersResponse:
+ """bulk_ban_users_from_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param bulk_ban_users_from_guild_request: (required)
+ :type bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_ban_users_from_guild_serialize(
+ guild_id=guild_id,
+ bulk_ban_users_from_guild_request=bulk_ban_users_from_guild_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BulkBanUsersResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def bulk_ban_users_from_guild_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[BulkBanUsersResponse]:
+ """bulk_ban_users_from_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param bulk_ban_users_from_guild_request: (required)
+ :type bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_ban_users_from_guild_serialize(
+ guild_id=guild_id,
+ bulk_ban_users_from_guild_request=bulk_ban_users_from_guild_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BulkBanUsersResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def bulk_ban_users_from_guild_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """bulk_ban_users_from_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param bulk_ban_users_from_guild_request: (required)
+ :type bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_ban_users_from_guild_serialize(
+ guild_id=guild_id,
+ bulk_ban_users_from_guild_request=bulk_ban_users_from_guild_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BulkBanUsersResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _bulk_ban_users_from_guild_serialize(
+ self,
+ guild_id,
+ bulk_ban_users_from_guild_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if bulk_ban_users_from_guild_request is not None:
+ _body_params = bulk_ban_users_from_guild_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/bulk-ban',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def bulk_delete_messages(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ bulk_delete_messages_request: BulkDeleteMessagesRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """bulk_delete_messages
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param bulk_delete_messages_request: (required)
+ :type bulk_delete_messages_request: BulkDeleteMessagesRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_delete_messages_serialize(
+ channel_id=channel_id,
+ bulk_delete_messages_request=bulk_delete_messages_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def bulk_delete_messages_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ bulk_delete_messages_request: BulkDeleteMessagesRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """bulk_delete_messages
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param bulk_delete_messages_request: (required)
+ :type bulk_delete_messages_request: BulkDeleteMessagesRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_delete_messages_serialize(
+ channel_id=channel_id,
+ bulk_delete_messages_request=bulk_delete_messages_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def bulk_delete_messages_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ bulk_delete_messages_request: BulkDeleteMessagesRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """bulk_delete_messages
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param bulk_delete_messages_request: (required)
+ :type bulk_delete_messages_request: BulkDeleteMessagesRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_delete_messages_serialize(
+ channel_id=channel_id,
+ bulk_delete_messages_request=bulk_delete_messages_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _bulk_delete_messages_serialize(
+ self,
+ channel_id,
+ bulk_delete_messages_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if bulk_delete_messages_request is not None:
+ _body_params = bulk_delete_messages_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/messages/bulk-delete',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def bulk_set_application_commands(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ApplicationCommandResponse]:
+ """bulk_set_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_command_update_request: (required)
+ :type application_command_update_request: List[ApplicationCommandUpdateRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_set_application_commands_serialize(
+ application_id=application_id,
+ application_command_update_request=application_command_update_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def bulk_set_application_commands_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ApplicationCommandResponse]]:
+ """bulk_set_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_command_update_request: (required)
+ :type application_command_update_request: List[ApplicationCommandUpdateRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_set_application_commands_serialize(
+ application_id=application_id,
+ application_command_update_request=application_command_update_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def bulk_set_application_commands_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """bulk_set_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_command_update_request: (required)
+ :type application_command_update_request: List[ApplicationCommandUpdateRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_set_application_commands_serialize(
+ application_id=application_id,
+ application_command_update_request=application_command_update_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _bulk_set_application_commands_serialize(
+ self,
+ application_id,
+ application_command_update_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'ApplicationCommandUpdateRequest': '',
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if application_command_update_request is not None:
+ _body_params = application_command_update_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/applications/{application_id}/commands',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def bulk_set_guild_application_commands(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ApplicationCommandResponse]:
+ """bulk_set_guild_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param application_command_update_request: (required)
+ :type application_command_update_request: List[ApplicationCommandUpdateRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_set_guild_application_commands_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ application_command_update_request=application_command_update_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def bulk_set_guild_application_commands_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ApplicationCommandResponse]]:
+ """bulk_set_guild_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param application_command_update_request: (required)
+ :type application_command_update_request: List[ApplicationCommandUpdateRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_set_guild_application_commands_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ application_command_update_request=application_command_update_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def bulk_set_guild_application_commands_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """bulk_set_guild_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param application_command_update_request: (required)
+ :type application_command_update_request: List[ApplicationCommandUpdateRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_set_guild_application_commands_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ application_command_update_request=application_command_update_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _bulk_set_guild_application_commands_serialize(
+ self,
+ application_id,
+ guild_id,
+ application_command_update_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'ApplicationCommandUpdateRequest': '',
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if application_command_update_request is not None:
+ _body_params = application_command_update_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/applications/{application_id}/guilds/{guild_id}/commands',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def bulk_update_guild_channels(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """bulk_update_guild_channels
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param bulk_update_guild_channels_request_inner: (required)
+ :type bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_update_guild_channels_serialize(
+ guild_id=guild_id,
+ bulk_update_guild_channels_request_inner=bulk_update_guild_channels_request_inner,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def bulk_update_guild_channels_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """bulk_update_guild_channels
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param bulk_update_guild_channels_request_inner: (required)
+ :type bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_update_guild_channels_serialize(
+ guild_id=guild_id,
+ bulk_update_guild_channels_request_inner=bulk_update_guild_channels_request_inner,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def bulk_update_guild_channels_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """bulk_update_guild_channels
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param bulk_update_guild_channels_request_inner: (required)
+ :type bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_update_guild_channels_serialize(
+ guild_id=guild_id,
+ bulk_update_guild_channels_request_inner=bulk_update_guild_channels_request_inner,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _bulk_update_guild_channels_serialize(
+ self,
+ guild_id,
+ bulk_update_guild_channels_request_inner,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'BulkUpdateGuildChannelsRequestInner': '',
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if bulk_update_guild_channels_request_inner is not None:
+ _body_params = bulk_update_guild_channels_request_inner
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/channels',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def bulk_update_guild_roles(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GuildRoleResponse]:
+ """bulk_update_guild_roles
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param bulk_update_guild_roles_request_inner: (required)
+ :type bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_update_guild_roles_serialize(
+ guild_id=guild_id,
+ bulk_update_guild_roles_request_inner=bulk_update_guild_roles_request_inner,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildRoleResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def bulk_update_guild_roles_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GuildRoleResponse]]:
+ """bulk_update_guild_roles
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param bulk_update_guild_roles_request_inner: (required)
+ :type bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_update_guild_roles_serialize(
+ guild_id=guild_id,
+ bulk_update_guild_roles_request_inner=bulk_update_guild_roles_request_inner,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildRoleResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def bulk_update_guild_roles_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """bulk_update_guild_roles
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param bulk_update_guild_roles_request_inner: (required)
+ :type bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_update_guild_roles_serialize(
+ guild_id=guild_id,
+ bulk_update_guild_roles_request_inner=bulk_update_guild_roles_request_inner,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildRoleResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _bulk_update_guild_roles_serialize(
+ self,
+ guild_id,
+ bulk_update_guild_roles_request_inner,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'BulkUpdateGuildRolesRequestInner': '',
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if bulk_update_guild_roles_request_inner is not None:
+ _body_params = bulk_update_guild_roles_request_inner
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/roles',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def bulk_update_lobby_members(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ bulk_lobby_member_request: Optional[Annotated[List[BulkLobbyMemberRequest], Field(min_length=1, max_length=25)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[LobbyMemberResponse]:
+ """bulk_update_lobby_members
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param bulk_lobby_member_request: (required)
+ :type bulk_lobby_member_request: List[BulkLobbyMemberRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_update_lobby_members_serialize(
+ lobby_id=lobby_id,
+ bulk_lobby_member_request=bulk_lobby_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[LobbyMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def bulk_update_lobby_members_with_http_info(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ bulk_lobby_member_request: Optional[Annotated[List[BulkLobbyMemberRequest], Field(min_length=1, max_length=25)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[LobbyMemberResponse]]:
+ """bulk_update_lobby_members
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param bulk_lobby_member_request: (required)
+ :type bulk_lobby_member_request: List[BulkLobbyMemberRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_update_lobby_members_serialize(
+ lobby_id=lobby_id,
+ bulk_lobby_member_request=bulk_lobby_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[LobbyMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def bulk_update_lobby_members_without_preload_content(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ bulk_lobby_member_request: Optional[Annotated[List[BulkLobbyMemberRequest], Field(min_length=1, max_length=25)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """bulk_update_lobby_members
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param bulk_lobby_member_request: (required)
+ :type bulk_lobby_member_request: List[BulkLobbyMemberRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._bulk_update_lobby_members_serialize(
+ lobby_id=lobby_id,
+ bulk_lobby_member_request=bulk_lobby_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[LobbyMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _bulk_update_lobby_members_serialize(
+ self,
+ lobby_id,
+ bulk_lobby_member_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'BulkLobbyMemberRequest': '',
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if lobby_id is not None:
+ _path_params['lobby_id'] = lobby_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if bulk_lobby_member_request is not None:
+ _body_params = bulk_lobby_member_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/lobbies/{lobby_id}/members/bulk',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def consume_entitlement(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ entitlement_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """consume_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param entitlement_id: (required)
+ :type entitlement_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._consume_entitlement_serialize(
+ application_id=application_id,
+ entitlement_id=entitlement_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def consume_entitlement_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ entitlement_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """consume_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param entitlement_id: (required)
+ :type entitlement_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._consume_entitlement_serialize(
+ application_id=application_id,
+ entitlement_id=entitlement_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def consume_entitlement_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ entitlement_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """consume_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param entitlement_id: (required)
+ :type entitlement_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._consume_entitlement_serialize(
+ application_id=application_id,
+ entitlement_id=entitlement_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _consume_entitlement_serialize(
+ self,
+ application_id,
+ entitlement_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if entitlement_id is not None:
+ _path_params['entitlement_id'] = entitlement_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/applications/{application_id}/entitlements/{entitlement_id}/consume',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_application_command(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_command_create_request: ApplicationCommandCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApplicationCommandResponse:
+ """create_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_command_create_request: (required)
+ :type application_command_create_request: ApplicationCommandCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_application_command_serialize(
+ application_id=application_id,
+ application_command_create_request=application_command_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '201': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_application_command_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_command_create_request: ApplicationCommandCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ApplicationCommandResponse]:
+ """create_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_command_create_request: (required)
+ :type application_command_create_request: ApplicationCommandCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_application_command_serialize(
+ application_id=application_id,
+ application_command_create_request=application_command_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '201': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_application_command_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_command_create_request: ApplicationCommandCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_command_create_request: (required)
+ :type application_command_create_request: ApplicationCommandCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_application_command_serialize(
+ application_id=application_id,
+ application_command_create_request=application_command_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '201': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_application_command_serialize(
+ self,
+ application_id,
+ application_command_create_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if application_command_create_request is not None:
+ _body_params = application_command_create_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/applications/{application_id}/commands',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_application_emoji(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ create_application_emoji_request: CreateApplicationEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EmojiResponse:
+ """create_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param create_application_emoji_request: (required)
+ :type create_application_emoji_request: CreateApplicationEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_application_emoji_serialize(
+ application_id=application_id,
+ create_application_emoji_request=create_application_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_application_emoji_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ create_application_emoji_request: CreateApplicationEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EmojiResponse]:
+ """create_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param create_application_emoji_request: (required)
+ :type create_application_emoji_request: CreateApplicationEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_application_emoji_serialize(
+ application_id=application_id,
+ create_application_emoji_request=create_application_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_application_emoji_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ create_application_emoji_request: CreateApplicationEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param create_application_emoji_request: (required)
+ :type create_application_emoji_request: CreateApplicationEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_application_emoji_serialize(
+ application_id=application_id,
+ create_application_emoji_request=create_application_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_application_emoji_serialize(
+ self,
+ application_id,
+ create_application_emoji_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_application_emoji_request is not None:
+ _body_params = create_application_emoji_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/applications/{application_id}/emojis',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_auto_moderation_rule(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_auto_moderation_rule_request: CreateAutoModerationRuleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateAutoModerationRule200Response:
+ """create_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_auto_moderation_rule_request: (required)
+ :type create_auto_moderation_rule_request: CreateAutoModerationRuleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ create_auto_moderation_rule_request=create_auto_moderation_rule_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateAutoModerationRule200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_auto_moderation_rule_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_auto_moderation_rule_request: CreateAutoModerationRuleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateAutoModerationRule200Response]:
+ """create_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_auto_moderation_rule_request: (required)
+ :type create_auto_moderation_rule_request: CreateAutoModerationRuleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ create_auto_moderation_rule_request=create_auto_moderation_rule_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateAutoModerationRule200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_auto_moderation_rule_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_auto_moderation_rule_request: CreateAutoModerationRuleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_auto_moderation_rule_request: (required)
+ :type create_auto_moderation_rule_request: CreateAutoModerationRuleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ create_auto_moderation_rule_request=create_auto_moderation_rule_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateAutoModerationRule200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_auto_moderation_rule_serialize(
+ self,
+ guild_id,
+ create_auto_moderation_rule_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_auto_moderation_rule_request is not None:
+ _body_params = create_auto_moderation_rule_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/auto-moderation/rules',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_channel_invite(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ create_channel_invite_request: CreateChannelInviteRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListChannelInvites200ResponseInner:
+ """create_channel_invite
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param create_channel_invite_request: (required)
+ :type create_channel_invite_request: CreateChannelInviteRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_channel_invite_serialize(
+ channel_id=channel_id,
+ create_channel_invite_request=create_channel_invite_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelInvites200ResponseInner",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_channel_invite_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ create_channel_invite_request: CreateChannelInviteRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListChannelInvites200ResponseInner]:
+ """create_channel_invite
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param create_channel_invite_request: (required)
+ :type create_channel_invite_request: CreateChannelInviteRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_channel_invite_serialize(
+ channel_id=channel_id,
+ create_channel_invite_request=create_channel_invite_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelInvites200ResponseInner",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_channel_invite_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ create_channel_invite_request: CreateChannelInviteRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_channel_invite
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param create_channel_invite_request: (required)
+ :type create_channel_invite_request: CreateChannelInviteRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_channel_invite_serialize(
+ channel_id=channel_id,
+ create_channel_invite_request=create_channel_invite_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelInvites200ResponseInner",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_channel_invite_serialize(
+ self,
+ channel_id,
+ create_channel_invite_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_channel_invite_request is not None:
+ _body_params = create_channel_invite_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/invites',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_dm(
+ self,
+ create_private_channel_request: CreatePrivateChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> AddGroupDmUser201Response:
+ """create_dm
+
+
+ :param create_private_channel_request: (required)
+ :type create_private_channel_request: CreatePrivateChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_dm_serialize(
+ create_private_channel_request=create_private_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AddGroupDmUser201Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_dm_with_http_info(
+ self,
+ create_private_channel_request: CreatePrivateChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[AddGroupDmUser201Response]:
+ """create_dm
+
+
+ :param create_private_channel_request: (required)
+ :type create_private_channel_request: CreatePrivateChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_dm_serialize(
+ create_private_channel_request=create_private_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AddGroupDmUser201Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_dm_without_preload_content(
+ self,
+ create_private_channel_request: CreatePrivateChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_dm
+
+
+ :param create_private_channel_request: (required)
+ :type create_private_channel_request: CreatePrivateChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_dm_serialize(
+ create_private_channel_request=create_private_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AddGroupDmUser201Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_dm_serialize(
+ self,
+ create_private_channel_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_private_channel_request is not None:
+ _body_params = create_private_channel_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/users/@me/channels',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_entitlement(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ create_entitlement_request_data: CreateEntitlementRequestData,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EntitlementResponse:
+ """create_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param create_entitlement_request_data: (required)
+ :type create_entitlement_request_data: CreateEntitlementRequestData
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_entitlement_serialize(
+ application_id=application_id,
+ create_entitlement_request_data=create_entitlement_request_data,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EntitlementResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_entitlement_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ create_entitlement_request_data: CreateEntitlementRequestData,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EntitlementResponse]:
+ """create_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param create_entitlement_request_data: (required)
+ :type create_entitlement_request_data: CreateEntitlementRequestData
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_entitlement_serialize(
+ application_id=application_id,
+ create_entitlement_request_data=create_entitlement_request_data,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EntitlementResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_entitlement_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ create_entitlement_request_data: CreateEntitlementRequestData,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param create_entitlement_request_data: (required)
+ :type create_entitlement_request_data: CreateEntitlementRequestData
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_entitlement_serialize(
+ application_id=application_id,
+ create_entitlement_request_data=create_entitlement_request_data,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EntitlementResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_entitlement_serialize(
+ self,
+ application_id,
+ create_entitlement_request_data,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_entitlement_request_data is not None:
+ _body_params = create_entitlement_request_data
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/applications/{application_id}/entitlements',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_guild(
+ self,
+ guild_create_request: GuildCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildResponse:
+ """create_guild
+
+
+ :param guild_create_request: (required)
+ :type guild_create_request: GuildCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_serialize(
+ guild_create_request=guild_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_guild_with_http_info(
+ self,
+ guild_create_request: GuildCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildResponse]:
+ """create_guild
+
+
+ :param guild_create_request: (required)
+ :type guild_create_request: GuildCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_serialize(
+ guild_create_request=guild_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_guild_without_preload_content(
+ self,
+ guild_create_request: GuildCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_guild
+
+
+ :param guild_create_request: (required)
+ :type guild_create_request: GuildCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_serialize(
+ guild_create_request=guild_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_guild_serialize(
+ self,
+ guild_create_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if guild_create_request is not None:
+ _body_params = guild_create_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_guild_application_command(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ application_command_create_request: ApplicationCommandCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApplicationCommandResponse:
+ """create_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param application_command_create_request: (required)
+ :type application_command_create_request: ApplicationCommandCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ application_command_create_request=application_command_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '201': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_guild_application_command_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ application_command_create_request: ApplicationCommandCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ApplicationCommandResponse]:
+ """create_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param application_command_create_request: (required)
+ :type application_command_create_request: ApplicationCommandCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ application_command_create_request=application_command_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '201': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_guild_application_command_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ application_command_create_request: ApplicationCommandCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param application_command_create_request: (required)
+ :type application_command_create_request: ApplicationCommandCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ application_command_create_request=application_command_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '201': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_guild_application_command_serialize(
+ self,
+ application_id,
+ guild_id,
+ application_command_create_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if application_command_create_request is not None:
+ _body_params = application_command_create_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/applications/{application_id}/guilds/{guild_id}/commands',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_guild_channel(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_channel_request: CreateGuildChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildChannelResponse:
+ """create_guild_channel
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_channel_request: (required)
+ :type create_guild_channel_request: CreateGuildChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_channel_serialize(
+ guild_id=guild_id,
+ create_guild_channel_request=create_guild_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildChannelResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_guild_channel_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_channel_request: CreateGuildChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildChannelResponse]:
+ """create_guild_channel
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_channel_request: (required)
+ :type create_guild_channel_request: CreateGuildChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_channel_serialize(
+ guild_id=guild_id,
+ create_guild_channel_request=create_guild_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildChannelResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_guild_channel_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_channel_request: CreateGuildChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_guild_channel
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_channel_request: (required)
+ :type create_guild_channel_request: CreateGuildChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_channel_serialize(
+ guild_id=guild_id,
+ create_guild_channel_request=create_guild_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildChannelResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_guild_channel_serialize(
+ self,
+ guild_id,
+ create_guild_channel_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_guild_channel_request is not None:
+ _body_params = create_guild_channel_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/channels',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_guild_emoji(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_emoji_request: CreateGuildEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EmojiResponse:
+ """create_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_emoji_request: (required)
+ :type create_guild_emoji_request: CreateGuildEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_emoji_serialize(
+ guild_id=guild_id,
+ create_guild_emoji_request=create_guild_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_guild_emoji_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_emoji_request: CreateGuildEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EmojiResponse]:
+ """create_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_emoji_request: (required)
+ :type create_guild_emoji_request: CreateGuildEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_emoji_serialize(
+ guild_id=guild_id,
+ create_guild_emoji_request=create_guild_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_guild_emoji_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_emoji_request: CreateGuildEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_emoji_request: (required)
+ :type create_guild_emoji_request: CreateGuildEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_emoji_serialize(
+ guild_id=guild_id,
+ create_guild_emoji_request=create_guild_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_guild_emoji_serialize(
+ self,
+ guild_id,
+ create_guild_emoji_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_guild_emoji_request is not None:
+ _body_params = create_guild_emoji_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/emojis',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_guild_from_template(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ create_guild_from_template_request: CreateGuildFromTemplateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildResponse:
+ """create_guild_from_template
+
+
+ :param code: (required)
+ :type code: str
+ :param create_guild_from_template_request: (required)
+ :type create_guild_from_template_request: CreateGuildFromTemplateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_from_template_serialize(
+ code=code,
+ create_guild_from_template_request=create_guild_from_template_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_guild_from_template_with_http_info(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ create_guild_from_template_request: CreateGuildFromTemplateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildResponse]:
+ """create_guild_from_template
+
+
+ :param code: (required)
+ :type code: str
+ :param create_guild_from_template_request: (required)
+ :type create_guild_from_template_request: CreateGuildFromTemplateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_from_template_serialize(
+ code=code,
+ create_guild_from_template_request=create_guild_from_template_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_guild_from_template_without_preload_content(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ create_guild_from_template_request: CreateGuildFromTemplateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_guild_from_template
+
+
+ :param code: (required)
+ :type code: str
+ :param create_guild_from_template_request: (required)
+ :type create_guild_from_template_request: CreateGuildFromTemplateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_from_template_serialize(
+ code=code,
+ create_guild_from_template_request=create_guild_from_template_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_guild_from_template_serialize(
+ self,
+ code,
+ create_guild_from_template_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if code is not None:
+ _path_params['code'] = code
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_guild_from_template_request is not None:
+ _body_params = create_guild_from_template_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/templates/{code}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_guild_role(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_role_request: CreateGuildRoleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildRoleResponse:
+ """create_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_role_request: (required)
+ :type create_guild_role_request: CreateGuildRoleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_role_serialize(
+ guild_id=guild_id,
+ create_guild_role_request=create_guild_role_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildRoleResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_guild_role_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_role_request: CreateGuildRoleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildRoleResponse]:
+ """create_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_role_request: (required)
+ :type create_guild_role_request: CreateGuildRoleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_role_serialize(
+ guild_id=guild_id,
+ create_guild_role_request=create_guild_role_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildRoleResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_guild_role_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_role_request: CreateGuildRoleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_role_request: (required)
+ :type create_guild_role_request: CreateGuildRoleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_role_serialize(
+ guild_id=guild_id,
+ create_guild_role_request=create_guild_role_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildRoleResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_guild_role_serialize(
+ self,
+ guild_id,
+ create_guild_role_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_guild_role_request is not None:
+ _body_params = create_guild_role_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/roles',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_guild_scheduled_event(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_scheduled_event_request: CreateGuildScheduledEventRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListGuildScheduledEvents200ResponseInner:
+ """create_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_scheduled_event_request: (required)
+ :type create_guild_scheduled_event_request: CreateGuildScheduledEventRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ create_guild_scheduled_event_request=create_guild_scheduled_event_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildScheduledEvents200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_guild_scheduled_event_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_scheduled_event_request: CreateGuildScheduledEventRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListGuildScheduledEvents200ResponseInner]:
+ """create_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_scheduled_event_request: (required)
+ :type create_guild_scheduled_event_request: CreateGuildScheduledEventRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ create_guild_scheduled_event_request=create_guild_scheduled_event_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildScheduledEvents200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_guild_scheduled_event_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_scheduled_event_request: CreateGuildScheduledEventRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_scheduled_event_request: (required)
+ :type create_guild_scheduled_event_request: CreateGuildScheduledEventRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ create_guild_scheduled_event_request=create_guild_scheduled_event_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildScheduledEvents200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_guild_scheduled_event_serialize(
+ self,
+ guild_id,
+ create_guild_scheduled_event_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_guild_scheduled_event_request is not None:
+ _body_params = create_guild_scheduled_event_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/scheduled-events',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_guild_soundboard_sound(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ soundboard_create_request: SoundboardCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SoundboardSoundResponse:
+ """create_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param soundboard_create_request: (required)
+ :type soundboard_create_request: SoundboardCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ soundboard_create_request=soundboard_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "SoundboardSoundResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_guild_soundboard_sound_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ soundboard_create_request: SoundboardCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SoundboardSoundResponse]:
+ """create_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param soundboard_create_request: (required)
+ :type soundboard_create_request: SoundboardCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ soundboard_create_request=soundboard_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "SoundboardSoundResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_guild_soundboard_sound_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ soundboard_create_request: SoundboardCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param soundboard_create_request: (required)
+ :type soundboard_create_request: SoundboardCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ soundboard_create_request=soundboard_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "SoundboardSoundResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_guild_soundboard_sound_serialize(
+ self,
+ guild_id,
+ soundboard_create_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if soundboard_create_request is not None:
+ _body_params = soundboard_create_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/soundboard-sounds',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_guild_sticker(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ name: Annotated[str, Field(min_length=2, strict=True, max_length=30)],
+ tags: Annotated[str, Field(min_length=1, strict=True, max_length=200)],
+ file: StrictStr,
+ description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildStickerResponse:
+ """create_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param name: (required)
+ :type name: str
+ :param tags: (required)
+ :type tags: str
+ :param file: (required)
+ :type file: str
+ :param description:
+ :type description: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_sticker_serialize(
+ guild_id=guild_id,
+ name=name,
+ tags=tags,
+ file=file,
+ description=description,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildStickerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_guild_sticker_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ name: Annotated[str, Field(min_length=2, strict=True, max_length=30)],
+ tags: Annotated[str, Field(min_length=1, strict=True, max_length=200)],
+ file: StrictStr,
+ description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildStickerResponse]:
+ """create_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param name: (required)
+ :type name: str
+ :param tags: (required)
+ :type tags: str
+ :param file: (required)
+ :type file: str
+ :param description:
+ :type description: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_sticker_serialize(
+ guild_id=guild_id,
+ name=name,
+ tags=tags,
+ file=file,
+ description=description,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildStickerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_guild_sticker_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ name: Annotated[str, Field(min_length=2, strict=True, max_length=30)],
+ tags: Annotated[str, Field(min_length=1, strict=True, max_length=200)],
+ file: StrictStr,
+ description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param name: (required)
+ :type name: str
+ :param tags: (required)
+ :type tags: str
+ :param file: (required)
+ :type file: str
+ :param description:
+ :type description: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_sticker_serialize(
+ guild_id=guild_id,
+ name=name,
+ tags=tags,
+ file=file,
+ description=description,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GuildStickerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_guild_sticker_serialize(
+ self,
+ guild_id,
+ name,
+ tags,
+ file,
+ description,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ if name is not None:
+ _form_params.append(('name', name))
+ if tags is not None:
+ _form_params.append(('tags', tags))
+ if description is not None:
+ _form_params.append(('description', description))
+ if file is not None:
+ _form_params.append(('file', file))
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/stickers',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_guild_template(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_template_request: CreateGuildTemplateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildTemplateResponse:
+ """create_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_template_request: (required)
+ :type create_guild_template_request: CreateGuildTemplateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_template_serialize(
+ guild_id=guild_id,
+ create_guild_template_request=create_guild_template_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_guild_template_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_template_request: CreateGuildTemplateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildTemplateResponse]:
+ """create_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_template_request: (required)
+ :type create_guild_template_request: CreateGuildTemplateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_template_serialize(
+ guild_id=guild_id,
+ create_guild_template_request=create_guild_template_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_guild_template_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ create_guild_template_request: CreateGuildTemplateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param create_guild_template_request: (required)
+ :type create_guild_template_request: CreateGuildTemplateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_guild_template_serialize(
+ guild_id=guild_id,
+ create_guild_template_request=create_guild_template_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_guild_template_serialize(
+ self,
+ guild_id,
+ create_guild_template_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_guild_template_request is not None:
+ _body_params = create_guild_template_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/templates',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_interaction_response(
+ self,
+ interaction_id: Annotated[str, Field(strict=True)],
+ interaction_token: Annotated[str, Field(strict=True, max_length=152133)],
+ create_interaction_response_request: CreateInteractionResponseRequest,
+ with_response: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> InteractionCallbackResponse:
+ """create_interaction_response
+
+
+ :param interaction_id: (required)
+ :type interaction_id: str
+ :param interaction_token: (required)
+ :type interaction_token: str
+ :param create_interaction_response_request: (required)
+ :type create_interaction_response_request: CreateInteractionResponseRequest
+ :param with_response:
+ :type with_response: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_interaction_response_serialize(
+ interaction_id=interaction_id,
+ interaction_token=interaction_token,
+ create_interaction_response_request=create_interaction_response_request,
+ with_response=with_response,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "InteractionCallbackResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_interaction_response_with_http_info(
+ self,
+ interaction_id: Annotated[str, Field(strict=True)],
+ interaction_token: Annotated[str, Field(strict=True, max_length=152133)],
+ create_interaction_response_request: CreateInteractionResponseRequest,
+ with_response: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[InteractionCallbackResponse]:
+ """create_interaction_response
+
+
+ :param interaction_id: (required)
+ :type interaction_id: str
+ :param interaction_token: (required)
+ :type interaction_token: str
+ :param create_interaction_response_request: (required)
+ :type create_interaction_response_request: CreateInteractionResponseRequest
+ :param with_response:
+ :type with_response: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_interaction_response_serialize(
+ interaction_id=interaction_id,
+ interaction_token=interaction_token,
+ create_interaction_response_request=create_interaction_response_request,
+ with_response=with_response,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "InteractionCallbackResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_interaction_response_without_preload_content(
+ self,
+ interaction_id: Annotated[str, Field(strict=True)],
+ interaction_token: Annotated[str, Field(strict=True, max_length=152133)],
+ create_interaction_response_request: CreateInteractionResponseRequest,
+ with_response: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_interaction_response
+
+
+ :param interaction_id: (required)
+ :type interaction_id: str
+ :param interaction_token: (required)
+ :type interaction_token: str
+ :param create_interaction_response_request: (required)
+ :type create_interaction_response_request: CreateInteractionResponseRequest
+ :param with_response:
+ :type with_response: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_interaction_response_serialize(
+ interaction_id=interaction_id,
+ interaction_token=interaction_token,
+ create_interaction_response_request=create_interaction_response_request,
+ with_response=with_response,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "InteractionCallbackResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_interaction_response_serialize(
+ self,
+ interaction_id,
+ interaction_token,
+ create_interaction_response_request,
+ with_response,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if interaction_id is not None:
+ _path_params['interaction_id'] = interaction_id
+ if interaction_token is not None:
+ _path_params['interaction_token'] = interaction_token
+ # process the query parameters
+ if with_response is not None:
+
+ _query_params.append(('with_response', with_response))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_interaction_response_request is not None:
+ _body_params = create_interaction_response_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'application/x-www-form-urlencoded',
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/interactions/{interaction_id}/{interaction_token}/callback',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_lobby(
+ self,
+ create_lobby_request: CreateLobbyRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> LobbyResponse:
+ """create_lobby
+
+
+ :param create_lobby_request: (required)
+ :type create_lobby_request: CreateLobbyRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_lobby_serialize(
+ create_lobby_request=create_lobby_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_lobby_with_http_info(
+ self,
+ create_lobby_request: CreateLobbyRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[LobbyResponse]:
+ """create_lobby
+
+
+ :param create_lobby_request: (required)
+ :type create_lobby_request: CreateLobbyRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_lobby_serialize(
+ create_lobby_request=create_lobby_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_lobby_without_preload_content(
+ self,
+ create_lobby_request: CreateLobbyRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_lobby
+
+
+ :param create_lobby_request: (required)
+ :type create_lobby_request: CreateLobbyRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_lobby_serialize(
+ create_lobby_request=create_lobby_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_lobby_serialize(
+ self,
+ create_lobby_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_lobby_request is not None:
+ _body_params = create_lobby_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/lobbies',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_lobby_message(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ sdk_message_request: SDKMessageRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> LobbyMessageResponse:
+ """create_lobby_message
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param sdk_message_request: (required)
+ :type sdk_message_request: SDKMessageRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_lobby_message_serialize(
+ lobby_id=lobby_id,
+ sdk_message_request=sdk_message_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "LobbyMessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_lobby_message_with_http_info(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ sdk_message_request: SDKMessageRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[LobbyMessageResponse]:
+ """create_lobby_message
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param sdk_message_request: (required)
+ :type sdk_message_request: SDKMessageRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_lobby_message_serialize(
+ lobby_id=lobby_id,
+ sdk_message_request=sdk_message_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "LobbyMessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_lobby_message_without_preload_content(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ sdk_message_request: SDKMessageRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_lobby_message
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param sdk_message_request: (required)
+ :type sdk_message_request: SDKMessageRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_lobby_message_serialize(
+ lobby_id=lobby_id,
+ sdk_message_request=sdk_message_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "LobbyMessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_lobby_message_serialize(
+ self,
+ lobby_id,
+ sdk_message_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if lobby_id is not None:
+ _path_params['lobby_id'] = lobby_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if sdk_message_request is not None:
+ _body_params = sdk_message_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'application/x-www-form-urlencoded',
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/lobbies/{lobby_id}/messages',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_message(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_create_request: MessageCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MessageResponse:
+ """create_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_create_request: (required)
+ :type message_create_request: MessageCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_message_serialize(
+ channel_id=channel_id,
+ message_create_request=message_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_message_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_create_request: MessageCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MessageResponse]:
+ """create_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_create_request: (required)
+ :type message_create_request: MessageCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_message_serialize(
+ channel_id=channel_id,
+ message_create_request=message_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_message_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_create_request: MessageCreateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_create_request: (required)
+ :type message_create_request: MessageCreateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_message_serialize(
+ channel_id=channel_id,
+ message_create_request=message_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_message_serialize(
+ self,
+ channel_id,
+ message_create_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if message_create_request is not None:
+ _body_params = message_create_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'application/x-www-form-urlencoded',
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/messages',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_or_join_lobby(
+ self,
+ create_or_join_lobby_request: CreateOrJoinLobbyRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> LobbyResponse:
+ """create_or_join_lobby
+
+
+ :param create_or_join_lobby_request: (required)
+ :type create_or_join_lobby_request: CreateOrJoinLobbyRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_or_join_lobby_serialize(
+ create_or_join_lobby_request=create_or_join_lobby_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_or_join_lobby_with_http_info(
+ self,
+ create_or_join_lobby_request: CreateOrJoinLobbyRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[LobbyResponse]:
+ """create_or_join_lobby
+
+
+ :param create_or_join_lobby_request: (required)
+ :type create_or_join_lobby_request: CreateOrJoinLobbyRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_or_join_lobby_serialize(
+ create_or_join_lobby_request=create_or_join_lobby_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_or_join_lobby_without_preload_content(
+ self,
+ create_or_join_lobby_request: CreateOrJoinLobbyRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_or_join_lobby
+
+
+ :param create_or_join_lobby_request: (required)
+ :type create_or_join_lobby_request: CreateOrJoinLobbyRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_or_join_lobby_serialize(
+ create_or_join_lobby_request=create_or_join_lobby_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_or_join_lobby_serialize(
+ self,
+ create_or_join_lobby_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_or_join_lobby_request is not None:
+ _body_params = create_or_join_lobby_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/lobbies',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_pin(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """create_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_pin_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """create_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_pin_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_pin_serialize(
+ self,
+ channel_id,
+ message_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/channels/{channel_id}/messages/pins/{message_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_stage_instance(
+ self,
+ create_stage_instance_request: CreateStageInstanceRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> StageInstanceResponse:
+ """create_stage_instance
+
+
+ :param create_stage_instance_request: (required)
+ :type create_stage_instance_request: CreateStageInstanceRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_stage_instance_serialize(
+ create_stage_instance_request=create_stage_instance_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StageInstanceResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_stage_instance_with_http_info(
+ self,
+ create_stage_instance_request: CreateStageInstanceRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[StageInstanceResponse]:
+ """create_stage_instance
+
+
+ :param create_stage_instance_request: (required)
+ :type create_stage_instance_request: CreateStageInstanceRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_stage_instance_serialize(
+ create_stage_instance_request=create_stage_instance_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StageInstanceResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_stage_instance_without_preload_content(
+ self,
+ create_stage_instance_request: CreateStageInstanceRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_stage_instance
+
+
+ :param create_stage_instance_request: (required)
+ :type create_stage_instance_request: CreateStageInstanceRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_stage_instance_serialize(
+ create_stage_instance_request=create_stage_instance_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StageInstanceResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_stage_instance_serialize(
+ self,
+ create_stage_instance_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_stage_instance_request is not None:
+ _body_params = create_stage_instance_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/stage-instances',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_thread(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ create_thread_request: CreateThreadRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreatedThreadResponse:
+ """create_thread
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param create_thread_request: (required)
+ :type create_thread_request: CreateThreadRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_thread_serialize(
+ channel_id=channel_id,
+ create_thread_request=create_thread_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreatedThreadResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_thread_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ create_thread_request: CreateThreadRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreatedThreadResponse]:
+ """create_thread
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param create_thread_request: (required)
+ :type create_thread_request: CreateThreadRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_thread_serialize(
+ channel_id=channel_id,
+ create_thread_request=create_thread_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreatedThreadResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_thread_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ create_thread_request: CreateThreadRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_thread
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param create_thread_request: (required)
+ :type create_thread_request: CreateThreadRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_thread_serialize(
+ channel_id=channel_id,
+ create_thread_request=create_thread_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreatedThreadResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_thread_serialize(
+ self,
+ channel_id,
+ create_thread_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_thread_request is not None:
+ _body_params = create_thread_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'application/x-www-form-urlencoded',
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/threads',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_thread_from_message(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ create_text_thread_with_message_request: CreateTextThreadWithMessageRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ThreadResponse:
+ """create_thread_from_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param create_text_thread_with_message_request: (required)
+ :type create_text_thread_with_message_request: CreateTextThreadWithMessageRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_thread_from_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ create_text_thread_with_message_request=create_text_thread_with_message_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "ThreadResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_thread_from_message_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ create_text_thread_with_message_request: CreateTextThreadWithMessageRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ThreadResponse]:
+ """create_thread_from_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param create_text_thread_with_message_request: (required)
+ :type create_text_thread_with_message_request: CreateTextThreadWithMessageRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_thread_from_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ create_text_thread_with_message_request=create_text_thread_with_message_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "ThreadResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_thread_from_message_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ create_text_thread_with_message_request: CreateTextThreadWithMessageRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_thread_from_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param create_text_thread_with_message_request: (required)
+ :type create_text_thread_with_message_request: CreateTextThreadWithMessageRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_thread_from_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ create_text_thread_with_message_request=create_text_thread_with_message_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "ThreadResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_thread_from_message_serialize(
+ self,
+ channel_id,
+ message_id,
+ create_text_thread_with_message_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_text_thread_with_message_request is not None:
+ _body_params = create_text_thread_with_message_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/messages/{message_id}/threads',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def create_webhook(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ create_webhook_request: CreateWebhookRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildIncomingWebhookResponse:
+ """create_webhook
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param create_webhook_request: (required)
+ :type create_webhook_request: CreateWebhookRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_webhook_serialize(
+ channel_id=channel_id,
+ create_webhook_request=create_webhook_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildIncomingWebhookResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def create_webhook_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ create_webhook_request: CreateWebhookRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildIncomingWebhookResponse]:
+ """create_webhook
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param create_webhook_request: (required)
+ :type create_webhook_request: CreateWebhookRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_webhook_serialize(
+ channel_id=channel_id,
+ create_webhook_request=create_webhook_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildIncomingWebhookResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def create_webhook_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ create_webhook_request: CreateWebhookRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_webhook
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param create_webhook_request: (required)
+ :type create_webhook_request: CreateWebhookRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_webhook_serialize(
+ channel_id=channel_id,
+ create_webhook_request=create_webhook_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildIncomingWebhookResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_webhook_serialize(
+ self,
+ channel_id,
+ create_webhook_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_webhook_request is not None:
+ _body_params = create_webhook_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/webhooks',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def crosspost_message(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MessageResponse:
+ """crosspost_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._crosspost_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def crosspost_message_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MessageResponse]:
+ """crosspost_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._crosspost_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def crosspost_message_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """crosspost_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._crosspost_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _crosspost_message_serialize(
+ self,
+ channel_id,
+ message_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/messages/{message_id}/crosspost',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_all_message_reactions(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_all_message_reactions
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_all_message_reactions_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_all_message_reactions_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_all_message_reactions
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_all_message_reactions_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_all_message_reactions_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_all_message_reactions
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_all_message_reactions_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_all_message_reactions_serialize(
+ self,
+ channel_id,
+ message_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/messages/{message_id}/reactions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_all_message_reactions_by_emoji(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_all_message_reactions_by_emoji
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_all_message_reactions_by_emoji_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_all_message_reactions_by_emoji_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_all_message_reactions_by_emoji
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_all_message_reactions_by_emoji_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_all_message_reactions_by_emoji_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_all_message_reactions_by_emoji
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_all_message_reactions_by_emoji_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_all_message_reactions_by_emoji_serialize(
+ self,
+ channel_id,
+ message_id,
+ emoji_name,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ if emoji_name is not None:
+ _path_params['emoji_name'] = emoji_name
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_application_command(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_application_command_serialize(
+ application_id=application_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_application_command_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_application_command_serialize(
+ application_id=application_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_application_command_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_application_command_serialize(
+ application_id=application_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_application_command_serialize(
+ self,
+ application_id,
+ command_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if command_id is not None:
+ _path_params['command_id'] = command_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/applications/{application_id}/commands/{command_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_application_emoji(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_application_emoji_serialize(
+ application_id=application_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_application_emoji_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_application_emoji_serialize(
+ application_id=application_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_application_emoji_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_application_emoji_serialize(
+ application_id=application_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_application_emoji_serialize(
+ self,
+ application_id,
+ emoji_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if emoji_id is not None:
+ _path_params['emoji_id'] = emoji_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/applications/{application_id}/emojis/{emoji_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_application_user_role_connection(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_application_user_role_connection
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_application_user_role_connection_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_application_user_role_connection_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_application_user_role_connection
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_application_user_role_connection_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_application_user_role_connection_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_application_user_role_connection
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_application_user_role_connection_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_application_user_role_connection_serialize(
+ self,
+ application_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/users/@me/applications/{application_id}/role-connection',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_auto_moderation_rule(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ rule_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param rule_id: (required)
+ :type rule_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ rule_id=rule_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_auto_moderation_rule_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ rule_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param rule_id: (required)
+ :type rule_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ rule_id=rule_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_auto_moderation_rule_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ rule_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param rule_id: (required)
+ :type rule_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ rule_id=rule_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_auto_moderation_rule_serialize(
+ self,
+ guild_id,
+ rule_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if rule_id is not None:
+ _path_params['rule_id'] = rule_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/auto-moderation/rules/{rule_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_channel(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetChannel200Response:
+ """delete_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_channel_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetChannel200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_channel_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetChannel200Response]:
+ """delete_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_channel_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetChannel200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_channel_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_channel_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetChannel200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_channel_serialize(
+ self,
+ channel_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_channel_permission_overwrite(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ overwrite_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_channel_permission_overwrite
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param overwrite_id: (required)
+ :type overwrite_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_channel_permission_overwrite_serialize(
+ channel_id=channel_id,
+ overwrite_id=overwrite_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_channel_permission_overwrite_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ overwrite_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_channel_permission_overwrite
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param overwrite_id: (required)
+ :type overwrite_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_channel_permission_overwrite_serialize(
+ channel_id=channel_id,
+ overwrite_id=overwrite_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_channel_permission_overwrite_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ overwrite_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_channel_permission_overwrite
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param overwrite_id: (required)
+ :type overwrite_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_channel_permission_overwrite_serialize(
+ channel_id=channel_id,
+ overwrite_id=overwrite_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_channel_permission_overwrite_serialize(
+ self,
+ channel_id,
+ overwrite_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if overwrite_id is not None:
+ _path_params['overwrite_id'] = overwrite_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/permissions/{overwrite_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_entitlement(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ entitlement_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param entitlement_id: (required)
+ :type entitlement_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_entitlement_serialize(
+ application_id=application_id,
+ entitlement_id=entitlement_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_entitlement_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ entitlement_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param entitlement_id: (required)
+ :type entitlement_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_entitlement_serialize(
+ application_id=application_id,
+ entitlement_id=entitlement_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_entitlement_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ entitlement_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param entitlement_id: (required)
+ :type entitlement_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_entitlement_serialize(
+ application_id=application_id,
+ entitlement_id=entitlement_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_entitlement_serialize(
+ self,
+ application_id,
+ entitlement_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if entitlement_id is not None:
+ _path_params['entitlement_id'] = entitlement_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/applications/{application_id}/entitlements/{entitlement_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_group_dm_user(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_group_dm_user
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_group_dm_user_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_group_dm_user_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_group_dm_user
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_group_dm_user_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_group_dm_user_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_group_dm_user
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_group_dm_user_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_group_dm_user_serialize(
+ self,
+ channel_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/recipients/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild_application_command(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_application_command_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_application_command_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_application_command_serialize(
+ self,
+ application_id,
+ guild_id,
+ command_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if command_id is not None:
+ _path_params['command_id'] = command_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/applications/{application_id}/guilds/{guild_id}/commands/{command_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild_emoji(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_emoji_serialize(
+ guild_id=guild_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_emoji_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_emoji_serialize(
+ guild_id=guild_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_emoji_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_emoji_serialize(
+ guild_id=guild_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_emoji_serialize(
+ self,
+ guild_id,
+ emoji_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if emoji_id is not None:
+ _path_params['emoji_id'] = emoji_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/emojis/{emoji_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild_integration(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ integration_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_guild_integration
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param integration_id: (required)
+ :type integration_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_integration_serialize(
+ guild_id=guild_id,
+ integration_id=integration_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_integration_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ integration_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_guild_integration
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param integration_id: (required)
+ :type integration_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_integration_serialize(
+ guild_id=guild_id,
+ integration_id=integration_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_integration_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ integration_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild_integration
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param integration_id: (required)
+ :type integration_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_integration_serialize(
+ guild_id=guild_id,
+ integration_id=integration_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_integration_serialize(
+ self,
+ guild_id,
+ integration_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if integration_id is not None:
+ _path_params['integration_id'] = integration_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/integrations/{integration_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild_member(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_member_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_member_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_member_serialize(
+ self,
+ guild_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/members/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild_member_role(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_guild_member_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_member_role_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_member_role_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_guild_member_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_member_role_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_member_role_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild_member_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_member_role_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_member_role_serialize(
+ self,
+ guild_id,
+ user_id,
+ role_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ if role_id is not None:
+ _path_params['role_id'] = role_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/members/{user_id}/roles/{role_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild_role(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_role_serialize(
+ guild_id=guild_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_role_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_role_serialize(
+ guild_id=guild_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_role_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_role_serialize(
+ guild_id=guild_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_role_serialize(
+ self,
+ guild_id,
+ role_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if role_id is not None:
+ _path_params['role_id'] = role_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/roles/{role_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild_scheduled_event(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_scheduled_event_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_scheduled_event_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_scheduled_event_serialize(
+ self,
+ guild_id,
+ guild_scheduled_event_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if guild_scheduled_event_id is not None:
+ _path_params['guild_scheduled_event_id'] = guild_scheduled_event_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild_soundboard_sound(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sound_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sound_id: (required)
+ :type sound_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ sound_id=sound_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_soundboard_sound_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sound_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sound_id: (required)
+ :type sound_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ sound_id=sound_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_soundboard_sound_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sound_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sound_id: (required)
+ :type sound_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ sound_id=sound_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_soundboard_sound_serialize(
+ self,
+ guild_id,
+ sound_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if sound_id is not None:
+ _path_params['sound_id'] = sound_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/soundboard-sounds/{sound_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild_sticker(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sticker_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_sticker_serialize(
+ guild_id=guild_id,
+ sticker_id=sticker_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_sticker_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sticker_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_sticker_serialize(
+ guild_id=guild_id,
+ sticker_id=sticker_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_sticker_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sticker_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_sticker_serialize(
+ guild_id=guild_id,
+ sticker_id=sticker_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_sticker_serialize(
+ self,
+ guild_id,
+ sticker_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if sticker_id is not None:
+ _path_params['sticker_id'] = sticker_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/stickers/{sticker_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_guild_template(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildTemplateResponse:
+ """delete_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_template_serialize(
+ guild_id=guild_id,
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_guild_template_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildTemplateResponse]:
+ """delete_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_template_serialize(
+ guild_id=guild_id,
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_guild_template_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_guild_template_serialize(
+ guild_id=guild_id,
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_guild_template_serialize(
+ self,
+ guild_id,
+ code,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if code is not None:
+ _path_params['code'] = code
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/templates/{code}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_lobby_member(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_lobby_member
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_lobby_member_serialize(
+ lobby_id=lobby_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_lobby_member_with_http_info(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_lobby_member
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_lobby_member_serialize(
+ lobby_id=lobby_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_lobby_member_without_preload_content(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_lobby_member
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_lobby_member_serialize(
+ lobby_id=lobby_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_lobby_member_serialize(
+ self,
+ lobby_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if lobby_id is not None:
+ _path_params['lobby_id'] = lobby_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/lobbies/{lobby_id}/members/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_message(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_message_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_message_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_message_serialize(
+ self,
+ channel_id,
+ message_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/messages/{message_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_my_message_reaction(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_my_message_reaction
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_my_message_reaction_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_my_message_reaction_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_my_message_reaction
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_my_message_reaction_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_my_message_reaction_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_my_message_reaction
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_my_message_reaction_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_my_message_reaction_serialize(
+ self,
+ channel_id,
+ message_id,
+ emoji_name,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ if emoji_name is not None:
+ _path_params['emoji_name'] = emoji_name
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_original_webhook_message(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_original_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_original_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_original_webhook_message_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_original_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_original_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_original_webhook_message_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_original_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_original_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_original_webhook_message_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ thread_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ # process the query parameters
+ if thread_id is not None:
+
+ _query_params.append(('thread_id', thread_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/@original',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_pin(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_pin_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_pin_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_pin_serialize(
+ self,
+ channel_id,
+ message_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/messages/pins/{message_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_stage_instance(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_stage_instance
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_stage_instance_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_stage_instance_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_stage_instance
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_stage_instance_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_stage_instance_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_stage_instance
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_stage_instance_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_stage_instance_serialize(
+ self,
+ channel_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/stage-instances/{channel_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_thread_member(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_thread_member
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_thread_member_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_thread_member_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_thread_member
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_thread_member_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_thread_member_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_thread_member
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_thread_member_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_thread_member_serialize(
+ self,
+ channel_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/thread-members/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_user_message_reaction(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_user_message_reaction
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_user_message_reaction_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_user_message_reaction_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_user_message_reaction
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_user_message_reaction_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_user_message_reaction_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_user_message_reaction
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_user_message_reaction_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_user_message_reaction_serialize(
+ self,
+ channel_id,
+ message_id,
+ emoji_name,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ if emoji_name is not None:
+ _path_params['emoji_name'] = emoji_name
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_webhook(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_serialize(
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_webhook_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_serialize(
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_webhook_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_serialize(
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_webhook_serialize(
+ self,
+ webhook_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/webhooks/{webhook_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_webhook_by_token(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_webhook_by_token
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_by_token_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_webhook_by_token_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_webhook_by_token
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_by_token_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_webhook_by_token_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_webhook_by_token
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_by_token_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_webhook_by_token_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def delete_webhook_message(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ message_id: Annotated[str, Field(strict=True)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param message_id: (required)
+ :type message_id: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ message_id=message_id,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def delete_webhook_message_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ message_id: Annotated[str, Field(strict=True)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param message_id: (required)
+ :type message_id: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ message_id=message_id,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def delete_webhook_message_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ message_id: Annotated[str, Field(strict=True)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param message_id: (required)
+ :type message_id: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ message_id=message_id,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_webhook_message_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ message_id,
+ thread_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ if thread_id is not None:
+
+ _query_params.append(('thread_id', thread_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def deprecated_create_pin(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """deprecated_create_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._deprecated_create_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def deprecated_create_pin_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """deprecated_create_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._deprecated_create_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def deprecated_create_pin_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """deprecated_create_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._deprecated_create_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _deprecated_create_pin_serialize(
+ self,
+ channel_id,
+ message_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/channels/{channel_id}/pins/{message_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def deprecated_delete_pin(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """deprecated_delete_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._deprecated_delete_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def deprecated_delete_pin_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """deprecated_delete_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._deprecated_delete_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def deprecated_delete_pin_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """deprecated_delete_pin
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._deprecated_delete_pin_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _deprecated_delete_pin_serialize(
+ self,
+ channel_id,
+ message_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/pins/{message_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def deprecated_list_pins(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[MessageResponse]:
+ """deprecated_list_pins
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._deprecated_list_pins_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[MessageResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def deprecated_list_pins_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[MessageResponse]]:
+ """deprecated_list_pins
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._deprecated_list_pins_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[MessageResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def deprecated_list_pins_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """deprecated_list_pins
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._deprecated_list_pins_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[MessageResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _deprecated_list_pins_serialize(
+ self,
+ channel_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/pins',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def edit_lobby(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ create_lobby_request: CreateLobbyRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> LobbyResponse:
+ """edit_lobby
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param create_lobby_request: (required)
+ :type create_lobby_request: CreateLobbyRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._edit_lobby_serialize(
+ lobby_id=lobby_id,
+ create_lobby_request=create_lobby_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def edit_lobby_with_http_info(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ create_lobby_request: CreateLobbyRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[LobbyResponse]:
+ """edit_lobby
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param create_lobby_request: (required)
+ :type create_lobby_request: CreateLobbyRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._edit_lobby_serialize(
+ lobby_id=lobby_id,
+ create_lobby_request=create_lobby_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def edit_lobby_without_preload_content(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ create_lobby_request: CreateLobbyRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """edit_lobby
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param create_lobby_request: (required)
+ :type create_lobby_request: CreateLobbyRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._edit_lobby_serialize(
+ lobby_id=lobby_id,
+ create_lobby_request=create_lobby_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _edit_lobby_serialize(
+ self,
+ lobby_id,
+ create_lobby_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if lobby_id is not None:
+ _path_params['lobby_id'] = lobby_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_lobby_request is not None:
+ _body_params = create_lobby_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/lobbies/{lobby_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def edit_lobby_channel_link(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ edit_lobby_channel_link_request: EditLobbyChannelLinkRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> LobbyResponse:
+ """edit_lobby_channel_link
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param edit_lobby_channel_link_request: (required)
+ :type edit_lobby_channel_link_request: EditLobbyChannelLinkRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._edit_lobby_channel_link_serialize(
+ lobby_id=lobby_id,
+ edit_lobby_channel_link_request=edit_lobby_channel_link_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def edit_lobby_channel_link_with_http_info(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ edit_lobby_channel_link_request: EditLobbyChannelLinkRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[LobbyResponse]:
+ """edit_lobby_channel_link
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param edit_lobby_channel_link_request: (required)
+ :type edit_lobby_channel_link_request: EditLobbyChannelLinkRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._edit_lobby_channel_link_serialize(
+ lobby_id=lobby_id,
+ edit_lobby_channel_link_request=edit_lobby_channel_link_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def edit_lobby_channel_link_without_preload_content(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ edit_lobby_channel_link_request: EditLobbyChannelLinkRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """edit_lobby_channel_link
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param edit_lobby_channel_link_request: (required)
+ :type edit_lobby_channel_link_request: EditLobbyChannelLinkRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._edit_lobby_channel_link_serialize(
+ lobby_id=lobby_id,
+ edit_lobby_channel_link_request=edit_lobby_channel_link_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _edit_lobby_channel_link_serialize(
+ self,
+ lobby_id,
+ edit_lobby_channel_link_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if lobby_id is not None:
+ _path_params['lobby_id'] = lobby_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if edit_lobby_channel_link_request is not None:
+ _body_params = edit_lobby_channel_link_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/lobbies/{lobby_id}/channel-linking',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def execute_github_compatible_webhook(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ github_webhook: GithubWebhook,
+ wait: Optional[StrictBool] = None,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """execute_github_compatible_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param github_webhook: (required)
+ :type github_webhook: GithubWebhook
+ :param wait:
+ :type wait: bool
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._execute_github_compatible_webhook_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ github_webhook=github_webhook,
+ wait=wait,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def execute_github_compatible_webhook_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ github_webhook: GithubWebhook,
+ wait: Optional[StrictBool] = None,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """execute_github_compatible_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param github_webhook: (required)
+ :type github_webhook: GithubWebhook
+ :param wait:
+ :type wait: bool
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._execute_github_compatible_webhook_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ github_webhook=github_webhook,
+ wait=wait,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def execute_github_compatible_webhook_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ github_webhook: GithubWebhook,
+ wait: Optional[StrictBool] = None,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """execute_github_compatible_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param github_webhook: (required)
+ :type github_webhook: GithubWebhook
+ :param wait:
+ :type wait: bool
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._execute_github_compatible_webhook_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ github_webhook=github_webhook,
+ wait=wait,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _execute_github_compatible_webhook_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ github_webhook,
+ wait,
+ thread_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ # process the query parameters
+ if wait is not None:
+
+ _query_params.append(('wait', wait))
+
+ if thread_id is not None:
+
+ _query_params.append(('thread_id', thread_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if github_webhook is not None:
+ _body_params = github_webhook
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}/github',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def execute_slack_compatible_webhook(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ slack_webhook: SlackWebhook,
+ wait: Optional[StrictBool] = None,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> str:
+ """execute_slack_compatible_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param slack_webhook: (required)
+ :type slack_webhook: SlackWebhook
+ :param wait:
+ :type wait: bool
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._execute_slack_compatible_webhook_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ slack_webhook=slack_webhook,
+ wait=wait,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def execute_slack_compatible_webhook_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ slack_webhook: SlackWebhook,
+ wait: Optional[StrictBool] = None,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[str]:
+ """execute_slack_compatible_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param slack_webhook: (required)
+ :type slack_webhook: SlackWebhook
+ :param wait:
+ :type wait: bool
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._execute_slack_compatible_webhook_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ slack_webhook=slack_webhook,
+ wait=wait,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def execute_slack_compatible_webhook_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ slack_webhook: SlackWebhook,
+ wait: Optional[StrictBool] = None,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """execute_slack_compatible_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param slack_webhook: (required)
+ :type slack_webhook: SlackWebhook
+ :param wait:
+ :type wait: bool
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._execute_slack_compatible_webhook_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ slack_webhook=slack_webhook,
+ wait=wait,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _execute_slack_compatible_webhook_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ slack_webhook,
+ wait,
+ thread_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ # process the query parameters
+ if wait is not None:
+
+ _query_params.append(('wait', wait))
+
+ if thread_id is not None:
+
+ _query_params.append(('thread_id', thread_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if slack_webhook is not None:
+ _body_params = slack_webhook
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'application/x-www-form-urlencoded',
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}/slack',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def execute_webhook(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ execute_webhook_request: ExecuteWebhookRequest,
+ wait: Optional[StrictBool] = None,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ with_components: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MessageResponse:
+ """execute_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param execute_webhook_request: (required)
+ :type execute_webhook_request: ExecuteWebhookRequest
+ :param wait:
+ :type wait: bool
+ :param thread_id:
+ :type thread_id: str
+ :param with_components:
+ :type with_components: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._execute_webhook_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ execute_webhook_request=execute_webhook_request,
+ wait=wait,
+ thread_id=thread_id,
+ with_components=with_components,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def execute_webhook_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ execute_webhook_request: ExecuteWebhookRequest,
+ wait: Optional[StrictBool] = None,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ with_components: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MessageResponse]:
+ """execute_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param execute_webhook_request: (required)
+ :type execute_webhook_request: ExecuteWebhookRequest
+ :param wait:
+ :type wait: bool
+ :param thread_id:
+ :type thread_id: str
+ :param with_components:
+ :type with_components: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._execute_webhook_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ execute_webhook_request=execute_webhook_request,
+ wait=wait,
+ thread_id=thread_id,
+ with_components=with_components,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def execute_webhook_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ execute_webhook_request: ExecuteWebhookRequest,
+ wait: Optional[StrictBool] = None,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ with_components: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """execute_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param execute_webhook_request: (required)
+ :type execute_webhook_request: ExecuteWebhookRequest
+ :param wait:
+ :type wait: bool
+ :param thread_id:
+ :type thread_id: str
+ :param with_components:
+ :type with_components: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._execute_webhook_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ execute_webhook_request=execute_webhook_request,
+ wait=wait,
+ thread_id=thread_id,
+ with_components=with_components,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _execute_webhook_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ execute_webhook_request,
+ wait,
+ thread_id,
+ with_components,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ # process the query parameters
+ if wait is not None:
+
+ _query_params.append(('wait', wait))
+
+ if thread_id is not None:
+
+ _query_params.append(('thread_id', thread_id))
+
+ if with_components is not None:
+
+ _query_params.append(('with_components', with_components))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if execute_webhook_request is not None:
+ _body_params = execute_webhook_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'application/x-www-form-urlencoded',
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def follow_channel(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ follow_channel_request: FollowChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ChannelFollowerResponse:
+ """follow_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param follow_channel_request: (required)
+ :type follow_channel_request: FollowChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._follow_channel_serialize(
+ channel_id=channel_id,
+ follow_channel_request=follow_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ChannelFollowerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def follow_channel_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ follow_channel_request: FollowChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ChannelFollowerResponse]:
+ """follow_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param follow_channel_request: (required)
+ :type follow_channel_request: FollowChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._follow_channel_serialize(
+ channel_id=channel_id,
+ follow_channel_request=follow_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ChannelFollowerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def follow_channel_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ follow_channel_request: FollowChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """follow_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param follow_channel_request: (required)
+ :type follow_channel_request: FollowChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._follow_channel_serialize(
+ channel_id=channel_id,
+ follow_channel_request=follow_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ChannelFollowerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _follow_channel_serialize(
+ self,
+ channel_id,
+ follow_channel_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if follow_channel_request is not None:
+ _body_params = follow_channel_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/followers',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_active_guild_threads(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ThreadsResponse:
+ """get_active_guild_threads
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_active_guild_threads_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_active_guild_threads_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ThreadsResponse]:
+ """get_active_guild_threads
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_active_guild_threads_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_active_guild_threads_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_active_guild_threads
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_active_guild_threads_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_active_guild_threads_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/threads/active',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_answer_voters(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ answer_id: Annotated[int, Field(le=10, strict=True, ge=1)],
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PollAnswerDetailsResponse:
+ """get_answer_voters
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param answer_id: (required)
+ :type answer_id: int
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_answer_voters_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ answer_id=answer_id,
+ after=after,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PollAnswerDetailsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_answer_voters_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ answer_id: Annotated[int, Field(le=10, strict=True, ge=1)],
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PollAnswerDetailsResponse]:
+ """get_answer_voters
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param answer_id: (required)
+ :type answer_id: int
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_answer_voters_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ answer_id=answer_id,
+ after=after,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PollAnswerDetailsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_answer_voters_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ answer_id: Annotated[int, Field(le=10, strict=True, ge=1)],
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_answer_voters
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param answer_id: (required)
+ :type answer_id: int
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_answer_voters_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ answer_id=answer_id,
+ after=after,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PollAnswerDetailsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_answer_voters_serialize(
+ self,
+ channel_id,
+ message_id,
+ answer_id,
+ after,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ if answer_id is not None:
+ _path_params['answer_id'] = answer_id
+ # process the query parameters
+ if after is not None:
+
+ _query_params.append(('after', after))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/polls/{message_id}/answers/{answer_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_application(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PrivateApplicationResponse:
+ """get_application
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_application_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PrivateApplicationResponse]:
+ """get_application
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_application_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_application
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_application_serialize(
+ self,
+ application_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_application_command(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApplicationCommandResponse:
+ """get_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_command_serialize(
+ application_id=application_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_application_command_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ApplicationCommandResponse]:
+ """get_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_command_serialize(
+ application_id=application_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_application_command_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_command_serialize(
+ application_id=application_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_application_command_serialize(
+ self,
+ application_id,
+ command_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if command_id is not None:
+ _path_params['command_id'] = command_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/commands/{command_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_application_emoji(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EmojiResponse:
+ """get_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_emoji_serialize(
+ application_id=application_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_application_emoji_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EmojiResponse]:
+ """get_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_emoji_serialize(
+ application_id=application_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_application_emoji_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_emoji_serialize(
+ application_id=application_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_application_emoji_serialize(
+ self,
+ application_id,
+ emoji_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if emoji_id is not None:
+ _path_params['emoji_id'] = emoji_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/emojis/{emoji_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_application_role_connections_metadata(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ApplicationRoleConnectionsMetadataItemResponse]:
+ """get_application_role_connections_metadata
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_role_connections_metadata_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationRoleConnectionsMetadataItemResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_application_role_connections_metadata_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ApplicationRoleConnectionsMetadataItemResponse]]:
+ """get_application_role_connections_metadata
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_role_connections_metadata_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationRoleConnectionsMetadataItemResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_application_role_connections_metadata_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_application_role_connections_metadata
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_role_connections_metadata_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationRoleConnectionsMetadataItemResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_application_role_connections_metadata_serialize(
+ self,
+ application_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/role-connections/metadata',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_application_user_role_connection(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApplicationUserRoleConnectionResponse:
+ """get_application_user_role_connection
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_user_role_connection_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationUserRoleConnectionResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_application_user_role_connection_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ApplicationUserRoleConnectionResponse]:
+ """get_application_user_role_connection
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_user_role_connection_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationUserRoleConnectionResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_application_user_role_connection_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_application_user_role_connection
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_application_user_role_connection_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationUserRoleConnectionResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_application_user_role_connection_serialize(
+ self,
+ application_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/users/@me/applications/{application_id}/role-connection',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_auto_moderation_rule(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ rule_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateAutoModerationRule200Response:
+ """get_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param rule_id: (required)
+ :type rule_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ rule_id=rule_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateAutoModerationRule200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_auto_moderation_rule_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ rule_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateAutoModerationRule200Response]:
+ """get_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param rule_id: (required)
+ :type rule_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ rule_id=rule_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateAutoModerationRule200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_auto_moderation_rule_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ rule_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param rule_id: (required)
+ :type rule_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ rule_id=rule_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateAutoModerationRule200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_auto_moderation_rule_serialize(
+ self,
+ guild_id,
+ rule_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if rule_id is not None:
+ _path_params['rule_id'] = rule_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/auto-moderation/rules/{rule_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_bot_gateway(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GatewayBotResponse:
+ """get_bot_gateway
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_bot_gateway_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GatewayBotResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_bot_gateway_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GatewayBotResponse]:
+ """get_bot_gateway
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_bot_gateway_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GatewayBotResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_bot_gateway_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_bot_gateway
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_bot_gateway_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GatewayBotResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_bot_gateway_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/gateway/bot',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_channel(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetChannel200Response:
+ """get_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_channel_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetChannel200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_channel_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetChannel200Response]:
+ """get_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_channel_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetChannel200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_channel_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_channel_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetChannel200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_channel_serialize(
+ self,
+ channel_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_entitlement(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ entitlement_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EntitlementResponse:
+ """get_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param entitlement_id: (required)
+ :type entitlement_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_entitlement_serialize(
+ application_id=application_id,
+ entitlement_id=entitlement_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EntitlementResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_entitlement_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ entitlement_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EntitlementResponse]:
+ """get_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param entitlement_id: (required)
+ :type entitlement_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_entitlement_serialize(
+ application_id=application_id,
+ entitlement_id=entitlement_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EntitlementResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_entitlement_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ entitlement_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_entitlement
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param entitlement_id: (required)
+ :type entitlement_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_entitlement_serialize(
+ application_id=application_id,
+ entitlement_id=entitlement_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EntitlementResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_entitlement_serialize(
+ self,
+ application_id,
+ entitlement_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if entitlement_id is not None:
+ _path_params['entitlement_id'] = entitlement_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/entitlements/{entitlement_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_entitlements(
+ self,
+ sku_ids: Any,
+ application_id: Annotated[str, Field(strict=True)],
+ user_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ exclude_ended: Optional[StrictBool] = None,
+ exclude_deleted: Optional[StrictBool] = None,
+ only_active: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[Optional[EntitlementResponse]]:
+ """get_entitlements
+
+
+ :param sku_ids: (required)
+ :type sku_ids: GetEntitlementsSkuIdsParameter
+ :param application_id: (required)
+ :type application_id: str
+ :param user_id:
+ :type user_id: str
+ :param guild_id:
+ :type guild_id: str
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param exclude_ended:
+ :type exclude_ended: bool
+ :param exclude_deleted:
+ :type exclude_deleted: bool
+ :param only_active:
+ :type only_active: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_entitlements_serialize(
+ sku_ids=sku_ids,
+ application_id=application_id,
+ user_id=user_id,
+ guild_id=guild_id,
+ before=before,
+ after=after,
+ limit=limit,
+ exclude_ended=exclude_ended,
+ exclude_deleted=exclude_deleted,
+ only_active=only_active,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[Optional[EntitlementResponse]]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_entitlements_with_http_info(
+ self,
+ sku_ids: Any,
+ application_id: Annotated[str, Field(strict=True)],
+ user_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ exclude_ended: Optional[StrictBool] = None,
+ exclude_deleted: Optional[StrictBool] = None,
+ only_active: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[Optional[EntitlementResponse]]]:
+ """get_entitlements
+
+
+ :param sku_ids: (required)
+ :type sku_ids: GetEntitlementsSkuIdsParameter
+ :param application_id: (required)
+ :type application_id: str
+ :param user_id:
+ :type user_id: str
+ :param guild_id:
+ :type guild_id: str
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param exclude_ended:
+ :type exclude_ended: bool
+ :param exclude_deleted:
+ :type exclude_deleted: bool
+ :param only_active:
+ :type only_active: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_entitlements_serialize(
+ sku_ids=sku_ids,
+ application_id=application_id,
+ user_id=user_id,
+ guild_id=guild_id,
+ before=before,
+ after=after,
+ limit=limit,
+ exclude_ended=exclude_ended,
+ exclude_deleted=exclude_deleted,
+ only_active=only_active,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[Optional[EntitlementResponse]]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_entitlements_without_preload_content(
+ self,
+ sku_ids: Any,
+ application_id: Annotated[str, Field(strict=True)],
+ user_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ exclude_ended: Optional[StrictBool] = None,
+ exclude_deleted: Optional[StrictBool] = None,
+ only_active: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_entitlements
+
+
+ :param sku_ids: (required)
+ :type sku_ids: GetEntitlementsSkuIdsParameter
+ :param application_id: (required)
+ :type application_id: str
+ :param user_id:
+ :type user_id: str
+ :param guild_id:
+ :type guild_id: str
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param exclude_ended:
+ :type exclude_ended: bool
+ :param exclude_deleted:
+ :type exclude_deleted: bool
+ :param only_active:
+ :type only_active: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_entitlements_serialize(
+ sku_ids=sku_ids,
+ application_id=application_id,
+ user_id=user_id,
+ guild_id=guild_id,
+ before=before,
+ after=after,
+ limit=limit,
+ exclude_ended=exclude_ended,
+ exclude_deleted=exclude_deleted,
+ only_active=only_active,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[Optional[EntitlementResponse]]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_entitlements_serialize(
+ self,
+ sku_ids,
+ application_id,
+ user_id,
+ guild_id,
+ before,
+ after,
+ limit,
+ exclude_ended,
+ exclude_deleted,
+ only_active,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ if user_id is not None:
+
+ _query_params.append(('user_id', user_id))
+
+ if sku_ids is not None:
+
+ _query_params.append(('sku_ids', sku_ids))
+
+ if guild_id is not None:
+
+ _query_params.append(('guild_id', guild_id))
+
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ if after is not None:
+
+ _query_params.append(('after', after))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if exclude_ended is not None:
+
+ _query_params.append(('exclude_ended', exclude_ended))
+
+ if exclude_deleted is not None:
+
+ _query_params.append(('exclude_deleted', exclude_deleted))
+
+ if only_active is not None:
+
+ _query_params.append(('only_active', only_active))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/entitlements',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_gateway(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GatewayResponse:
+ """get_gateway
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_gateway_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GatewayResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_gateway_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GatewayResponse]:
+ """get_gateway
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_gateway_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GatewayResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_gateway_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_gateway
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_gateway_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GatewayResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_gateway_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/gateway',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ with_counts: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildWithCountsResponse:
+ """get_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param with_counts:
+ :type with_counts: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_serialize(
+ guild_id=guild_id,
+ with_counts=with_counts,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildWithCountsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ with_counts: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildWithCountsResponse]:
+ """get_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param with_counts:
+ :type with_counts: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_serialize(
+ guild_id=guild_id,
+ with_counts=with_counts,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildWithCountsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ with_counts: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param with_counts:
+ :type with_counts: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_serialize(
+ guild_id=guild_id,
+ with_counts=with_counts,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildWithCountsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_serialize(
+ self,
+ guild_id,
+ with_counts,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ if with_counts is not None:
+
+ _query_params.append(('with_counts', with_counts))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_application_command(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApplicationCommandResponse:
+ """get_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_application_command_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ApplicationCommandResponse]:
+ """get_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_application_command_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_application_command_serialize(
+ self,
+ application_id,
+ guild_id,
+ command_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if command_id is not None:
+ _path_params['command_id'] = command_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/guilds/{guild_id}/commands/{command_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_application_command_permissions(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CommandPermissionsResponse:
+ """get_guild_application_command_permissions
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_application_command_permissions_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CommandPermissionsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_application_command_permissions_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CommandPermissionsResponse]:
+ """get_guild_application_command_permissions
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_application_command_permissions_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CommandPermissionsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_application_command_permissions_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_application_command_permissions
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_application_command_permissions_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CommandPermissionsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_application_command_permissions_serialize(
+ self,
+ application_id,
+ guild_id,
+ command_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if command_id is not None:
+ _path_params['command_id'] = command_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_ban(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildBanResponse:
+ """get_guild_ban
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_ban_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildBanResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_ban_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildBanResponse]:
+ """get_guild_ban
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_ban_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildBanResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_ban_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_ban
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_ban_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildBanResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_ban_serialize(
+ self,
+ guild_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/bans/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_emoji(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EmojiResponse:
+ """get_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_emoji_serialize(
+ guild_id=guild_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_emoji_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EmojiResponse]:
+ """get_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_emoji_serialize(
+ guild_id=guild_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_emoji_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_emoji_serialize(
+ guild_id=guild_id,
+ emoji_id=emoji_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_emoji_serialize(
+ self,
+ guild_id,
+ emoji_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if emoji_id is not None:
+ _path_params['emoji_id'] = emoji_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/emojis/{emoji_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_member(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildMemberResponse:
+ """get_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_member_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildMemberResponse]:
+ """get_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_member_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_member_serialize(
+ self,
+ guild_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/members/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_new_member_welcome(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildHomeSettingsResponse:
+ """get_guild_new_member_welcome
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_new_member_welcome_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildHomeSettingsResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_new_member_welcome_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildHomeSettingsResponse]:
+ """get_guild_new_member_welcome
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_new_member_welcome_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildHomeSettingsResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_new_member_welcome_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_new_member_welcome
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_new_member_welcome_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildHomeSettingsResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_new_member_welcome_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/new-member-welcome',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_preview(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildPreviewResponse:
+ """get_guild_preview
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_preview_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildPreviewResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_preview_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildPreviewResponse]:
+ """get_guild_preview
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_preview_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildPreviewResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_preview_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_preview
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_preview_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildPreviewResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_preview_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/preview',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_role(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildRoleResponse:
+ """get_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_role_serialize(
+ guild_id=guild_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildRoleResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_role_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildRoleResponse]:
+ """get_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_role_serialize(
+ guild_id=guild_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildRoleResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_role_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_role_serialize(
+ guild_id=guild_id,
+ role_id=role_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildRoleResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_role_serialize(
+ self,
+ guild_id,
+ role_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if role_id is not None:
+ _path_params['role_id'] = role_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/roles/{role_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_scheduled_event(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ with_user_count: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListGuildScheduledEvents200ResponseInner:
+ """get_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param with_user_count:
+ :type with_user_count: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ with_user_count=with_user_count,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildScheduledEvents200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_scheduled_event_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ with_user_count: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListGuildScheduledEvents200ResponseInner]:
+ """get_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param with_user_count:
+ :type with_user_count: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ with_user_count=with_user_count,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildScheduledEvents200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_scheduled_event_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ with_user_count: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param with_user_count:
+ :type with_user_count: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ with_user_count=with_user_count,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildScheduledEvents200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_scheduled_event_serialize(
+ self,
+ guild_id,
+ guild_scheduled_event_id,
+ with_user_count,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if guild_scheduled_event_id is not None:
+ _path_params['guild_scheduled_event_id'] = guild_scheduled_event_id
+ # process the query parameters
+ if with_user_count is not None:
+
+ _query_params.append(('with_user_count', with_user_count))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_soundboard_sound(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sound_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SoundboardSoundResponse:
+ """get_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sound_id: (required)
+ :type sound_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ sound_id=sound_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SoundboardSoundResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_soundboard_sound_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sound_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SoundboardSoundResponse]:
+ """get_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sound_id: (required)
+ :type sound_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ sound_id=sound_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SoundboardSoundResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_soundboard_sound_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sound_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sound_id: (required)
+ :type sound_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ sound_id=sound_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SoundboardSoundResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_soundboard_sound_serialize(
+ self,
+ guild_id,
+ sound_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if sound_id is not None:
+ _path_params['sound_id'] = sound_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/soundboard-sounds/{sound_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_sticker(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sticker_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildStickerResponse:
+ """get_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_sticker_serialize(
+ guild_id=guild_id,
+ sticker_id=sticker_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildStickerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_sticker_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sticker_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildStickerResponse]:
+ """get_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_sticker_serialize(
+ guild_id=guild_id,
+ sticker_id=sticker_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildStickerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_sticker_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sticker_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_sticker_serialize(
+ guild_id=guild_id,
+ sticker_id=sticker_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildStickerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_sticker_serialize(
+ self,
+ guild_id,
+ sticker_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if sticker_id is not None:
+ _path_params['sticker_id'] = sticker_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/stickers/{sticker_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_template(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildTemplateResponse:
+ """get_guild_template
+
+
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_template_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_template_with_http_info(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildTemplateResponse]:
+ """get_guild_template
+
+
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_template_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_template_without_preload_content(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_template
+
+
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_template_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_template_serialize(
+ self,
+ code,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if code is not None:
+ _path_params['code'] = code
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/templates/{code}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_vanity_url(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> VanityURLResponse:
+ """get_guild_vanity_url
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_vanity_url_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VanityURLResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_vanity_url_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[VanityURLResponse]:
+ """get_guild_vanity_url
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_vanity_url_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VanityURLResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_vanity_url_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_vanity_url
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_vanity_url_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VanityURLResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_vanity_url_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/vanity-url',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_webhooks(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ListChannelWebhooks200ResponseInner]:
+ """get_guild_webhooks
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_webhooks_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelWebhooks200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_webhooks_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ListChannelWebhooks200ResponseInner]]:
+ """get_guild_webhooks
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_webhooks_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelWebhooks200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_webhooks_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_webhooks
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_webhooks_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelWebhooks200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_webhooks_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/webhooks',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_welcome_screen(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildWelcomeScreenResponse:
+ """get_guild_welcome_screen
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_welcome_screen_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildWelcomeScreenResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_welcome_screen_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildWelcomeScreenResponse]:
+ """get_guild_welcome_screen
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_welcome_screen_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildWelcomeScreenResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_welcome_screen_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_welcome_screen
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_welcome_screen_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildWelcomeScreenResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_welcome_screen_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/welcome-screen',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_widget(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> WidgetResponse:
+ """get_guild_widget
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_widget_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "WidgetResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_widget_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[WidgetResponse]:
+ """get_guild_widget
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_widget_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "WidgetResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_widget_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_widget
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_widget_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "WidgetResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_widget_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/widget.json',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_widget_png(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ style: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> str:
+ """get_guild_widget_png
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param style:
+ :type style: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_widget_png_serialize(
+ guild_id=guild_id,
+ style=style,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_widget_png_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ style: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[str]:
+ """get_guild_widget_png
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param style:
+ :type style: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_widget_png_serialize(
+ guild_id=guild_id,
+ style=style,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_widget_png_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ style: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_widget_png
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param style:
+ :type style: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_widget_png_serialize(
+ guild_id=guild_id,
+ style=style,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_widget_png_serialize(
+ self,
+ guild_id,
+ style,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ if style is not None:
+
+ _query_params.append(('style', style))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'image/png',
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/widget.png',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guild_widget_settings(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> WidgetSettingsResponse:
+ """get_guild_widget_settings
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_widget_settings_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "WidgetSettingsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guild_widget_settings_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[WidgetSettingsResponse]:
+ """get_guild_widget_settings
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_widget_settings_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "WidgetSettingsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guild_widget_settings_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guild_widget_settings
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guild_widget_settings_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "WidgetSettingsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guild_widget_settings_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/widget',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_guilds_onboarding(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> UserGuildOnboardingResponse:
+ """get_guilds_onboarding
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guilds_onboarding_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserGuildOnboardingResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_guilds_onboarding_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[UserGuildOnboardingResponse]:
+ """get_guilds_onboarding
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guilds_onboarding_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserGuildOnboardingResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_guilds_onboarding_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_guilds_onboarding
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_guilds_onboarding_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserGuildOnboardingResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_guilds_onboarding_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/onboarding',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_lobby(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> LobbyResponse:
+ """get_lobby
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_lobby_serialize(
+ lobby_id=lobby_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_lobby_with_http_info(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[LobbyResponse]:
+ """get_lobby
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_lobby_serialize(
+ lobby_id=lobby_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_lobby_without_preload_content(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_lobby
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_lobby_serialize(
+ lobby_id=lobby_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LobbyResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_lobby_serialize(
+ self,
+ lobby_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if lobby_id is not None:
+ _path_params['lobby_id'] = lobby_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/lobbies/{lobby_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_lobby_messages(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[LobbyMessageResponse]:
+ """get_lobby_messages
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_lobby_messages_serialize(
+ lobby_id=lobby_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[LobbyMessageResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_lobby_messages_with_http_info(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[LobbyMessageResponse]]:
+ """get_lobby_messages
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_lobby_messages_serialize(
+ lobby_id=lobby_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[LobbyMessageResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_lobby_messages_without_preload_content(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_lobby_messages
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_lobby_messages_serialize(
+ lobby_id=lobby_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[LobbyMessageResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_lobby_messages_serialize(
+ self,
+ lobby_id,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if lobby_id is not None:
+ _path_params['lobby_id'] = lobby_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/lobbies/{lobby_id}/messages',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_message(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MessageResponse:
+ """get_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_message_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MessageResponse]:
+ """get_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_message_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_message_serialize(
+ self,
+ channel_id,
+ message_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/messages/{message_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_my_application(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PrivateApplicationResponse:
+ """get_my_application
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_application_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_my_application_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PrivateApplicationResponse]:
+ """get_my_application
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_application_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_my_application_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_my_application
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_application_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_my_application_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_my_guild_member(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PrivateGuildMemberResponse:
+ """get_my_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_guild_member_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateGuildMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_my_guild_member_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PrivateGuildMemberResponse]:
+ """get_my_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_guild_member_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateGuildMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_my_guild_member_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_my_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_guild_member_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateGuildMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_my_guild_member_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/users/@me/guilds/{guild_id}/member',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_my_oauth2_application(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PrivateApplicationResponse:
+ """get_my_oauth2_application
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_oauth2_application_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_my_oauth2_application_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PrivateApplicationResponse]:
+ """get_my_oauth2_application
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_oauth2_application_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_my_oauth2_application_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_my_oauth2_application
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_oauth2_application_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_my_oauth2_application_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/oauth2/applications/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_my_oauth2_authorization(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> OAuth2GetAuthorizationResponse:
+ """get_my_oauth2_authorization
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_oauth2_authorization_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OAuth2GetAuthorizationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_my_oauth2_authorization_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[OAuth2GetAuthorizationResponse]:
+ """get_my_oauth2_authorization
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_oauth2_authorization_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OAuth2GetAuthorizationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_my_oauth2_authorization_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_my_oauth2_authorization
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_oauth2_authorization_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OAuth2GetAuthorizationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_my_oauth2_authorization_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/oauth2/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_my_user(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> UserPIIResponse:
+ """get_my_user
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_user_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserPIIResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_my_user_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[UserPIIResponse]:
+ """get_my_user
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_user_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserPIIResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_my_user_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_my_user
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_my_user_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserPIIResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_my_user_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/users/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_openid_connect_userinfo(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> OAuth2GetOpenIDConnectUserInfoResponse:
+ """get_openid_connect_userinfo
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_openid_connect_userinfo_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OAuth2GetOpenIDConnectUserInfoResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_openid_connect_userinfo_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[OAuth2GetOpenIDConnectUserInfoResponse]:
+ """get_openid_connect_userinfo
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_openid_connect_userinfo_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OAuth2GetOpenIDConnectUserInfoResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_openid_connect_userinfo_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_openid_connect_userinfo
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_openid_connect_userinfo_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OAuth2GetOpenIDConnectUserInfoResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_openid_connect_userinfo_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/oauth2/userinfo',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_original_webhook_message(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MessageResponse:
+ """get_original_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_original_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_original_webhook_message_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MessageResponse]:
+ """get_original_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_original_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_original_webhook_message_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_original_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_original_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_original_webhook_message_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ thread_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ # process the query parameters
+ if thread_id is not None:
+
+ _query_params.append(('thread_id', thread_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/@original',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_public_keys(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> OAuth2GetKeys:
+ """get_public_keys
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_public_keys_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OAuth2GetKeys",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_public_keys_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[OAuth2GetKeys]:
+ """get_public_keys
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_public_keys_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OAuth2GetKeys",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_public_keys_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_public_keys
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_public_keys_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OAuth2GetKeys",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_public_keys_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/oauth2/keys',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_self_voice_state(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> VoiceStateResponse:
+ """get_self_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_self_voice_state_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VoiceStateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_self_voice_state_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[VoiceStateResponse]:
+ """get_self_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_self_voice_state_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VoiceStateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_self_voice_state_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_self_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_self_voice_state_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VoiceStateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_self_voice_state_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/voice-states/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_soundboard_default_sounds(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[SoundboardSoundResponse]:
+ """get_soundboard_default_sounds
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_soundboard_default_sounds_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[SoundboardSoundResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_soundboard_default_sounds_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[SoundboardSoundResponse]]:
+ """get_soundboard_default_sounds
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_soundboard_default_sounds_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[SoundboardSoundResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_soundboard_default_sounds_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_soundboard_default_sounds
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_soundboard_default_sounds_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[SoundboardSoundResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_soundboard_default_sounds_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/soundboard-default-sounds',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_stage_instance(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> StageInstanceResponse:
+ """get_stage_instance
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_stage_instance_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StageInstanceResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_stage_instance_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[StageInstanceResponse]:
+ """get_stage_instance
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_stage_instance_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StageInstanceResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_stage_instance_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_stage_instance
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_stage_instance_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StageInstanceResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_stage_instance_serialize(
+ self,
+ channel_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/stage-instances/{channel_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_sticker(
+ self,
+ sticker_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetSticker200Response:
+ """get_sticker
+
+
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_sticker_serialize(
+ sticker_id=sticker_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetSticker200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_sticker_with_http_info(
+ self,
+ sticker_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetSticker200Response]:
+ """get_sticker
+
+
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_sticker_serialize(
+ sticker_id=sticker_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetSticker200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_sticker_without_preload_content(
+ self,
+ sticker_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_sticker
+
+
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_sticker_serialize(
+ sticker_id=sticker_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetSticker200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_sticker_serialize(
+ self,
+ sticker_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if sticker_id is not None:
+ _path_params['sticker_id'] = sticker_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/stickers/{sticker_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_sticker_pack(
+ self,
+ pack_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> StickerPackResponse:
+ """get_sticker_pack
+
+
+ :param pack_id: (required)
+ :type pack_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_sticker_pack_serialize(
+ pack_id=pack_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StickerPackResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_sticker_pack_with_http_info(
+ self,
+ pack_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[StickerPackResponse]:
+ """get_sticker_pack
+
+
+ :param pack_id: (required)
+ :type pack_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_sticker_pack_serialize(
+ pack_id=pack_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StickerPackResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_sticker_pack_without_preload_content(
+ self,
+ pack_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_sticker_pack
+
+
+ :param pack_id: (required)
+ :type pack_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_sticker_pack_serialize(
+ pack_id=pack_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StickerPackResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_sticker_pack_serialize(
+ self,
+ pack_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if pack_id is not None:
+ _path_params['pack_id'] = pack_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/sticker-packs/{pack_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_thread_member(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ with_member: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ThreadMemberResponse:
+ """get_thread_member
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param with_member:
+ :type with_member: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_thread_member_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ with_member=with_member,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_thread_member_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ with_member: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ThreadMemberResponse]:
+ """get_thread_member
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param with_member:
+ :type with_member: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_thread_member_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ with_member=with_member,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_thread_member_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ with_member: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_thread_member
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param with_member:
+ :type with_member: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_thread_member_serialize(
+ channel_id=channel_id,
+ user_id=user_id,
+ with_member=with_member,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_thread_member_serialize(
+ self,
+ channel_id,
+ user_id,
+ with_member,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ if with_member is not None:
+
+ _query_params.append(('with_member', with_member))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/thread-members/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_user(
+ self,
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> UserResponse:
+ """get_user
+
+
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_user_serialize(
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_user_with_http_info(
+ self,
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[UserResponse]:
+ """get_user
+
+
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_user_serialize(
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_user_without_preload_content(
+ self,
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_user
+
+
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_user_serialize(
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_user_serialize(
+ self,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/users/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_voice_state(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> VoiceStateResponse:
+ """get_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_voice_state_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VoiceStateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_voice_state_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[VoiceStateResponse]:
+ """get_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_voice_state_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VoiceStateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_voice_state_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_voice_state_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VoiceStateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_voice_state_serialize(
+ self,
+ guild_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/voice-states/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_webhook(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListChannelWebhooks200ResponseInner:
+ """get_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_serialize(
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_webhook_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListChannelWebhooks200ResponseInner]:
+ """get_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_serialize(
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_webhook_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_serialize(
+ webhook_id=webhook_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_webhook_serialize(
+ self,
+ webhook_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/webhooks/{webhook_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_webhook_by_token(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListChannelWebhooks200ResponseInner:
+ """get_webhook_by_token
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_by_token_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_webhook_by_token_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListChannelWebhooks200ResponseInner]:
+ """get_webhook_by_token
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_by_token_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_webhook_by_token_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_webhook_by_token
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_by_token_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_webhook_by_token_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def get_webhook_message(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ message_id: Annotated[str, Field(strict=True)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MessageResponse:
+ """get_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param message_id: (required)
+ :type message_id: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ message_id=message_id,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def get_webhook_message_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ message_id: Annotated[str, Field(strict=True)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MessageResponse]:
+ """get_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param message_id: (required)
+ :type message_id: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ message_id=message_id,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def get_webhook_message_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ message_id: Annotated[str, Field(strict=True)],
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param message_id: (required)
+ :type message_id: str
+ :param thread_id:
+ :type thread_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ message_id=message_id,
+ thread_id=thread_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_webhook_message_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ message_id,
+ thread_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ if thread_id is not None:
+
+ _query_params.append(('thread_id', thread_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def invite_resolve(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ with_counts: Optional[StrictBool] = None,
+ guild_scheduled_event_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListChannelInvites200ResponseInner:
+ """invite_resolve
+
+
+ :param code: (required)
+ :type code: str
+ :param with_counts:
+ :type with_counts: bool
+ :param guild_scheduled_event_id:
+ :type guild_scheduled_event_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_resolve_serialize(
+ code=code,
+ with_counts=with_counts,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelInvites200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def invite_resolve_with_http_info(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ with_counts: Optional[StrictBool] = None,
+ guild_scheduled_event_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListChannelInvites200ResponseInner]:
+ """invite_resolve
+
+
+ :param code: (required)
+ :type code: str
+ :param with_counts:
+ :type with_counts: bool
+ :param guild_scheduled_event_id:
+ :type guild_scheduled_event_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_resolve_serialize(
+ code=code,
+ with_counts=with_counts,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelInvites200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def invite_resolve_without_preload_content(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ with_counts: Optional[StrictBool] = None,
+ guild_scheduled_event_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """invite_resolve
+
+
+ :param code: (required)
+ :type code: str
+ :param with_counts:
+ :type with_counts: bool
+ :param guild_scheduled_event_id:
+ :type guild_scheduled_event_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_resolve_serialize(
+ code=code,
+ with_counts=with_counts,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelInvites200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _invite_resolve_serialize(
+ self,
+ code,
+ with_counts,
+ guild_scheduled_event_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if code is not None:
+ _path_params['code'] = code
+ # process the query parameters
+ if with_counts is not None:
+
+ _query_params.append(('with_counts', with_counts))
+
+ if guild_scheduled_event_id is not None:
+
+ _query_params.append(('guild_scheduled_event_id', guild_scheduled_event_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/invites/{code}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def invite_revoke(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListChannelInvites200ResponseInner:
+ """invite_revoke
+
+
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_revoke_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelInvites200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def invite_revoke_with_http_info(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListChannelInvites200ResponseInner]:
+ """invite_revoke
+
+
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_revoke_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelInvites200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def invite_revoke_without_preload_content(
+ self,
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """invite_revoke
+
+
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_revoke_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelInvites200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _invite_revoke_serialize(
+ self,
+ code,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if code is not None:
+ _path_params['code'] = code
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/invites/{code}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def join_thread(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """join_thread
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._join_thread_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def join_thread_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """join_thread
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._join_thread_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def join_thread_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """join_thread
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._join_thread_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _join_thread_serialize(
+ self,
+ channel_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/channels/{channel_id}/thread-members/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def leave_guild(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """leave_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._leave_guild_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def leave_guild_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """leave_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._leave_guild_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def leave_guild_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """leave_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._leave_guild_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _leave_guild_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/users/@me/guilds/{guild_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def leave_lobby(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """leave_lobby
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._leave_lobby_serialize(
+ lobby_id=lobby_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def leave_lobby_with_http_info(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """leave_lobby
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._leave_lobby_serialize(
+ lobby_id=lobby_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def leave_lobby_without_preload_content(
+ self,
+ lobby_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """leave_lobby
+
+
+ :param lobby_id: (required)
+ :type lobby_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._leave_lobby_serialize(
+ lobby_id=lobby_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _leave_lobby_serialize(
+ self,
+ lobby_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if lobby_id is not None:
+ _path_params['lobby_id'] = lobby_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/lobbies/{lobby_id}/members/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def leave_thread(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """leave_thread
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._leave_thread_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def leave_thread_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """leave_thread
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._leave_thread_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def leave_thread_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """leave_thread
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._leave_thread_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _leave_thread_serialize(
+ self,
+ channel_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/channels/{channel_id}/thread-members/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_application_commands(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ with_localizations: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ApplicationCommandResponse]:
+ """list_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param with_localizations:
+ :type with_localizations: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_application_commands_serialize(
+ application_id=application_id,
+ with_localizations=with_localizations,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_application_commands_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ with_localizations: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ApplicationCommandResponse]]:
+ """list_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param with_localizations:
+ :type with_localizations: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_application_commands_serialize(
+ application_id=application_id,
+ with_localizations=with_localizations,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_application_commands_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ with_localizations: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param with_localizations:
+ :type with_localizations: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_application_commands_serialize(
+ application_id=application_id,
+ with_localizations=with_localizations,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_application_commands_serialize(
+ self,
+ application_id,
+ with_localizations,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ if with_localizations is not None:
+
+ _query_params.append(('with_localizations', with_localizations))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/commands',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_application_emojis(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListApplicationEmojisResponse:
+ """list_application_emojis
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_application_emojis_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListApplicationEmojisResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_application_emojis_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListApplicationEmojisResponse]:
+ """list_application_emojis
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_application_emojis_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListApplicationEmojisResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_application_emojis_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_application_emojis
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_application_emojis_serialize(
+ application_id=application_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListApplicationEmojisResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_application_emojis_serialize(
+ self,
+ application_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/emojis',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_auto_moderation_rules(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ListAutoModerationRules200ResponseInner]:
+ """list_auto_moderation_rules
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_auto_moderation_rules_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListAutoModerationRules200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_auto_moderation_rules_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ListAutoModerationRules200ResponseInner]]:
+ """list_auto_moderation_rules
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_auto_moderation_rules_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListAutoModerationRules200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_auto_moderation_rules_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_auto_moderation_rules
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_auto_moderation_rules_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListAutoModerationRules200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_auto_moderation_rules_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/auto-moderation/rules',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_channel_invites(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ListChannelInvites200ResponseInner]:
+ """list_channel_invites
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_channel_invites_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelInvites200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_channel_invites_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ListChannelInvites200ResponseInner]]:
+ """list_channel_invites
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_channel_invites_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelInvites200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_channel_invites_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_channel_invites
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_channel_invites_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelInvites200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_channel_invites_serialize(
+ self,
+ channel_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/invites',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_channel_webhooks(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ListChannelWebhooks200ResponseInner]:
+ """list_channel_webhooks
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_channel_webhooks_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelWebhooks200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_channel_webhooks_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ListChannelWebhooks200ResponseInner]]:
+ """list_channel_webhooks
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_channel_webhooks_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelWebhooks200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_channel_webhooks_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_channel_webhooks
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_channel_webhooks_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelWebhooks200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_channel_webhooks_serialize(
+ self,
+ channel_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/webhooks',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_application_command_permissions(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[CommandPermissionsResponse]:
+ """list_guild_application_command_permissions
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_application_command_permissions_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[CommandPermissionsResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_application_command_permissions_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[CommandPermissionsResponse]]:
+ """list_guild_application_command_permissions
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_application_command_permissions_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[CommandPermissionsResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_application_command_permissions_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_application_command_permissions
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_application_command_permissions_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[CommandPermissionsResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_application_command_permissions_serialize(
+ self,
+ application_id,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/guilds/{guild_id}/commands/permissions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_application_commands(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ with_localizations: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ApplicationCommandResponse]:
+ """list_guild_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param with_localizations:
+ :type with_localizations: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_application_commands_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ with_localizations=with_localizations,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_application_commands_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ with_localizations: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ApplicationCommandResponse]]:
+ """list_guild_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param with_localizations:
+ :type with_localizations: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_application_commands_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ with_localizations=with_localizations,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_application_commands_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ with_localizations: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_application_commands
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param with_localizations:
+ :type with_localizations: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_application_commands_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ with_localizations=with_localizations,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationCommandResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_application_commands_serialize(
+ self,
+ application_id,
+ guild_id,
+ with_localizations,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ if with_localizations is not None:
+
+ _query_params.append(('with_localizations', with_localizations))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/applications/{application_id}/guilds/{guild_id}/commands',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_audit_log_entries(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ target_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ action_type: Optional[StrictInt] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildAuditLogResponse:
+ """list_guild_audit_log_entries
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id:
+ :type user_id: str
+ :param target_id:
+ :type target_id: str
+ :param action_type:
+ :type action_type: int
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_audit_log_entries_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ target_id=target_id,
+ action_type=action_type,
+ before=before,
+ after=after,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildAuditLogResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_audit_log_entries_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ target_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ action_type: Optional[StrictInt] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildAuditLogResponse]:
+ """list_guild_audit_log_entries
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id:
+ :type user_id: str
+ :param target_id:
+ :type target_id: str
+ :param action_type:
+ :type action_type: int
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_audit_log_entries_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ target_id=target_id,
+ action_type=action_type,
+ before=before,
+ after=after,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildAuditLogResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_audit_log_entries_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ target_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ action_type: Optional[StrictInt] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_audit_log_entries
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id:
+ :type user_id: str
+ :param target_id:
+ :type target_id: str
+ :param action_type:
+ :type action_type: int
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_audit_log_entries_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ target_id=target_id,
+ action_type=action_type,
+ before=before,
+ after=after,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildAuditLogResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_audit_log_entries_serialize(
+ self,
+ guild_id,
+ user_id,
+ target_id,
+ action_type,
+ before,
+ after,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ if user_id is not None:
+
+ _query_params.append(('user_id', user_id))
+
+ if target_id is not None:
+
+ _query_params.append(('target_id', target_id))
+
+ if action_type is not None:
+
+ _query_params.append(('action_type', action_type))
+
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ if after is not None:
+
+ _query_params.append(('after', after))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/audit-logs',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_bans(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GuildBanResponse]:
+ """list_guild_bans
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param limit:
+ :type limit: int
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_bans_serialize(
+ guild_id=guild_id,
+ limit=limit,
+ before=before,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildBanResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_bans_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GuildBanResponse]]:
+ """list_guild_bans
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param limit:
+ :type limit: int
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_bans_serialize(
+ guild_id=guild_id,
+ limit=limit,
+ before=before,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildBanResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_bans_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_bans
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param limit:
+ :type limit: int
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_bans_serialize(
+ guild_id=guild_id,
+ limit=limit,
+ before=before,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildBanResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_bans_serialize(
+ self,
+ guild_id,
+ limit,
+ before,
+ after,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ if after is not None:
+
+ _query_params.append(('after', after))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/bans',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_channels(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GetChannel200Response]:
+ """list_guild_channels
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_channels_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetChannel200Response]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_channels_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GetChannel200Response]]:
+ """list_guild_channels
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_channels_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetChannel200Response]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_channels_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_channels
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_channels_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetChannel200Response]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_channels_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/channels',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_emojis(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[EmojiResponse]:
+ """list_guild_emojis
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_emojis_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[EmojiResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_emojis_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[EmojiResponse]]:
+ """list_guild_emojis
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_emojis_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[EmojiResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_emojis_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_emojis
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_emojis_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[EmojiResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_emojis_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/emojis',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_integrations(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ListGuildIntegrations200ResponseInner]:
+ """list_guild_integrations
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_integrations_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListGuildIntegrations200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_integrations_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ListGuildIntegrations200ResponseInner]]:
+ """list_guild_integrations
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_integrations_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListGuildIntegrations200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_integrations_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_integrations
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_integrations_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListGuildIntegrations200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_integrations_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/integrations',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_invites(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ListChannelInvites200ResponseInner]:
+ """list_guild_invites
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_invites_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelInvites200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_invites_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ListChannelInvites200ResponseInner]]:
+ """list_guild_invites
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_invites_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelInvites200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_invites_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_invites
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_invites_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListChannelInvites200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_invites_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/invites',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_members(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
+ after: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GuildMemberResponse]:
+ """list_guild_members
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param limit:
+ :type limit: int
+ :param after:
+ :type after: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_members_serialize(
+ guild_id=guild_id,
+ limit=limit,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_members_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
+ after: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GuildMemberResponse]]:
+ """list_guild_members
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param limit:
+ :type limit: int
+ :param after:
+ :type after: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_members_serialize(
+ guild_id=guild_id,
+ limit=limit,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_members_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
+ after: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_members
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param limit:
+ :type limit: int
+ :param after:
+ :type after: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_members_serialize(
+ guild_id=guild_id,
+ limit=limit,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_members_serialize(
+ self,
+ guild_id,
+ limit,
+ after,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if after is not None:
+
+ _query_params.append(('after', after))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/members',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_roles(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GuildRoleResponse]:
+ """list_guild_roles
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_roles_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildRoleResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_roles_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GuildRoleResponse]]:
+ """list_guild_roles
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_roles_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildRoleResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_roles_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_roles
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_roles_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildRoleResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_roles_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/roles',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_scheduled_event_users(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ with_member: Optional[StrictBool] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ScheduledEventUserResponse]:
+ """list_guild_scheduled_event_users
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param with_member:
+ :type with_member: bool
+ :param limit:
+ :type limit: int
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_scheduled_event_users_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ with_member=with_member,
+ limit=limit,
+ before=before,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ScheduledEventUserResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_scheduled_event_users_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ with_member: Optional[StrictBool] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ScheduledEventUserResponse]]:
+ """list_guild_scheduled_event_users
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param with_member:
+ :type with_member: bool
+ :param limit:
+ :type limit: int
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_scheduled_event_users_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ with_member=with_member,
+ limit=limit,
+ before=before,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ScheduledEventUserResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_scheduled_event_users_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ with_member: Optional[StrictBool] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_scheduled_event_users
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param with_member:
+ :type with_member: bool
+ :param limit:
+ :type limit: int
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_scheduled_event_users_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ with_member=with_member,
+ limit=limit,
+ before=before,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ScheduledEventUserResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_scheduled_event_users_serialize(
+ self,
+ guild_id,
+ guild_scheduled_event_id,
+ with_member,
+ limit,
+ before,
+ after,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if guild_scheduled_event_id is not None:
+ _path_params['guild_scheduled_event_id'] = guild_scheduled_event_id
+ # process the query parameters
+ if with_member is not None:
+
+ _query_params.append(('with_member', with_member))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ if after is not None:
+
+ _query_params.append(('after', after))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_scheduled_events(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ with_user_count: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ListGuildScheduledEvents200ResponseInner]:
+ """list_guild_scheduled_events
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param with_user_count:
+ :type with_user_count: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_scheduled_events_serialize(
+ guild_id=guild_id,
+ with_user_count=with_user_count,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListGuildScheduledEvents200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_scheduled_events_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ with_user_count: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ListGuildScheduledEvents200ResponseInner]]:
+ """list_guild_scheduled_events
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param with_user_count:
+ :type with_user_count: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_scheduled_events_serialize(
+ guild_id=guild_id,
+ with_user_count=with_user_count,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListGuildScheduledEvents200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_scheduled_events_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ with_user_count: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_scheduled_events
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param with_user_count:
+ :type with_user_count: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_scheduled_events_serialize(
+ guild_id=guild_id,
+ with_user_count=with_user_count,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListGuildScheduledEvents200ResponseInner]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_scheduled_events_serialize(
+ self,
+ guild_id,
+ with_user_count,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ if with_user_count is not None:
+
+ _query_params.append(('with_user_count', with_user_count))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/scheduled-events',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_soundboard_sounds(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListGuildSoundboardSoundsResponse:
+ """list_guild_soundboard_sounds
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_soundboard_sounds_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildSoundboardSoundsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_soundboard_sounds_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListGuildSoundboardSoundsResponse]:
+ """list_guild_soundboard_sounds
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_soundboard_sounds_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildSoundboardSoundsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_soundboard_sounds_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_soundboard_sounds
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_soundboard_sounds_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildSoundboardSoundsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_soundboard_sounds_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/soundboard-sounds',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_stickers(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GuildStickerResponse]:
+ """list_guild_stickers
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_stickers_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildStickerResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_stickers_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GuildStickerResponse]]:
+ """list_guild_stickers
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_stickers_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildStickerResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_stickers_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_stickers
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_stickers_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildStickerResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_stickers_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/stickers',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_templates(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GuildTemplateResponse]:
+ """list_guild_templates
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_templates_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildTemplateResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_templates_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GuildTemplateResponse]]:
+ """list_guild_templates
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_templates_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildTemplateResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_templates_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_templates
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_templates_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildTemplateResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_templates_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/templates',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_guild_voice_regions(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[VoiceRegionResponse]:
+ """list_guild_voice_regions
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_voice_regions_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[VoiceRegionResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_guild_voice_regions_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[VoiceRegionResponse]]:
+ """list_guild_voice_regions
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_voice_regions_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[VoiceRegionResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_guild_voice_regions_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_guild_voice_regions
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_guild_voice_regions_serialize(
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[VoiceRegionResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_guild_voice_regions_serialize(
+ self,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/regions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_message_reactions_by_emoji(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ type: Optional[StrictInt] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[UserResponse]:
+ """list_message_reactions_by_emoji
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param type:
+ :type type: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_message_reactions_by_emoji_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ after=after,
+ limit=limit,
+ type=type,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[UserResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_message_reactions_by_emoji_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ type: Optional[StrictInt] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[UserResponse]]:
+ """list_message_reactions_by_emoji
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param type:
+ :type type: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_message_reactions_by_emoji_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ after=after,
+ limit=limit,
+ type=type,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[UserResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_message_reactions_by_emoji_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ emoji_name: Annotated[str, Field(strict=True, max_length=152133)],
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ type: Optional[StrictInt] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_message_reactions_by_emoji
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param emoji_name: (required)
+ :type emoji_name: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param type:
+ :type type: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_message_reactions_by_emoji_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ emoji_name=emoji_name,
+ after=after,
+ limit=limit,
+ type=type,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[UserResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_message_reactions_by_emoji_serialize(
+ self,
+ channel_id,
+ message_id,
+ emoji_name,
+ after,
+ limit,
+ type,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ if emoji_name is not None:
+ _path_params['emoji_name'] = emoji_name
+ # process the query parameters
+ if after is not None:
+
+ _query_params.append(('after', after))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if type is not None:
+
+ _query_params.append(('type', type))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_messages(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ around: Optional[Annotated[str, Field(strict=True)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[MessageResponse]:
+ """list_messages
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param around:
+ :type around: str
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_messages_serialize(
+ channel_id=channel_id,
+ around=around,
+ before=before,
+ after=after,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[MessageResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_messages_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ around: Optional[Annotated[str, Field(strict=True)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[MessageResponse]]:
+ """list_messages
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param around:
+ :type around: str
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_messages_serialize(
+ channel_id=channel_id,
+ around=around,
+ before=before,
+ after=after,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[MessageResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_messages_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ around: Optional[Annotated[str, Field(strict=True)]] = None,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_messages
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param around:
+ :type around: str
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_messages_serialize(
+ channel_id=channel_id,
+ around=around,
+ before=before,
+ after=after,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[MessageResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_messages_serialize(
+ self,
+ channel_id,
+ around,
+ before,
+ after,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ if around is not None:
+
+ _query_params.append(('around', around))
+
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ if after is not None:
+
+ _query_params.append(('after', after))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/messages',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_my_connections(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ConnectedAccountResponse]:
+ """list_my_connections
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_my_connections_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ConnectedAccountResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_my_connections_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ConnectedAccountResponse]]:
+ """list_my_connections
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_my_connections_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ConnectedAccountResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_my_connections_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_my_connections
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_my_connections_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ConnectedAccountResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_my_connections_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/users/@me/connections',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_my_guilds(
+ self,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
+ with_counts: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[MyGuildResponse]:
+ """list_my_guilds
+
+
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param with_counts:
+ :type with_counts: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_my_guilds_serialize(
+ before=before,
+ after=after,
+ limit=limit,
+ with_counts=with_counts,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[MyGuildResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_my_guilds_with_http_info(
+ self,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
+ with_counts: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[MyGuildResponse]]:
+ """list_my_guilds
+
+
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param with_counts:
+ :type with_counts: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_my_guilds_serialize(
+ before=before,
+ after=after,
+ limit=limit,
+ with_counts=with_counts,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[MyGuildResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_my_guilds_without_preload_content(
+ self,
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
+ with_counts: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_my_guilds
+
+
+ :param before:
+ :type before: str
+ :param after:
+ :type after: str
+ :param limit:
+ :type limit: int
+ :param with_counts:
+ :type with_counts: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_my_guilds_serialize(
+ before=before,
+ after=after,
+ limit=limit,
+ with_counts=with_counts,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[MyGuildResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_my_guilds_serialize(
+ self,
+ before,
+ after,
+ limit,
+ with_counts,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ if after is not None:
+
+ _query_params.append(('after', after))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if with_counts is not None:
+
+ _query_params.append(('with_counts', with_counts))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/users/@me/guilds',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_my_private_archived_threads(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ThreadsResponse:
+ """list_my_private_archived_threads
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_my_private_archived_threads_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_my_private_archived_threads_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ThreadsResponse]:
+ """list_my_private_archived_threads
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_my_private_archived_threads_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_my_private_archived_threads_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[Annotated[str, Field(strict=True)]] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_my_private_archived_threads
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: str
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_my_private_archived_threads_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_my_private_archived_threads_serialize(
+ self,
+ channel_id,
+ before,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/users/@me/threads/archived/private',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_pins(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[datetime] = None,
+ limit: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PinnedMessagesResponse:
+ """list_pins
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: datetime
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_pins_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PinnedMessagesResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_pins_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[datetime] = None,
+ limit: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PinnedMessagesResponse]:
+ """list_pins
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: datetime
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_pins_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PinnedMessagesResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_pins_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[datetime] = None,
+ limit: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_pins
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: datetime
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_pins_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PinnedMessagesResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_pins_serialize(
+ self,
+ channel_id,
+ before,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ if before is not None:
+ if isinstance(before, datetime):
+ _query_params.append(
+ (
+ 'before',
+ before.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('before', before))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/messages/pins',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_private_archived_threads(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[datetime] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ThreadsResponse:
+ """list_private_archived_threads
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: datetime
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_private_archived_threads_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_private_archived_threads_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[datetime] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ThreadsResponse]:
+ """list_private_archived_threads
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: datetime
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_private_archived_threads_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_private_archived_threads_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[datetime] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_private_archived_threads
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: datetime
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_private_archived_threads_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_private_archived_threads_serialize(
+ self,
+ channel_id,
+ before,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ if before is not None:
+ if isinstance(before, datetime):
+ _query_params.append(
+ (
+ 'before',
+ before.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('before', before))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/threads/archived/private',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_public_archived_threads(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[datetime] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ThreadsResponse:
+ """list_public_archived_threads
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: datetime
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_public_archived_threads_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_public_archived_threads_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[datetime] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ThreadsResponse]:
+ """list_public_archived_threads
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: datetime
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_public_archived_threads_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_public_archived_threads_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ before: Optional[datetime] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_public_archived_threads
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param before:
+ :type before: datetime
+ :param limit:
+ :type limit: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_public_archived_threads_serialize(
+ channel_id=channel_id,
+ before=before,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_public_archived_threads_serialize(
+ self,
+ channel_id,
+ before,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ if before is not None:
+ if isinstance(before, datetime):
+ _query_params.append(
+ (
+ 'before',
+ before.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('before', before))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/threads/archived/public',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_sticker_packs(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> StickerPackCollectionResponse:
+ """list_sticker_packs
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_sticker_packs_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StickerPackCollectionResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_sticker_packs_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[StickerPackCollectionResponse]:
+ """list_sticker_packs
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_sticker_packs_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StickerPackCollectionResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_sticker_packs_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_sticker_packs
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_sticker_packs_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StickerPackCollectionResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_sticker_packs_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/sticker-packs',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_thread_members(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ with_member: Optional[StrictBool] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ThreadMemberResponse]:
+ """list_thread_members
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param with_member:
+ :type with_member: bool
+ :param limit:
+ :type limit: int
+ :param after:
+ :type after: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_thread_members_serialize(
+ channel_id=channel_id,
+ with_member=with_member,
+ limit=limit,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ThreadMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_thread_members_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ with_member: Optional[StrictBool] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ThreadMemberResponse]]:
+ """list_thread_members
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param with_member:
+ :type with_member: bool
+ :param limit:
+ :type limit: int
+ :param after:
+ :type after: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_thread_members_serialize(
+ channel_id=channel_id,
+ with_member=with_member,
+ limit=limit,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ThreadMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_thread_members_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ with_member: Optional[StrictBool] = None,
+ limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
+ after: Optional[Annotated[str, Field(strict=True)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_thread_members
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param with_member:
+ :type with_member: bool
+ :param limit:
+ :type limit: int
+ :param after:
+ :type after: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_thread_members_serialize(
+ channel_id=channel_id,
+ with_member=with_member,
+ limit=limit,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ThreadMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_thread_members_serialize(
+ self,
+ channel_id,
+ with_member,
+ limit,
+ after,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ if with_member is not None:
+
+ _query_params.append(('with_member', with_member))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if after is not None:
+
+ _query_params.append(('after', after))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/thread-members',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def list_voice_regions(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[VoiceRegionResponse]:
+ """list_voice_regions
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_voice_regions_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[VoiceRegionResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def list_voice_regions_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[VoiceRegionResponse]]:
+ """list_voice_regions
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_voice_regions_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[VoiceRegionResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def list_voice_regions_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_voice_regions
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_voice_regions_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[VoiceRegionResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_voice_regions_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/voice/regions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def partner_sdk_token(
+ self,
+ partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ProvisionalTokenResponse:
+ """partner_sdk_token
+
+
+ :param partner_sdk_unmerge_provisional_account_request: (required)
+ :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._partner_sdk_token_serialize(
+ partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ProvisionalTokenResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def partner_sdk_token_with_http_info(
+ self,
+ partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ProvisionalTokenResponse]:
+ """partner_sdk_token
+
+
+ :param partner_sdk_unmerge_provisional_account_request: (required)
+ :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._partner_sdk_token_serialize(
+ partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ProvisionalTokenResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def partner_sdk_token_without_preload_content(
+ self,
+ partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """partner_sdk_token
+
+
+ :param partner_sdk_unmerge_provisional_account_request: (required)
+ :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._partner_sdk_token_serialize(
+ partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ProvisionalTokenResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _partner_sdk_token_serialize(
+ self,
+ partner_sdk_unmerge_provisional_account_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if partner_sdk_unmerge_provisional_account_request is not None:
+ _body_params = partner_sdk_unmerge_provisional_account_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/partner-sdk/token',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def partner_sdk_unmerge_provisional_account(
+ self,
+ partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """partner_sdk_unmerge_provisional_account
+
+
+ :param partner_sdk_unmerge_provisional_account_request: (required)
+ :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._partner_sdk_unmerge_provisional_account_serialize(
+ partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def partner_sdk_unmerge_provisional_account_with_http_info(
+ self,
+ partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """partner_sdk_unmerge_provisional_account
+
+
+ :param partner_sdk_unmerge_provisional_account_request: (required)
+ :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._partner_sdk_unmerge_provisional_account_serialize(
+ partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def partner_sdk_unmerge_provisional_account_without_preload_content(
+ self,
+ partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """partner_sdk_unmerge_provisional_account
+
+
+ :param partner_sdk_unmerge_provisional_account_request: (required)
+ :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._partner_sdk_unmerge_provisional_account_serialize(
+ partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _partner_sdk_unmerge_provisional_account_serialize(
+ self,
+ partner_sdk_unmerge_provisional_account_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if partner_sdk_unmerge_provisional_account_request is not None:
+ _body_params = partner_sdk_unmerge_provisional_account_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/partner-sdk/provisional-accounts/unmerge',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def poll_expire(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MessageResponse:
+ """poll_expire
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._poll_expire_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def poll_expire_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MessageResponse]:
+ """poll_expire
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._poll_expire_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def poll_expire_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """poll_expire
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._poll_expire_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _poll_expire_serialize(
+ self,
+ channel_id,
+ message_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/polls/{message_id}/expire',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def preview_prune_guild(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ days: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = None,
+ include_roles: Optional[Any] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildPruneResponse:
+ """preview_prune_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param days:
+ :type days: int
+ :param include_roles:
+ :type include_roles: GetEntitlementsSkuIdsParameter
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._preview_prune_guild_serialize(
+ guild_id=guild_id,
+ days=days,
+ include_roles=include_roles,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildPruneResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def preview_prune_guild_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ days: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = None,
+ include_roles: Optional[Any] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildPruneResponse]:
+ """preview_prune_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param days:
+ :type days: int
+ :param include_roles:
+ :type include_roles: GetEntitlementsSkuIdsParameter
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._preview_prune_guild_serialize(
+ guild_id=guild_id,
+ days=days,
+ include_roles=include_roles,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildPruneResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def preview_prune_guild_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ days: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = None,
+ include_roles: Optional[Any] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """preview_prune_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param days:
+ :type days: int
+ :param include_roles:
+ :type include_roles: GetEntitlementsSkuIdsParameter
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._preview_prune_guild_serialize(
+ guild_id=guild_id,
+ days=days,
+ include_roles=include_roles,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildPruneResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _preview_prune_guild_serialize(
+ self,
+ guild_id,
+ days,
+ include_roles,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ if days is not None:
+
+ _query_params.append(('days', days))
+
+ if include_roles is not None:
+
+ _query_params.append(('include_roles', include_roles))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/prune',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def prune_guild(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ prune_guild_request: PruneGuildRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildPruneResponse:
+ """prune_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param prune_guild_request: (required)
+ :type prune_guild_request: PruneGuildRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._prune_guild_serialize(
+ guild_id=guild_id,
+ prune_guild_request=prune_guild_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildPruneResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def prune_guild_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ prune_guild_request: PruneGuildRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildPruneResponse]:
+ """prune_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param prune_guild_request: (required)
+ :type prune_guild_request: PruneGuildRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._prune_guild_serialize(
+ guild_id=guild_id,
+ prune_guild_request=prune_guild_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildPruneResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def prune_guild_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ prune_guild_request: PruneGuildRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """prune_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param prune_guild_request: (required)
+ :type prune_guild_request: PruneGuildRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._prune_guild_serialize(
+ guild_id=guild_id,
+ prune_guild_request=prune_guild_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildPruneResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _prune_guild_serialize(
+ self,
+ guild_id,
+ prune_guild_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if prune_guild_request is not None:
+ _body_params = prune_guild_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/prune',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def put_guilds_onboarding(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_guild_onboarding_request: UpdateGuildOnboardingRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildOnboardingResponse:
+ """put_guilds_onboarding
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_guild_onboarding_request: (required)
+ :type update_guild_onboarding_request: UpdateGuildOnboardingRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._put_guilds_onboarding_serialize(
+ guild_id=guild_id,
+ update_guild_onboarding_request=update_guild_onboarding_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildOnboardingResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def put_guilds_onboarding_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_guild_onboarding_request: UpdateGuildOnboardingRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildOnboardingResponse]:
+ """put_guilds_onboarding
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_guild_onboarding_request: (required)
+ :type update_guild_onboarding_request: UpdateGuildOnboardingRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._put_guilds_onboarding_serialize(
+ guild_id=guild_id,
+ update_guild_onboarding_request=update_guild_onboarding_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildOnboardingResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def put_guilds_onboarding_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_guild_onboarding_request: UpdateGuildOnboardingRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """put_guilds_onboarding
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_guild_onboarding_request: (required)
+ :type update_guild_onboarding_request: UpdateGuildOnboardingRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._put_guilds_onboarding_serialize(
+ guild_id=guild_id,
+ update_guild_onboarding_request=update_guild_onboarding_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildOnboardingResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _put_guilds_onboarding_serialize(
+ self,
+ guild_id,
+ update_guild_onboarding_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_guild_onboarding_request is not None:
+ _body_params = update_guild_onboarding_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/guilds/{guild_id}/onboarding',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def search_guild_members(
+ self,
+ limit: Annotated[int, Field(le=1000, strict=True, ge=1)],
+ query: Annotated[str, Field(min_length=1, strict=True, max_length=100)],
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GuildMemberResponse]:
+ """search_guild_members
+
+
+ :param limit: (required)
+ :type limit: int
+ :param query: (required)
+ :type query: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._search_guild_members_serialize(
+ limit=limit,
+ query=query,
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def search_guild_members_with_http_info(
+ self,
+ limit: Annotated[int, Field(le=1000, strict=True, ge=1)],
+ query: Annotated[str, Field(min_length=1, strict=True, max_length=100)],
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GuildMemberResponse]]:
+ """search_guild_members
+
+
+ :param limit: (required)
+ :type limit: int
+ :param query: (required)
+ :type query: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._search_guild_members_serialize(
+ limit=limit,
+ query=query,
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def search_guild_members_without_preload_content(
+ self,
+ limit: Annotated[int, Field(le=1000, strict=True, ge=1)],
+ query: Annotated[str, Field(min_length=1, strict=True, max_length=100)],
+ guild_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """search_guild_members
+
+
+ :param limit: (required)
+ :type limit: int
+ :param query: (required)
+ :type query: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._search_guild_members_serialize(
+ limit=limit,
+ query=query,
+ guild_id=guild_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GuildMemberResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _search_guild_members_serialize(
+ self,
+ limit,
+ query,
+ guild_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if query is not None:
+
+ _query_params.append(('query', query))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/guilds/{guild_id}/members/search',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def send_soundboard_sound(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ soundboard_sound_send_request: SoundboardSoundSendRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """send_soundboard_sound
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param soundboard_sound_send_request: (required)
+ :type soundboard_sound_send_request: SoundboardSoundSendRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._send_soundboard_sound_serialize(
+ channel_id=channel_id,
+ soundboard_sound_send_request=soundboard_sound_send_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def send_soundboard_sound_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ soundboard_sound_send_request: SoundboardSoundSendRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """send_soundboard_sound
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param soundboard_sound_send_request: (required)
+ :type soundboard_sound_send_request: SoundboardSoundSendRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._send_soundboard_sound_serialize(
+ channel_id=channel_id,
+ soundboard_sound_send_request=soundboard_sound_send_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def send_soundboard_sound_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ soundboard_sound_send_request: SoundboardSoundSendRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """send_soundboard_sound
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param soundboard_sound_send_request: (required)
+ :type soundboard_sound_send_request: SoundboardSoundSendRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._send_soundboard_sound_serialize(
+ channel_id=channel_id,
+ soundboard_sound_send_request=soundboard_sound_send_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _send_soundboard_sound_serialize(
+ self,
+ channel_id,
+ soundboard_sound_send_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if soundboard_sound_send_request is not None:
+ _body_params = soundboard_sound_send_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/send-soundboard-sound',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def set_channel_permission_overwrite(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ overwrite_id: Annotated[str, Field(strict=True)],
+ set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """set_channel_permission_overwrite
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param overwrite_id: (required)
+ :type overwrite_id: str
+ :param set_channel_permission_overwrite_request: (required)
+ :type set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._set_channel_permission_overwrite_serialize(
+ channel_id=channel_id,
+ overwrite_id=overwrite_id,
+ set_channel_permission_overwrite_request=set_channel_permission_overwrite_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def set_channel_permission_overwrite_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ overwrite_id: Annotated[str, Field(strict=True)],
+ set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """set_channel_permission_overwrite
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param overwrite_id: (required)
+ :type overwrite_id: str
+ :param set_channel_permission_overwrite_request: (required)
+ :type set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._set_channel_permission_overwrite_serialize(
+ channel_id=channel_id,
+ overwrite_id=overwrite_id,
+ set_channel_permission_overwrite_request=set_channel_permission_overwrite_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def set_channel_permission_overwrite_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ overwrite_id: Annotated[str, Field(strict=True)],
+ set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """set_channel_permission_overwrite
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param overwrite_id: (required)
+ :type overwrite_id: str
+ :param set_channel_permission_overwrite_request: (required)
+ :type set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._set_channel_permission_overwrite_serialize(
+ channel_id=channel_id,
+ overwrite_id=overwrite_id,
+ set_channel_permission_overwrite_request=set_channel_permission_overwrite_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_channel_permission_overwrite_serialize(
+ self,
+ channel_id,
+ overwrite_id,
+ set_channel_permission_overwrite_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if overwrite_id is not None:
+ _path_params['overwrite_id'] = overwrite_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if set_channel_permission_overwrite_request is not None:
+ _body_params = set_channel_permission_overwrite_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/channels/{channel_id}/permissions/{overwrite_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def set_guild_application_command_permissions(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CommandPermissionsResponse:
+ """set_guild_application_command_permissions
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param set_guild_application_command_permissions_request: (required)
+ :type set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._set_guild_application_command_permissions_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ set_guild_application_command_permissions_request=set_guild_application_command_permissions_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CommandPermissionsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def set_guild_application_command_permissions_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CommandPermissionsResponse]:
+ """set_guild_application_command_permissions
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param set_guild_application_command_permissions_request: (required)
+ :type set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._set_guild_application_command_permissions_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ set_guild_application_command_permissions_request=set_guild_application_command_permissions_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CommandPermissionsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def set_guild_application_command_permissions_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """set_guild_application_command_permissions
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param set_guild_application_command_permissions_request: (required)
+ :type set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._set_guild_application_command_permissions_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ set_guild_application_command_permissions_request=set_guild_application_command_permissions_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CommandPermissionsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_guild_application_command_permissions_serialize(
+ self,
+ application_id,
+ guild_id,
+ command_id,
+ set_guild_application_command_permissions_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if command_id is not None:
+ _path_params['command_id'] = command_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if set_guild_application_command_permissions_request is not None:
+ _body_params = set_guild_application_command_permissions_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def set_guild_mfa_level(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ set_guild_mfa_level_request: SetGuildMfaLevelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildMFALevelResponse:
+ """set_guild_mfa_level
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param set_guild_mfa_level_request: (required)
+ :type set_guild_mfa_level_request: SetGuildMfaLevelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._set_guild_mfa_level_serialize(
+ guild_id=guild_id,
+ set_guild_mfa_level_request=set_guild_mfa_level_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildMFALevelResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def set_guild_mfa_level_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ set_guild_mfa_level_request: SetGuildMfaLevelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildMFALevelResponse]:
+ """set_guild_mfa_level
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param set_guild_mfa_level_request: (required)
+ :type set_guild_mfa_level_request: SetGuildMfaLevelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._set_guild_mfa_level_serialize(
+ guild_id=guild_id,
+ set_guild_mfa_level_request=set_guild_mfa_level_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildMFALevelResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def set_guild_mfa_level_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ set_guild_mfa_level_request: SetGuildMfaLevelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """set_guild_mfa_level
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param set_guild_mfa_level_request: (required)
+ :type set_guild_mfa_level_request: SetGuildMfaLevelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._set_guild_mfa_level_serialize(
+ guild_id=guild_id,
+ set_guild_mfa_level_request=set_guild_mfa_level_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildMFALevelResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_guild_mfa_level_serialize(
+ self,
+ guild_id,
+ set_guild_mfa_level_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if set_guild_mfa_level_request is not None:
+ _body_params = set_guild_mfa_level_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/guilds/{guild_id}/mfa',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def sync_guild_template(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildTemplateResponse:
+ """sync_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._sync_guild_template_serialize(
+ guild_id=guild_id,
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def sync_guild_template_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildTemplateResponse]:
+ """sync_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._sync_guild_template_serialize(
+ guild_id=guild_id,
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def sync_guild_template_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """sync_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param code: (required)
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._sync_guild_template_serialize(
+ guild_id=guild_id,
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _sync_guild_template_serialize(
+ self,
+ guild_id,
+ code,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if code is not None:
+ _path_params['code'] = code
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/guilds/{guild_id}/templates/{code}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def thread_search(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None,
+ slop: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = None,
+ min_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ max_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ tag: Optional[Any] = None,
+ tag_setting: Optional[StrictStr] = None,
+ archived: Optional[StrictBool] = None,
+ sort_by: Optional[StrictStr] = None,
+ sort_order: Optional[StrictStr] = None,
+ limit: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None,
+ offset: Optional[Annotated[int, Field(le=9975, strict=True, ge=0)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ThreadSearchResponse:
+ """thread_search
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param name:
+ :type name: str
+ :param slop:
+ :type slop: int
+ :param min_id:
+ :type min_id: str
+ :param max_id:
+ :type max_id: str
+ :param tag:
+ :type tag: ThreadSearchTagParameter
+ :param tag_setting:
+ :type tag_setting: str
+ :param archived:
+ :type archived: bool
+ :param sort_by:
+ :type sort_by: str
+ :param sort_order:
+ :type sort_order: str
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._thread_search_serialize(
+ channel_id=channel_id,
+ name=name,
+ slop=slop,
+ min_id=min_id,
+ max_id=max_id,
+ tag=tag,
+ tag_setting=tag_setting,
+ archived=archived,
+ sort_by=sort_by,
+ sort_order=sort_order,
+ limit=limit,
+ offset=offset,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadSearchResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def thread_search_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None,
+ slop: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = None,
+ min_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ max_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ tag: Optional[Any] = None,
+ tag_setting: Optional[StrictStr] = None,
+ archived: Optional[StrictBool] = None,
+ sort_by: Optional[StrictStr] = None,
+ sort_order: Optional[StrictStr] = None,
+ limit: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None,
+ offset: Optional[Annotated[int, Field(le=9975, strict=True, ge=0)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ThreadSearchResponse]:
+ """thread_search
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param name:
+ :type name: str
+ :param slop:
+ :type slop: int
+ :param min_id:
+ :type min_id: str
+ :param max_id:
+ :type max_id: str
+ :param tag:
+ :type tag: ThreadSearchTagParameter
+ :param tag_setting:
+ :type tag_setting: str
+ :param archived:
+ :type archived: bool
+ :param sort_by:
+ :type sort_by: str
+ :param sort_order:
+ :type sort_order: str
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._thread_search_serialize(
+ channel_id=channel_id,
+ name=name,
+ slop=slop,
+ min_id=min_id,
+ max_id=max_id,
+ tag=tag,
+ tag_setting=tag_setting,
+ archived=archived,
+ sort_by=sort_by,
+ sort_order=sort_order,
+ limit=limit,
+ offset=offset,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadSearchResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def thread_search_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None,
+ slop: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = None,
+ min_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ max_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ tag: Optional[Any] = None,
+ tag_setting: Optional[StrictStr] = None,
+ archived: Optional[StrictBool] = None,
+ sort_by: Optional[StrictStr] = None,
+ sort_order: Optional[StrictStr] = None,
+ limit: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None,
+ offset: Optional[Annotated[int, Field(le=9975, strict=True, ge=0)]] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """thread_search
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param name:
+ :type name: str
+ :param slop:
+ :type slop: int
+ :param min_id:
+ :type min_id: str
+ :param max_id:
+ :type max_id: str
+ :param tag:
+ :type tag: ThreadSearchTagParameter
+ :param tag_setting:
+ :type tag_setting: str
+ :param archived:
+ :type archived: bool
+ :param sort_by:
+ :type sort_by: str
+ :param sort_order:
+ :type sort_order: str
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._thread_search_serialize(
+ channel_id=channel_id,
+ name=name,
+ slop=slop,
+ min_id=min_id,
+ max_id=max_id,
+ tag=tag,
+ tag_setting=tag_setting,
+ archived=archived,
+ sort_by=sort_by,
+ sort_order=sort_order,
+ limit=limit,
+ offset=offset,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ThreadSearchResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _thread_search_serialize(
+ self,
+ channel_id,
+ name,
+ slop,
+ min_id,
+ max_id,
+ tag,
+ tag_setting,
+ archived,
+ sort_by,
+ sort_order,
+ limit,
+ offset,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ if name is not None:
+
+ _query_params.append(('name', name))
+
+ if slop is not None:
+
+ _query_params.append(('slop', slop))
+
+ if min_id is not None:
+
+ _query_params.append(('min_id', min_id))
+
+ if max_id is not None:
+
+ _query_params.append(('max_id', max_id))
+
+ if tag is not None:
+
+ _query_params.append(('tag', tag))
+
+ if tag_setting is not None:
+
+ _query_params.append(('tag_setting', tag_setting))
+
+ if archived is not None:
+
+ _query_params.append(('archived', archived))
+
+ if sort_by is not None:
+
+ _query_params.append(('sort_by', sort_by))
+
+ if sort_order is not None:
+
+ _query_params.append(('sort_order', sort_order))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if offset is not None:
+
+ _query_params.append(('offset', offset))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/channels/{channel_id}/threads/search',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def trigger_typing_indicator(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> object:
+ """trigger_typing_indicator
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._trigger_typing_indicator_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "object",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def trigger_typing_indicator_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[object]:
+ """trigger_typing_indicator
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._trigger_typing_indicator_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "object",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def trigger_typing_indicator_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """trigger_typing_indicator
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._trigger_typing_indicator_serialize(
+ channel_id=channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "object",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _trigger_typing_indicator_serialize(
+ self,
+ channel_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/channels/{channel_id}/typing',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def unban_user_from_guild(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """unban_user_from_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unban_user_from_guild_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def unban_user_from_guild_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """unban_user_from_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unban_user_from_guild_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def unban_user_from_guild_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """unban_user_from_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unban_user_from_guild_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _unban_user_from_guild_serialize(
+ self,
+ guild_id,
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/guilds/{guild_id}/bans/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_application(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_form_partial: ApplicationFormPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PrivateApplicationResponse:
+ """update_application
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_form_partial: (required)
+ :type application_form_partial: ApplicationFormPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_serialize(
+ application_id=application_id,
+ application_form_partial=application_form_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_application_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_form_partial: ApplicationFormPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PrivateApplicationResponse]:
+ """update_application
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_form_partial: (required)
+ :type application_form_partial: ApplicationFormPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_serialize(
+ application_id=application_id,
+ application_form_partial=application_form_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_application_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_form_partial: ApplicationFormPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_application
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_form_partial: (required)
+ :type application_form_partial: ApplicationFormPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_serialize(
+ application_id=application_id,
+ application_form_partial=application_form_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_application_serialize(
+ self,
+ application_id,
+ application_form_partial,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if application_form_partial is not None:
+ _body_params = application_form_partial
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/applications/{application_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_application_command(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ application_command_patch_request_partial: ApplicationCommandPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApplicationCommandResponse:
+ """update_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param application_command_patch_request_partial: (required)
+ :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_command_serialize(
+ application_id=application_id,
+ command_id=command_id,
+ application_command_patch_request_partial=application_command_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_application_command_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ application_command_patch_request_partial: ApplicationCommandPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ApplicationCommandResponse]:
+ """update_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param application_command_patch_request_partial: (required)
+ :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_command_serialize(
+ application_id=application_id,
+ command_id=command_id,
+ application_command_patch_request_partial=application_command_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_application_command_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ application_command_patch_request_partial: ApplicationCommandPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param application_command_patch_request_partial: (required)
+ :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_command_serialize(
+ application_id=application_id,
+ command_id=command_id,
+ application_command_patch_request_partial=application_command_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_application_command_serialize(
+ self,
+ application_id,
+ command_id,
+ application_command_patch_request_partial,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if command_id is not None:
+ _path_params['command_id'] = command_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if application_command_patch_request_partial is not None:
+ _body_params = application_command_patch_request_partial
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/applications/{application_id}/commands/{command_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_application_emoji(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ update_application_emoji_request: UpdateApplicationEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EmojiResponse:
+ """update_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param update_application_emoji_request: (required)
+ :type update_application_emoji_request: UpdateApplicationEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_emoji_serialize(
+ application_id=application_id,
+ emoji_id=emoji_id,
+ update_application_emoji_request=update_application_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_application_emoji_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ update_application_emoji_request: UpdateApplicationEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EmojiResponse]:
+ """update_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param update_application_emoji_request: (required)
+ :type update_application_emoji_request: UpdateApplicationEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_emoji_serialize(
+ application_id=application_id,
+ emoji_id=emoji_id,
+ update_application_emoji_request=update_application_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_application_emoji_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ update_application_emoji_request: UpdateApplicationEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_application_emoji
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param update_application_emoji_request: (required)
+ :type update_application_emoji_request: UpdateApplicationEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_emoji_serialize(
+ application_id=application_id,
+ emoji_id=emoji_id,
+ update_application_emoji_request=update_application_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_application_emoji_serialize(
+ self,
+ application_id,
+ emoji_id,
+ update_application_emoji_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if emoji_id is not None:
+ _path_params['emoji_id'] = emoji_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_application_emoji_request is not None:
+ _body_params = update_application_emoji_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/applications/{application_id}/emojis/{emoji_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_application_role_connections_metadata(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_role_connections_metadata_item_request: Optional[Annotated[List[ApplicationRoleConnectionsMetadataItemRequest], Field(max_length=5)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ApplicationRoleConnectionsMetadataItemResponse]:
+ """update_application_role_connections_metadata
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_role_connections_metadata_item_request: (required)
+ :type application_role_connections_metadata_item_request: List[ApplicationRoleConnectionsMetadataItemRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_role_connections_metadata_serialize(
+ application_id=application_id,
+ application_role_connections_metadata_item_request=application_role_connections_metadata_item_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationRoleConnectionsMetadataItemResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_application_role_connections_metadata_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_role_connections_metadata_item_request: Optional[Annotated[List[ApplicationRoleConnectionsMetadataItemRequest], Field(max_length=5)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ApplicationRoleConnectionsMetadataItemResponse]]:
+ """update_application_role_connections_metadata
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_role_connections_metadata_item_request: (required)
+ :type application_role_connections_metadata_item_request: List[ApplicationRoleConnectionsMetadataItemRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_role_connections_metadata_serialize(
+ application_id=application_id,
+ application_role_connections_metadata_item_request=application_role_connections_metadata_item_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationRoleConnectionsMetadataItemResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_application_role_connections_metadata_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ application_role_connections_metadata_item_request: Optional[Annotated[List[ApplicationRoleConnectionsMetadataItemRequest], Field(max_length=5)]],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_application_role_connections_metadata
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param application_role_connections_metadata_item_request: (required)
+ :type application_role_connections_metadata_item_request: List[ApplicationRoleConnectionsMetadataItemRequest]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_role_connections_metadata_serialize(
+ application_id=application_id,
+ application_role_connections_metadata_item_request=application_role_connections_metadata_item_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ApplicationRoleConnectionsMetadataItemResponse]",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_application_role_connections_metadata_serialize(
+ self,
+ application_id,
+ application_role_connections_metadata_item_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'ApplicationRoleConnectionsMetadataItemRequest': '',
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if application_role_connections_metadata_item_request is not None:
+ _body_params = application_role_connections_metadata_item_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/applications/{application_id}/role-connections/metadata',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_application_user_role_connection(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApplicationUserRoleConnectionResponse:
+ """update_application_user_role_connection
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param update_application_user_role_connection_request: (required)
+ :type update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_user_role_connection_serialize(
+ application_id=application_id,
+ update_application_user_role_connection_request=update_application_user_role_connection_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationUserRoleConnectionResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_application_user_role_connection_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ApplicationUserRoleConnectionResponse]:
+ """update_application_user_role_connection
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param update_application_user_role_connection_request: (required)
+ :type update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_user_role_connection_serialize(
+ application_id=application_id,
+ update_application_user_role_connection_request=update_application_user_role_connection_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationUserRoleConnectionResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_application_user_role_connection_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_application_user_role_connection
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param update_application_user_role_connection_request: (required)
+ :type update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_application_user_role_connection_serialize(
+ application_id=application_id,
+ update_application_user_role_connection_request=update_application_user_role_connection_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationUserRoleConnectionResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_application_user_role_connection_serialize(
+ self,
+ application_id,
+ update_application_user_role_connection_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_application_user_role_connection_request is not None:
+ _body_params = update_application_user_role_connection_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/users/@me/applications/{application_id}/role-connection',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_auto_moderation_rule(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ rule_id: Annotated[str, Field(strict=True)],
+ update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateAutoModerationRule200Response:
+ """update_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param rule_id: (required)
+ :type rule_id: str
+ :param update_auto_moderation_rule_request: (required)
+ :type update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ rule_id=rule_id,
+ update_auto_moderation_rule_request=update_auto_moderation_rule_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateAutoModerationRule200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_auto_moderation_rule_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ rule_id: Annotated[str, Field(strict=True)],
+ update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateAutoModerationRule200Response]:
+ """update_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param rule_id: (required)
+ :type rule_id: str
+ :param update_auto_moderation_rule_request: (required)
+ :type update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ rule_id=rule_id,
+ update_auto_moderation_rule_request=update_auto_moderation_rule_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateAutoModerationRule200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_auto_moderation_rule_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ rule_id: Annotated[str, Field(strict=True)],
+ update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_auto_moderation_rule
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param rule_id: (required)
+ :type rule_id: str
+ :param update_auto_moderation_rule_request: (required)
+ :type update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_auto_moderation_rule_serialize(
+ guild_id=guild_id,
+ rule_id=rule_id,
+ update_auto_moderation_rule_request=update_auto_moderation_rule_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateAutoModerationRule200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_auto_moderation_rule_serialize(
+ self,
+ guild_id,
+ rule_id,
+ update_auto_moderation_rule_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if rule_id is not None:
+ _path_params['rule_id'] = rule_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_auto_moderation_rule_request is not None:
+ _body_params = update_auto_moderation_rule_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/auto-moderation/rules/{rule_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_channel(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ update_channel_request: UpdateChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetChannel200Response:
+ """update_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param update_channel_request: (required)
+ :type update_channel_request: UpdateChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_channel_serialize(
+ channel_id=channel_id,
+ update_channel_request=update_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetChannel200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_channel_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ update_channel_request: UpdateChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetChannel200Response]:
+ """update_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param update_channel_request: (required)
+ :type update_channel_request: UpdateChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_channel_serialize(
+ channel_id=channel_id,
+ update_channel_request=update_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetChannel200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_channel_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ update_channel_request: UpdateChannelRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_channel
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param update_channel_request: (required)
+ :type update_channel_request: UpdateChannelRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_channel_serialize(
+ channel_id=channel_id,
+ update_channel_request=update_channel_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetChannel200Response",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_channel_serialize(
+ self,
+ channel_id,
+ update_channel_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_channel_request is not None:
+ _body_params = update_channel_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/channels/{channel_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_patch_request_partial: GuildPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildResponse:
+ """update_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_patch_request_partial: (required)
+ :type guild_patch_request_partial: GuildPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_serialize(
+ guild_id=guild_id,
+ guild_patch_request_partial=guild_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_patch_request_partial: GuildPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildResponse]:
+ """update_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_patch_request_partial: (required)
+ :type guild_patch_request_partial: GuildPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_serialize(
+ guild_id=guild_id,
+ guild_patch_request_partial=guild_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_patch_request_partial: GuildPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_patch_request_partial: (required)
+ :type guild_patch_request_partial: GuildPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_serialize(
+ guild_id=guild_id,
+ guild_patch_request_partial=guild_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_serialize(
+ self,
+ guild_id,
+ guild_patch_request_partial,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if guild_patch_request_partial is not None:
+ _body_params = guild_patch_request_partial
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild_application_command(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ application_command_patch_request_partial: ApplicationCommandPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApplicationCommandResponse:
+ """update_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param application_command_patch_request_partial: (required)
+ :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ application_command_patch_request_partial=application_command_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_application_command_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ application_command_patch_request_partial: ApplicationCommandPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ApplicationCommandResponse]:
+ """update_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param application_command_patch_request_partial: (required)
+ :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ application_command_patch_request_partial=application_command_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_application_command_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ guild_id: Annotated[str, Field(strict=True)],
+ command_id: Annotated[str, Field(strict=True)],
+ application_command_patch_request_partial: ApplicationCommandPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild_application_command
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param guild_id: (required)
+ :type guild_id: str
+ :param command_id: (required)
+ :type command_id: str
+ :param application_command_patch_request_partial: (required)
+ :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_application_command_serialize(
+ application_id=application_id,
+ guild_id=guild_id,
+ command_id=command_id,
+ application_command_patch_request_partial=application_command_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ApplicationCommandResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_application_command_serialize(
+ self,
+ application_id,
+ guild_id,
+ command_id,
+ application_command_patch_request_partial,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if command_id is not None:
+ _path_params['command_id'] = command_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if application_command_patch_request_partial is not None:
+ _body_params = application_command_patch_request_partial
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/applications/{application_id}/guilds/{guild_id}/commands/{command_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild_emoji(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ update_guild_emoji_request: UpdateGuildEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EmojiResponse:
+ """update_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param update_guild_emoji_request: (required)
+ :type update_guild_emoji_request: UpdateGuildEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_emoji_serialize(
+ guild_id=guild_id,
+ emoji_id=emoji_id,
+ update_guild_emoji_request=update_guild_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_emoji_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ update_guild_emoji_request: UpdateGuildEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EmojiResponse]:
+ """update_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param update_guild_emoji_request: (required)
+ :type update_guild_emoji_request: UpdateGuildEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_emoji_serialize(
+ guild_id=guild_id,
+ emoji_id=emoji_id,
+ update_guild_emoji_request=update_guild_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_emoji_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ emoji_id: Annotated[str, Field(strict=True)],
+ update_guild_emoji_request: UpdateGuildEmojiRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild_emoji
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param emoji_id: (required)
+ :type emoji_id: str
+ :param update_guild_emoji_request: (required)
+ :type update_guild_emoji_request: UpdateGuildEmojiRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_emoji_serialize(
+ guild_id=guild_id,
+ emoji_id=emoji_id,
+ update_guild_emoji_request=update_guild_emoji_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EmojiResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_emoji_serialize(
+ self,
+ guild_id,
+ emoji_id,
+ update_guild_emoji_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if emoji_id is not None:
+ _path_params['emoji_id'] = emoji_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_guild_emoji_request is not None:
+ _body_params = update_guild_emoji_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/emojis/{emoji_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild_member(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ update_guild_member_request: UpdateGuildMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildMemberResponse:
+ """update_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param update_guild_member_request: (required)
+ :type update_guild_member_request: UpdateGuildMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ update_guild_member_request=update_guild_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildMemberResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_member_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ update_guild_member_request: UpdateGuildMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildMemberResponse]:
+ """update_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param update_guild_member_request: (required)
+ :type update_guild_member_request: UpdateGuildMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ update_guild_member_request=update_guild_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildMemberResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_member_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ update_guild_member_request: UpdateGuildMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param update_guild_member_request: (required)
+ :type update_guild_member_request: UpdateGuildMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_member_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ update_guild_member_request=update_guild_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildMemberResponse",
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_member_serialize(
+ self,
+ guild_id,
+ user_id,
+ update_guild_member_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_guild_member_request is not None:
+ _body_params = update_guild_member_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/members/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild_role(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ create_guild_role_request: CreateGuildRoleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildRoleResponse:
+ """update_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param create_guild_role_request: (required)
+ :type create_guild_role_request: CreateGuildRoleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_role_serialize(
+ guild_id=guild_id,
+ role_id=role_id,
+ create_guild_role_request=create_guild_role_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildRoleResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_role_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ create_guild_role_request: CreateGuildRoleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildRoleResponse]:
+ """update_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param create_guild_role_request: (required)
+ :type create_guild_role_request: CreateGuildRoleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_role_serialize(
+ guild_id=guild_id,
+ role_id=role_id,
+ create_guild_role_request=create_guild_role_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildRoleResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_role_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ role_id: Annotated[str, Field(strict=True)],
+ create_guild_role_request: CreateGuildRoleRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild_role
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param role_id: (required)
+ :type role_id: str
+ :param create_guild_role_request: (required)
+ :type create_guild_role_request: CreateGuildRoleRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_role_serialize(
+ guild_id=guild_id,
+ role_id=role_id,
+ create_guild_role_request=create_guild_role_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildRoleResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_role_serialize(
+ self,
+ guild_id,
+ role_id,
+ create_guild_role_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if role_id is not None:
+ _path_params['role_id'] = role_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_guild_role_request is not None:
+ _body_params = create_guild_role_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/roles/{role_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild_scheduled_event(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListGuildScheduledEvents200ResponseInner:
+ """update_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param update_guild_scheduled_event_request: (required)
+ :type update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ update_guild_scheduled_event_request=update_guild_scheduled_event_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildScheduledEvents200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_scheduled_event_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListGuildScheduledEvents200ResponseInner]:
+ """update_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param update_guild_scheduled_event_request: (required)
+ :type update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ update_guild_scheduled_event_request=update_guild_scheduled_event_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildScheduledEvents200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_scheduled_event_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ guild_scheduled_event_id: Annotated[str, Field(strict=True)],
+ update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild_scheduled_event
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param guild_scheduled_event_id: (required)
+ :type guild_scheduled_event_id: str
+ :param update_guild_scheduled_event_request: (required)
+ :type update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_scheduled_event_serialize(
+ guild_id=guild_id,
+ guild_scheduled_event_id=guild_scheduled_event_id,
+ update_guild_scheduled_event_request=update_guild_scheduled_event_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListGuildScheduledEvents200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_scheduled_event_serialize(
+ self,
+ guild_id,
+ guild_scheduled_event_id,
+ update_guild_scheduled_event_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if guild_scheduled_event_id is not None:
+ _path_params['guild_scheduled_event_id'] = guild_scheduled_event_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_guild_scheduled_event_request is not None:
+ _body_params = update_guild_scheduled_event_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild_soundboard_sound(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sound_id: Annotated[str, Field(strict=True)],
+ soundboard_patch_request_partial: SoundboardPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SoundboardSoundResponse:
+ """update_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sound_id: (required)
+ :type sound_id: str
+ :param soundboard_patch_request_partial: (required)
+ :type soundboard_patch_request_partial: SoundboardPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ sound_id=sound_id,
+ soundboard_patch_request_partial=soundboard_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SoundboardSoundResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_soundboard_sound_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sound_id: Annotated[str, Field(strict=True)],
+ soundboard_patch_request_partial: SoundboardPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SoundboardSoundResponse]:
+ """update_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sound_id: (required)
+ :type sound_id: str
+ :param soundboard_patch_request_partial: (required)
+ :type soundboard_patch_request_partial: SoundboardPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ sound_id=sound_id,
+ soundboard_patch_request_partial=soundboard_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SoundboardSoundResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_soundboard_sound_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sound_id: Annotated[str, Field(strict=True)],
+ soundboard_patch_request_partial: SoundboardPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild_soundboard_sound
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sound_id: (required)
+ :type sound_id: str
+ :param soundboard_patch_request_partial: (required)
+ :type soundboard_patch_request_partial: SoundboardPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_soundboard_sound_serialize(
+ guild_id=guild_id,
+ sound_id=sound_id,
+ soundboard_patch_request_partial=soundboard_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SoundboardSoundResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_soundboard_sound_serialize(
+ self,
+ guild_id,
+ sound_id,
+ soundboard_patch_request_partial,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if sound_id is not None:
+ _path_params['sound_id'] = sound_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if soundboard_patch_request_partial is not None:
+ _body_params = soundboard_patch_request_partial
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/soundboard-sounds/{sound_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild_sticker(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sticker_id: Annotated[str, Field(strict=True)],
+ update_guild_sticker_request: UpdateGuildStickerRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildStickerResponse:
+ """update_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param update_guild_sticker_request: (required)
+ :type update_guild_sticker_request: UpdateGuildStickerRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_sticker_serialize(
+ guild_id=guild_id,
+ sticker_id=sticker_id,
+ update_guild_sticker_request=update_guild_sticker_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildStickerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_sticker_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sticker_id: Annotated[str, Field(strict=True)],
+ update_guild_sticker_request: UpdateGuildStickerRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildStickerResponse]:
+ """update_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param update_guild_sticker_request: (required)
+ :type update_guild_sticker_request: UpdateGuildStickerRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_sticker_serialize(
+ guild_id=guild_id,
+ sticker_id=sticker_id,
+ update_guild_sticker_request=update_guild_sticker_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildStickerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_sticker_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ sticker_id: Annotated[str, Field(strict=True)],
+ update_guild_sticker_request: UpdateGuildStickerRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild_sticker
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param sticker_id: (required)
+ :type sticker_id: str
+ :param update_guild_sticker_request: (required)
+ :type update_guild_sticker_request: UpdateGuildStickerRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_sticker_serialize(
+ guild_id=guild_id,
+ sticker_id=sticker_id,
+ update_guild_sticker_request=update_guild_sticker_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildStickerResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_sticker_serialize(
+ self,
+ guild_id,
+ sticker_id,
+ update_guild_sticker_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if sticker_id is not None:
+ _path_params['sticker_id'] = sticker_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_guild_sticker_request is not None:
+ _body_params = update_guild_sticker_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/stickers/{sticker_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild_template(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ update_guild_template_request: UpdateGuildTemplateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildTemplateResponse:
+ """update_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param code: (required)
+ :type code: str
+ :param update_guild_template_request: (required)
+ :type update_guild_template_request: UpdateGuildTemplateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_template_serialize(
+ guild_id=guild_id,
+ code=code,
+ update_guild_template_request=update_guild_template_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_template_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ update_guild_template_request: UpdateGuildTemplateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildTemplateResponse]:
+ """update_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param code: (required)
+ :type code: str
+ :param update_guild_template_request: (required)
+ :type update_guild_template_request: UpdateGuildTemplateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_template_serialize(
+ guild_id=guild_id,
+ code=code,
+ update_guild_template_request=update_guild_template_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_template_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ code: Annotated[str, Field(strict=True, max_length=152133)],
+ update_guild_template_request: UpdateGuildTemplateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild_template
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param code: (required)
+ :type code: str
+ :param update_guild_template_request: (required)
+ :type update_guild_template_request: UpdateGuildTemplateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_template_serialize(
+ guild_id=guild_id,
+ code=code,
+ update_guild_template_request=update_guild_template_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildTemplateResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_template_serialize(
+ self,
+ guild_id,
+ code,
+ update_guild_template_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if code is not None:
+ _path_params['code'] = code
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_guild_template_request is not None:
+ _body_params = update_guild_template_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/templates/{code}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild_welcome_screen(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GuildWelcomeScreenResponse:
+ """update_guild_welcome_screen
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param welcome_screen_patch_request_partial: (required)
+ :type welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_welcome_screen_serialize(
+ guild_id=guild_id,
+ welcome_screen_patch_request_partial=welcome_screen_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildWelcomeScreenResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_welcome_screen_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GuildWelcomeScreenResponse]:
+ """update_guild_welcome_screen
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param welcome_screen_patch_request_partial: (required)
+ :type welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_welcome_screen_serialize(
+ guild_id=guild_id,
+ welcome_screen_patch_request_partial=welcome_screen_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildWelcomeScreenResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_welcome_screen_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild_welcome_screen
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param welcome_screen_patch_request_partial: (required)
+ :type welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_welcome_screen_serialize(
+ guild_id=guild_id,
+ welcome_screen_patch_request_partial=welcome_screen_patch_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GuildWelcomeScreenResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_welcome_screen_serialize(
+ self,
+ guild_id,
+ welcome_screen_patch_request_partial,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if welcome_screen_patch_request_partial is not None:
+ _body_params = welcome_screen_patch_request_partial
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/welcome-screen',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_guild_widget_settings(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> WidgetSettingsResponse:
+ """update_guild_widget_settings
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_guild_widget_settings_request: (required)
+ :type update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_widget_settings_serialize(
+ guild_id=guild_id,
+ update_guild_widget_settings_request=update_guild_widget_settings_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "WidgetSettingsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_guild_widget_settings_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[WidgetSettingsResponse]:
+ """update_guild_widget_settings
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_guild_widget_settings_request: (required)
+ :type update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_widget_settings_serialize(
+ guild_id=guild_id,
+ update_guild_widget_settings_request=update_guild_widget_settings_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "WidgetSettingsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_guild_widget_settings_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_guild_widget_settings
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_guild_widget_settings_request: (required)
+ :type update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_guild_widget_settings_serialize(
+ guild_id=guild_id,
+ update_guild_widget_settings_request=update_guild_widget_settings_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "WidgetSettingsResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_guild_widget_settings_serialize(
+ self,
+ guild_id,
+ update_guild_widget_settings_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_guild_widget_settings_request is not None:
+ _body_params = update_guild_widget_settings_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/widget',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_message(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ message_edit_request_partial: MessageEditRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MessageResponse:
+ """update_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param message_edit_request_partial: (required)
+ :type message_edit_request_partial: MessageEditRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ message_edit_request_partial=message_edit_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_message_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ message_edit_request_partial: MessageEditRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MessageResponse]:
+ """update_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param message_edit_request_partial: (required)
+ :type message_edit_request_partial: MessageEditRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ message_edit_request_partial=message_edit_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_message_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ message_id: Annotated[str, Field(strict=True)],
+ message_edit_request_partial: MessageEditRequestPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_message
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param message_id: (required)
+ :type message_id: str
+ :param message_edit_request_partial: (required)
+ :type message_edit_request_partial: MessageEditRequestPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_message_serialize(
+ channel_id=channel_id,
+ message_id=message_id,
+ message_edit_request_partial=message_edit_request_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_message_serialize(
+ self,
+ channel_id,
+ message_id,
+ message_edit_request_partial,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if message_edit_request_partial is not None:
+ _body_params = message_edit_request_partial
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'application/x-www-form-urlencoded',
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/channels/{channel_id}/messages/{message_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_my_application(
+ self,
+ application_form_partial: ApplicationFormPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PrivateApplicationResponse:
+ """update_my_application
+
+
+ :param application_form_partial: (required)
+ :type application_form_partial: ApplicationFormPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_my_application_serialize(
+ application_form_partial=application_form_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_my_application_with_http_info(
+ self,
+ application_form_partial: ApplicationFormPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PrivateApplicationResponse]:
+ """update_my_application
+
+
+ :param application_form_partial: (required)
+ :type application_form_partial: ApplicationFormPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_my_application_serialize(
+ application_form_partial=application_form_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_my_application_without_preload_content(
+ self,
+ application_form_partial: ApplicationFormPartial,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_my_application
+
+
+ :param application_form_partial: (required)
+ :type application_form_partial: ApplicationFormPartial
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_my_application_serialize(
+ application_form_partial=application_form_partial,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateApplicationResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_my_application_serialize(
+ self,
+ application_form_partial,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if application_form_partial is not None:
+ _body_params = application_form_partial
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/applications/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_my_guild_member(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_my_guild_member_request: UpdateMyGuildMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PrivateGuildMemberResponse:
+ """update_my_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_my_guild_member_request: (required)
+ :type update_my_guild_member_request: UpdateMyGuildMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_my_guild_member_serialize(
+ guild_id=guild_id,
+ update_my_guild_member_request=update_my_guild_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateGuildMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_my_guild_member_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_my_guild_member_request: UpdateMyGuildMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PrivateGuildMemberResponse]:
+ """update_my_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_my_guild_member_request: (required)
+ :type update_my_guild_member_request: UpdateMyGuildMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_my_guild_member_serialize(
+ guild_id=guild_id,
+ update_my_guild_member_request=update_my_guild_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateGuildMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_my_guild_member_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_my_guild_member_request: UpdateMyGuildMemberRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_my_guild_member
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_my_guild_member_request: (required)
+ :type update_my_guild_member_request: UpdateMyGuildMemberRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_my_guild_member_serialize(
+ guild_id=guild_id,
+ update_my_guild_member_request=update_my_guild_member_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PrivateGuildMemberResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_my_guild_member_serialize(
+ self,
+ guild_id,
+ update_my_guild_member_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_my_guild_member_request is not None:
+ _body_params = update_my_guild_member_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/members/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_my_user(
+ self,
+ bot_account_patch_request: BotAccountPatchRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> UserPIIResponse:
+ """update_my_user
+
+
+ :param bot_account_patch_request: (required)
+ :type bot_account_patch_request: BotAccountPatchRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_my_user_serialize(
+ bot_account_patch_request=bot_account_patch_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserPIIResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_my_user_with_http_info(
+ self,
+ bot_account_patch_request: BotAccountPatchRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[UserPIIResponse]:
+ """update_my_user
+
+
+ :param bot_account_patch_request: (required)
+ :type bot_account_patch_request: BotAccountPatchRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_my_user_serialize(
+ bot_account_patch_request=bot_account_patch_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserPIIResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_my_user_without_preload_content(
+ self,
+ bot_account_patch_request: BotAccountPatchRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_my_user
+
+
+ :param bot_account_patch_request: (required)
+ :type bot_account_patch_request: BotAccountPatchRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_my_user_serialize(
+ bot_account_patch_request=bot_account_patch_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserPIIResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_my_user_serialize(
+ self,
+ bot_account_patch_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if bot_account_patch_request is not None:
+ _body_params = bot_account_patch_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/users/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_original_webhook_message(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ with_components: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MessageResponse:
+ """update_original_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param incoming_webhook_update_request_partial: (required)
+ :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial
+ :param thread_id:
+ :type thread_id: str
+ :param with_components:
+ :type with_components: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_original_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ incoming_webhook_update_request_partial=incoming_webhook_update_request_partial,
+ thread_id=thread_id,
+ with_components=with_components,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_original_webhook_message_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ with_components: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MessageResponse]:
+ """update_original_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param incoming_webhook_update_request_partial: (required)
+ :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial
+ :param thread_id:
+ :type thread_id: str
+ :param with_components:
+ :type with_components: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_original_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ incoming_webhook_update_request_partial=incoming_webhook_update_request_partial,
+ thread_id=thread_id,
+ with_components=with_components,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_original_webhook_message_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ with_components: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_original_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param incoming_webhook_update_request_partial: (required)
+ :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial
+ :param thread_id:
+ :type thread_id: str
+ :param with_components:
+ :type with_components: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_original_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ incoming_webhook_update_request_partial=incoming_webhook_update_request_partial,
+ thread_id=thread_id,
+ with_components=with_components,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_original_webhook_message_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ incoming_webhook_update_request_partial,
+ thread_id,
+ with_components,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ # process the query parameters
+ if thread_id is not None:
+
+ _query_params.append(('thread_id', thread_id))
+
+ if with_components is not None:
+
+ _query_params.append(('with_components', with_components))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if incoming_webhook_update_request_partial is not None:
+ _body_params = incoming_webhook_update_request_partial
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'application/x-www-form-urlencoded',
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/@original',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_self_voice_state(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_self_voice_state_request: UpdateSelfVoiceStateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """update_self_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_self_voice_state_request: (required)
+ :type update_self_voice_state_request: UpdateSelfVoiceStateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_self_voice_state_serialize(
+ guild_id=guild_id,
+ update_self_voice_state_request=update_self_voice_state_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_self_voice_state_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_self_voice_state_request: UpdateSelfVoiceStateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """update_self_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_self_voice_state_request: (required)
+ :type update_self_voice_state_request: UpdateSelfVoiceStateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_self_voice_state_serialize(
+ guild_id=guild_id,
+ update_self_voice_state_request=update_self_voice_state_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_self_voice_state_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ update_self_voice_state_request: UpdateSelfVoiceStateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_self_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param update_self_voice_state_request: (required)
+ :type update_self_voice_state_request: UpdateSelfVoiceStateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_self_voice_state_serialize(
+ guild_id=guild_id,
+ update_self_voice_state_request=update_self_voice_state_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_self_voice_state_serialize(
+ self,
+ guild_id,
+ update_self_voice_state_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_self_voice_state_request is not None:
+ _body_params = update_self_voice_state_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/voice-states/@me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_stage_instance(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ update_stage_instance_request: UpdateStageInstanceRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> StageInstanceResponse:
+ """update_stage_instance
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param update_stage_instance_request: (required)
+ :type update_stage_instance_request: UpdateStageInstanceRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_stage_instance_serialize(
+ channel_id=channel_id,
+ update_stage_instance_request=update_stage_instance_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StageInstanceResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_stage_instance_with_http_info(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ update_stage_instance_request: UpdateStageInstanceRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[StageInstanceResponse]:
+ """update_stage_instance
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param update_stage_instance_request: (required)
+ :type update_stage_instance_request: UpdateStageInstanceRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_stage_instance_serialize(
+ channel_id=channel_id,
+ update_stage_instance_request=update_stage_instance_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StageInstanceResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_stage_instance_without_preload_content(
+ self,
+ channel_id: Annotated[str, Field(strict=True)],
+ update_stage_instance_request: UpdateStageInstanceRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_stage_instance
+
+
+ :param channel_id: (required)
+ :type channel_id: str
+ :param update_stage_instance_request: (required)
+ :type update_stage_instance_request: UpdateStageInstanceRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_stage_instance_serialize(
+ channel_id=channel_id,
+ update_stage_instance_request=update_stage_instance_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "StageInstanceResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_stage_instance_serialize(
+ self,
+ channel_id,
+ update_stage_instance_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if channel_id is not None:
+ _path_params['channel_id'] = channel_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_stage_instance_request is not None:
+ _body_params = update_stage_instance_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/stage-instances/{channel_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_voice_state(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ update_voice_state_request: UpdateVoiceStateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """update_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param update_voice_state_request: (required)
+ :type update_voice_state_request: UpdateVoiceStateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_voice_state_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ update_voice_state_request=update_voice_state_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_voice_state_with_http_info(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ update_voice_state_request: UpdateVoiceStateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """update_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param update_voice_state_request: (required)
+ :type update_voice_state_request: UpdateVoiceStateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_voice_state_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ update_voice_state_request=update_voice_state_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_voice_state_without_preload_content(
+ self,
+ guild_id: Annotated[str, Field(strict=True)],
+ user_id: Annotated[str, Field(strict=True)],
+ update_voice_state_request: UpdateVoiceStateRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_voice_state
+
+
+ :param guild_id: (required)
+ :type guild_id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param update_voice_state_request: (required)
+ :type update_voice_state_request: UpdateVoiceStateRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_voice_state_serialize(
+ guild_id=guild_id,
+ user_id=user_id,
+ update_voice_state_request=update_voice_state_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_voice_state_serialize(
+ self,
+ guild_id,
+ user_id,
+ update_voice_state_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if guild_id is not None:
+ _path_params['guild_id'] = guild_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_voice_state_request is not None:
+ _body_params = update_voice_state_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/guilds/{guild_id}/voice-states/{user_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_webhook(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ update_webhook_request: UpdateWebhookRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListChannelWebhooks200ResponseInner:
+ """update_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param update_webhook_request: (required)
+ :type update_webhook_request: UpdateWebhookRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_serialize(
+ webhook_id=webhook_id,
+ update_webhook_request=update_webhook_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_webhook_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ update_webhook_request: UpdateWebhookRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListChannelWebhooks200ResponseInner]:
+ """update_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param update_webhook_request: (required)
+ :type update_webhook_request: UpdateWebhookRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_serialize(
+ webhook_id=webhook_id,
+ update_webhook_request=update_webhook_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_webhook_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ update_webhook_request: UpdateWebhookRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_webhook
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param update_webhook_request: (required)
+ :type update_webhook_request: UpdateWebhookRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_serialize(
+ webhook_id=webhook_id,
+ update_webhook_request=update_webhook_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_webhook_serialize(
+ self,
+ webhook_id,
+ update_webhook_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_webhook_request is not None:
+ _body_params = update_webhook_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/webhooks/{webhook_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_webhook_by_token(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ update_webhook_by_token_request: UpdateWebhookByTokenRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListChannelWebhooks200ResponseInner:
+ """update_webhook_by_token
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param update_webhook_by_token_request: (required)
+ :type update_webhook_by_token_request: UpdateWebhookByTokenRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_by_token_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ update_webhook_by_token_request=update_webhook_by_token_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_webhook_by_token_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ update_webhook_by_token_request: UpdateWebhookByTokenRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListChannelWebhooks200ResponseInner]:
+ """update_webhook_by_token
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param update_webhook_by_token_request: (required)
+ :type update_webhook_by_token_request: UpdateWebhookByTokenRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_by_token_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ update_webhook_by_token_request=update_webhook_by_token_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_webhook_by_token_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ update_webhook_by_token_request: UpdateWebhookByTokenRequest,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_webhook_by_token
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param update_webhook_by_token_request: (required)
+ :type update_webhook_by_token_request: UpdateWebhookByTokenRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_by_token_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ update_webhook_by_token_request=update_webhook_by_token_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListChannelWebhooks200ResponseInner",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_webhook_by_token_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ update_webhook_by_token_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_webhook_by_token_request is not None:
+ _body_params = update_webhook_by_token_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def update_webhook_message(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ message_id: Annotated[str, Field(strict=True)],
+ incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ with_components: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MessageResponse:
+ """update_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param message_id: (required)
+ :type message_id: str
+ :param incoming_webhook_update_request_partial: (required)
+ :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial
+ :param thread_id:
+ :type thread_id: str
+ :param with_components:
+ :type with_components: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ message_id=message_id,
+ incoming_webhook_update_request_partial=incoming_webhook_update_request_partial,
+ thread_id=thread_id,
+ with_components=with_components,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def update_webhook_message_with_http_info(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ message_id: Annotated[str, Field(strict=True)],
+ incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ with_components: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MessageResponse]:
+ """update_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param message_id: (required)
+ :type message_id: str
+ :param incoming_webhook_update_request_partial: (required)
+ :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial
+ :param thread_id:
+ :type thread_id: str
+ :param with_components:
+ :type with_components: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ message_id=message_id,
+ incoming_webhook_update_request_partial=incoming_webhook_update_request_partial,
+ thread_id=thread_id,
+ with_components=with_components,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def update_webhook_message_without_preload_content(
+ self,
+ webhook_id: Annotated[str, Field(strict=True)],
+ webhook_token: Annotated[str, Field(strict=True, max_length=152133)],
+ message_id: Annotated[str, Field(strict=True)],
+ incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial,
+ thread_id: Optional[Annotated[str, Field(strict=True)]] = None,
+ with_components: Optional[StrictBool] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_webhook_message
+
+
+ :param webhook_id: (required)
+ :type webhook_id: str
+ :param webhook_token: (required)
+ :type webhook_token: str
+ :param message_id: (required)
+ :type message_id: str
+ :param incoming_webhook_update_request_partial: (required)
+ :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial
+ :param thread_id:
+ :type thread_id: str
+ :param with_components:
+ :type with_components: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_webhook_message_serialize(
+ webhook_id=webhook_id,
+ webhook_token=webhook_token,
+ message_id=message_id,
+ incoming_webhook_update_request_partial=incoming_webhook_update_request_partial,
+ thread_id=thread_id,
+ with_components=with_components,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_webhook_message_serialize(
+ self,
+ webhook_id,
+ webhook_token,
+ message_id,
+ incoming_webhook_update_request_partial,
+ thread_id,
+ with_components,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhook_id'] = webhook_id
+ if webhook_token is not None:
+ _path_params['webhook_token'] = webhook_token
+ if message_id is not None:
+ _path_params['message_id'] = message_id
+ # process the query parameters
+ if thread_id is not None:
+
+ _query_params.append(('thread_id', thread_id))
+
+ if with_components is not None:
+
+ _query_params.append(('with_components', with_components))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if incoming_webhook_update_request_partial is not None:
+ _body_params = incoming_webhook_update_request_partial
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'application/x-www-form-urlencoded',
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def upload_application_attachment(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ file: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ActivitiesAttachmentResponse:
+ """upload_application_attachment
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param file: (required)
+ :type file: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._upload_application_attachment_serialize(
+ application_id=application_id,
+ file=file,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ActivitiesAttachmentResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def upload_application_attachment_with_http_info(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ file: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ActivitiesAttachmentResponse]:
+ """upload_application_attachment
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param file: (required)
+ :type file: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._upload_application_attachment_serialize(
+ application_id=application_id,
+ file=file,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ActivitiesAttachmentResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def upload_application_attachment_without_preload_content(
+ self,
+ application_id: Annotated[str, Field(strict=True)],
+ file: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """upload_application_attachment
+
+
+ :param application_id: (required)
+ :type application_id: str
+ :param file: (required)
+ :type file: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._upload_application_attachment_serialize(
+ application_id=application_id,
+ file=file,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ActivitiesAttachmentResponse",
+ '4XX': "ErrorResponse",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _upload_application_attachment_serialize(
+ self,
+ application_id,
+ file,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if application_id is not None:
+ _path_params['application_id'] = application_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ if file is not None:
+ _form_params.append(('file', file))
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2',
+ 'OAuth2',
+ 'OAuth2',
+ 'BotToken'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/applications/{application_id}/attachment',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/dc_rest/api_client.py b/dc_rest/api_client.py
new file mode 100644
index 0000000..d6e72c9
--- /dev/null
+++ b/dc_rest/api_client.py
@@ -0,0 +1,838 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+import datetime
+from dateutil.parser import parse
+from enum import Enum
+import decimal
+import json
+import mimetypes
+import os
+import re
+import tempfile
+
+from urllib.parse import quote
+from typing import Tuple, Optional, List, Dict, Union
+from pydantic import SecretStr
+
+from dc_rest.configuration import Configuration
+from dc_rest.api_response import ApiResponse, T as ApiResponseT
+import dc_rest.models
+from dc_rest import rest
+from dc_rest.exceptions import (
+ ApiValueError,
+ ApiException,
+ BadRequestException,
+ UnauthorizedException,
+ ForbiddenException,
+ NotFoundException,
+ ServiceException
+)
+
+RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]]
+
+class ApiClient:
+ """Generic API client for OpenAPI client library builds.
+
+ OpenAPI generic API client. This client handles the client-
+ server communication, and is invariant across implementations. Specifics of
+ the methods and models for each application are generated from the OpenAPI
+ templates.
+
+ :param configuration: .Configuration object for this client
+ :param header_name: a header to pass when making calls to the API.
+ :param header_value: a header value to pass when making calls to
+ the API.
+ :param cookie: a cookie to include in the header when making calls
+ to the API
+ """
+
+ PRIMITIVE_TYPES = (float, bool, bytes, str, int)
+ NATIVE_TYPES_MAPPING = {
+ 'int': int,
+ 'long': int, # TODO remove as only py3 is supported?
+ 'float': float,
+ 'str': str,
+ 'bool': bool,
+ 'date': datetime.date,
+ 'datetime': datetime.datetime,
+ 'decimal': decimal.Decimal,
+ 'object': object,
+ }
+ _pool = None
+
+ def __init__(
+ self,
+ configuration=None,
+ header_name=None,
+ header_value=None,
+ cookie=None
+ ) -> None:
+ # use default configuration if none is provided
+ if configuration is None:
+ configuration = Configuration.get_default()
+ self.configuration = configuration
+
+ self.rest_client = rest.RESTClientObject(configuration)
+ self.default_headers = {}
+ if header_name is not None:
+ self.default_headers[header_name] = header_value
+ self.cookie = cookie
+ # Set default User-Agent.
+ self.user_agent = 'OpenAPI-Generator/10/python'
+ self.client_side_validation = configuration.client_side_validation
+
+ async def __aenter__(self):
+ return self
+
+ async def __aexit__(self, exc_type, exc_value, traceback):
+ await self.close()
+
+ async def close(self):
+ await self.rest_client.close()
+
+ @property
+ def user_agent(self):
+ """User agent for this API client"""
+ return self.default_headers['User-Agent']
+
+ @user_agent.setter
+ def user_agent(self, value):
+ self.default_headers['User-Agent'] = value
+
+ def set_default_header(self, header_name, header_value):
+ self.default_headers[header_name] = header_value
+
+
+ _default = None
+
+ @classmethod
+ def get_default(cls):
+ """Return new instance of ApiClient.
+
+ This method returns newly created, based on default constructor,
+ object of ApiClient class or returns a copy of default
+ ApiClient.
+
+ :return: The ApiClient object.
+ """
+ if cls._default is None:
+ cls._default = ApiClient()
+ return cls._default
+
+ @classmethod
+ def set_default(cls, default):
+ """Set default instance of ApiClient.
+
+ It stores default ApiClient.
+
+ :param default: object of ApiClient.
+ """
+ cls._default = default
+
+ def param_serialize(
+ self,
+ method,
+ resource_path,
+ path_params=None,
+ query_params=None,
+ header_params=None,
+ body=None,
+ post_params=None,
+ files=None, auth_settings=None,
+ collection_formats=None,
+ _host=None,
+ _request_auth=None
+ ) -> RequestSerialized:
+
+ """Builds the HTTP request params needed by the request.
+ :param method: Method to call.
+ :param resource_path: Path to method endpoint.
+ :param path_params: Path parameters in the url.
+ :param query_params: Query parameters in the url.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param auth_settings list: Auth Settings names for the request.
+ :param files dict: key -> filename, value -> filepath,
+ for `multipart/form-data`.
+ :param collection_formats: dict of collection formats for path, query,
+ header, and post parameters.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :return: tuple of form (path, http_method, query_params, header_params,
+ body, post_params, files)
+ """
+
+ config = self.configuration
+
+ # header parameters
+ header_params = header_params or {}
+ header_params.update(self.default_headers)
+ if self.cookie:
+ header_params['Cookie'] = self.cookie
+ if header_params:
+ header_params = self.sanitize_for_serialization(header_params)
+ header_params = dict(
+ self.parameters_to_tuples(header_params,collection_formats)
+ )
+
+ # path parameters
+ if path_params:
+ path_params = self.sanitize_for_serialization(path_params)
+ path_params = self.parameters_to_tuples(
+ path_params,
+ collection_formats
+ )
+ for k, v in path_params:
+ # specified safe chars, encode everything
+ resource_path = resource_path.replace(
+ '{%s}' % k,
+ quote(str(v), safe=config.safe_chars_for_path_param)
+ )
+
+ # post parameters
+ if post_params or files:
+ post_params = post_params if post_params else []
+ post_params = self.sanitize_for_serialization(post_params)
+ post_params = self.parameters_to_tuples(
+ post_params,
+ collection_formats
+ )
+ if files:
+ post_params.extend(self.files_parameters(files))
+
+ # auth setting
+ self.update_params_for_auth(
+ header_params,
+ query_params,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=_request_auth
+ )
+
+ # body
+ if body:
+ body = self.sanitize_for_serialization(body)
+
+ # request url
+ if _host is None or self.configuration.ignore_operation_servers:
+ url = self.configuration.host + resource_path
+ else:
+ # use server/host defined in path or operation instead
+ url = _host + resource_path
+
+ # query parameters
+ if query_params:
+ query_params = self.sanitize_for_serialization(query_params)
+ url_query = self.parameters_to_url_query(
+ query_params,
+ collection_formats
+ )
+ url += "?" + url_query
+
+ return method, url, header_params, body, post_params
+
+
+ async def call_api(
+ self,
+ method,
+ url,
+ header_params=None,
+ body=None,
+ post_params=None,
+ _request_timeout=None
+ ) -> rest.RESTResponse:
+ """Makes the HTTP request (synchronous)
+ :param method: Method to call.
+ :param url: Path to method endpoint.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param _request_timeout: timeout setting for this request.
+ :return: RESTResponse
+ """
+
+ try:
+ # perform request and return response
+ response_data = await self.rest_client.request(
+ method, url,
+ headers=header_params,
+ body=body, post_params=post_params,
+ _request_timeout=_request_timeout
+ )
+
+ except ApiException as e:
+ raise e
+
+ return response_data
+
+ def response_deserialize(
+ self,
+ response_data: rest.RESTResponse,
+ response_types_map: Optional[Dict[str, ApiResponseT]]=None
+ ) -> ApiResponse[ApiResponseT]:
+ """Deserializes response into an object.
+ :param response_data: RESTResponse object to be deserialized.
+ :param response_types_map: dict of response types.
+ :return: ApiResponse
+ """
+
+ msg = "RESTResponse.read() must be called before passing it to response_deserialize()"
+ assert response_data.data is not None, msg
+
+ response_type = response_types_map.get(str(response_data.status), None)
+ if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599:
+ # if not found, look for '1XX', '2XX', etc.
+ response_type = response_types_map.get(str(response_data.status)[0] + "XX", None)
+
+ # deserialize response data
+ response_text = None
+ return_data = None
+ try:
+ if response_type == "bytearray":
+ return_data = response_data.data
+ elif response_type == "file":
+ return_data = self.__deserialize_file(response_data)
+ elif response_type is not None:
+ match = None
+ content_type = response_data.getheader('content-type')
+ if content_type is not None:
+ match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
+ encoding = match.group(1) if match else "utf-8"
+ response_text = response_data.data.decode(encoding)
+ return_data = self.deserialize(response_text, response_type, content_type)
+ finally:
+ if not 200 <= response_data.status <= 299:
+ raise ApiException.from_response(
+ http_resp=response_data,
+ body=response_text,
+ data=return_data,
+ )
+
+ return ApiResponse(
+ status_code = response_data.status,
+ data = return_data,
+ headers = response_data.getheaders(),
+ raw_data = response_data.data
+ )
+
+ def sanitize_for_serialization(self, obj):
+ """Builds a JSON POST object.
+
+ If obj is None, return None.
+ If obj is SecretStr, return obj.get_secret_value()
+ If obj is str, int, long, float, bool, return directly.
+ If obj is datetime.datetime, datetime.date
+ convert to string in iso8601 format.
+ If obj is decimal.Decimal return string representation.
+ If obj is list, sanitize each element in the list.
+ If obj is dict, return the dict.
+ If obj is OpenAPI model, return the properties dict.
+
+ :param obj: The data to serialize.
+ :return: The serialized form of data.
+ """
+ if obj is None:
+ return None
+ elif isinstance(obj, Enum):
+ return obj.value
+ elif isinstance(obj, SecretStr):
+ return obj.get_secret_value()
+ elif isinstance(obj, self.PRIMITIVE_TYPES):
+ return obj
+ elif isinstance(obj, list):
+ return [
+ self.sanitize_for_serialization(sub_obj) for sub_obj in obj
+ ]
+ elif isinstance(obj, tuple):
+ return tuple(
+ self.sanitize_for_serialization(sub_obj) for sub_obj in obj
+ )
+ elif isinstance(obj, (datetime.datetime, datetime.date)):
+ return obj.isoformat()
+ elif isinstance(obj, decimal.Decimal):
+ return str(obj)
+
+ elif isinstance(obj, dict):
+ obj_dict = obj
+ else:
+ # Convert model obj to dict except
+ # attributes `openapi_types`, `attribute_map`
+ # and attributes which value is not None.
+ # Convert attribute name to json key in
+ # model definition for request.
+ if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')):
+ obj_dict = obj.to_dict()
+ else:
+ obj_dict = obj.__dict__
+
+ if isinstance(obj_dict, list):
+ # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict()
+ return self.sanitize_for_serialization(obj_dict)
+
+ return {
+ key: self.sanitize_for_serialization(val)
+ for key, val in obj_dict.items()
+ }
+
+ def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
+ """Deserializes response into an object.
+
+ :param response: RESTResponse object to be deserialized.
+ :param response_type: class literal for
+ deserialized object, or string of class name.
+ :param content_type: content type of response.
+
+ :return: deserialized object.
+ """
+
+ # fetch data from response object
+ if content_type is None:
+ try:
+ data = json.loads(response_text)
+ except ValueError:
+ data = response_text
+ elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
+ if response_text == "":
+ data = ""
+ else:
+ data = json.loads(response_text)
+ elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE):
+ data = response_text
+ else:
+ raise ApiException(
+ status=0,
+ reason="Unsupported content type: {0}".format(content_type)
+ )
+
+ return self.__deserialize(data, response_type)
+
+ def __deserialize(self, data, klass):
+ """Deserializes dict, list, str into an object.
+
+ :param data: dict, list or str.
+ :param klass: class literal, or string of class name.
+
+ :return: object.
+ """
+ if data is None:
+ return None
+
+ if isinstance(klass, str):
+ if klass.startswith('List['):
+ m = re.match(r'List\[(.*)]', klass)
+ assert m is not None, "Malformed List type definition"
+ sub_kls = m.group(1)
+ return [self.__deserialize(sub_data, sub_kls)
+ for sub_data in data]
+
+ if klass.startswith('Dict['):
+ m = re.match(r'Dict\[([^,]*), (.*)]', klass)
+ assert m is not None, "Malformed Dict type definition"
+ sub_kls = m.group(2)
+ return {k: self.__deserialize(v, sub_kls)
+ for k, v in data.items()}
+
+ # convert str to class
+ if klass in self.NATIVE_TYPES_MAPPING:
+ klass = self.NATIVE_TYPES_MAPPING[klass]
+ else:
+ klass = getattr(dc_rest.models, klass)
+
+ if klass in self.PRIMITIVE_TYPES:
+ return self.__deserialize_primitive(data, klass)
+ elif klass == object:
+ return self.__deserialize_object(data)
+ elif klass == datetime.date:
+ return self.__deserialize_date(data)
+ elif klass == datetime.datetime:
+ return self.__deserialize_datetime(data)
+ elif klass == decimal.Decimal:
+ return decimal.Decimal(data)
+ elif issubclass(klass, Enum):
+ return self.__deserialize_enum(data, klass)
+ else:
+ return self.__deserialize_model(data, klass)
+
+ def parameters_to_tuples(self, params, collection_formats):
+ """Get parameters as list of tuples, formatting collections.
+
+ :param params: Parameters as dict or list of two-tuples
+ :param dict collection_formats: Parameter collection formats
+ :return: Parameters as list of tuples, collections formatted
+ """
+ new_params: List[Tuple[str, str]] = []
+ if collection_formats is None:
+ collection_formats = {}
+ for k, v in params.items() if isinstance(params, dict) else params:
+ if k in collection_formats:
+ collection_format = collection_formats[k]
+ if collection_format == 'multi':
+ new_params.extend((k, value) for value in v)
+ else:
+ if collection_format == 'ssv':
+ delimiter = ' '
+ elif collection_format == 'tsv':
+ delimiter = '\t'
+ elif collection_format == 'pipes':
+ delimiter = '|'
+ else: # csv is the default
+ delimiter = ','
+ new_params.append(
+ (k, delimiter.join(str(value) for value in v)))
+ else:
+ new_params.append((k, v))
+ return new_params
+
+ def parameters_to_url_query(self, params, collection_formats):
+ """Get parameters as list of tuples, formatting collections.
+
+ :param params: Parameters as dict or list of two-tuples
+ :param dict collection_formats: Parameter collection formats
+ :return: URL query string (e.g. a=Hello%20World&b=123)
+ """
+ new_params: List[Tuple[str, str]] = []
+ if collection_formats is None:
+ collection_formats = {}
+ for k, v in params.items() if isinstance(params, dict) else params:
+ if isinstance(v, bool):
+ v = str(v).lower()
+ if isinstance(v, (int, float)):
+ v = str(v)
+ if isinstance(v, dict):
+ v = json.dumps(v)
+
+ if k in collection_formats:
+ collection_format = collection_formats[k]
+ if collection_format == 'multi':
+ new_params.extend((k, quote(str(value))) for value in v)
+ else:
+ if collection_format == 'ssv':
+ delimiter = ' '
+ elif collection_format == 'tsv':
+ delimiter = '\t'
+ elif collection_format == 'pipes':
+ delimiter = '|'
+ else: # csv is the default
+ delimiter = ','
+ new_params.append(
+ (k, delimiter.join(quote(str(value)) for value in v))
+ )
+ else:
+ new_params.append((k, quote(str(v))))
+
+ return "&".join(["=".join(map(str, item)) for item in new_params])
+
+ def files_parameters(
+ self,
+ files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
+ ):
+ """Builds form parameters.
+
+ :param files: File parameters.
+ :return: Form parameters with files.
+ """
+ params = []
+ for k, v in files.items():
+ if isinstance(v, str):
+ with open(v, 'rb') as f:
+ filename = os.path.basename(f.name)
+ filedata = f.read()
+ elif isinstance(v, bytes):
+ filename = k
+ filedata = v
+ elif isinstance(v, tuple):
+ filename, filedata = v
+ elif isinstance(v, list):
+ for file_param in v:
+ params.extend(self.files_parameters({k: file_param}))
+ continue
+ else:
+ raise ValueError("Unsupported file value")
+ mimetype = (
+ mimetypes.guess_type(filename)[0]
+ or 'application/octet-stream'
+ )
+ params.append(
+ tuple([k, tuple([filename, filedata, mimetype])])
+ )
+ return params
+
+ def select_header_accept(self, accepts: List[str]) -> Optional[str]:
+ """Returns `Accept` based on an array of accepts provided.
+
+ :param accepts: List of headers.
+ :return: Accept (e.g. application/json).
+ """
+ if not accepts:
+ return None
+
+ for accept in accepts:
+ if re.search('json', accept, re.IGNORECASE):
+ return accept
+
+ return accepts[0]
+
+ def select_header_content_type(self, content_types):
+ """Returns `Content-Type` based on an array of content_types provided.
+
+ :param content_types: List of content-types.
+ :return: Content-Type (e.g. application/json).
+ """
+ if not content_types:
+ return None
+
+ for content_type in content_types:
+ if re.search('json', content_type, re.IGNORECASE):
+ return content_type
+
+ return content_types[0]
+
+ def update_params_for_auth(
+ self,
+ headers,
+ queries,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=None
+ ) -> None:
+ """Updates header and query params based on authentication setting.
+
+ :param headers: Header parameters dict to be updated.
+ :param queries: Query parameters tuple list to be updated.
+ :param auth_settings: Authentication setting identifiers list.
+ :resource_path: A string representation of the HTTP request resource path.
+ :method: A string representation of the HTTP request method.
+ :body: A object representing the body of the HTTP request.
+ The object type is the return value of sanitize_for_serialization().
+ :param request_auth: if set, the provided settings will
+ override the token in the configuration.
+ """
+ if not auth_settings:
+ return
+
+ if request_auth:
+ self._apply_auth_params(
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ request_auth
+ )
+ else:
+ for auth in auth_settings:
+ auth_setting = self.configuration.auth_settings().get(auth)
+ if auth_setting:
+ self._apply_auth_params(
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ auth_setting
+ )
+
+ def _apply_auth_params(
+ self,
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ auth_setting
+ ) -> None:
+ """Updates the request parameters based on a single auth_setting
+
+ :param headers: Header parameters dict to be updated.
+ :param queries: Query parameters tuple list to be updated.
+ :resource_path: A string representation of the HTTP request resource path.
+ :method: A string representation of the HTTP request method.
+ :body: A object representing the body of the HTTP request.
+ The object type is the return value of sanitize_for_serialization().
+ :param auth_setting: auth settings for the endpoint
+ """
+ if auth_setting['in'] == 'cookie':
+ headers['Cookie'] = auth_setting['value']
+ elif auth_setting['in'] == 'header':
+ if auth_setting['type'] != 'http-signature':
+ headers[auth_setting['key']] = auth_setting['value']
+ elif auth_setting['in'] == 'query':
+ queries.append((auth_setting['key'], auth_setting['value']))
+ else:
+ raise ApiValueError(
+ 'Authentication token must be in `query` or `header`'
+ )
+
+ def __deserialize_file(self, response):
+ """Deserializes body to file
+
+ Saves response body into a file in a temporary folder,
+ using the filename from the `Content-Disposition` header if provided.
+
+ handle file downloading
+ save response body into a tmp file and return the instance
+
+ :param response: RESTResponse.
+ :return: file path.
+ """
+ fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
+ os.close(fd)
+ os.remove(path)
+
+ content_disposition = response.getheader("Content-Disposition")
+ if content_disposition:
+ m = re.search(
+ r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition
+ )
+ assert m is not None, "Unexpected 'content-disposition' header value"
+ filename = m.group(1)
+ path = os.path.join(os.path.dirname(path), filename)
+
+ with open(path, "wb") as f:
+ f.write(response.data)
+
+ return path
+
+ def __deserialize_primitive(self, data, klass):
+ """Deserializes string to primitive type.
+
+ :param data: str.
+ :param klass: class literal.
+
+ :return: int, long, float, str, bool.
+ """
+ try:
+ return klass(data)
+ except UnicodeEncodeError:
+ return str(data)
+ except TypeError:
+ return data
+
+ def __deserialize_object(self, value):
+ """Return an original value.
+
+ :return: object.
+ """
+ return value
+
+ def __deserialize_date(self, string):
+ """Deserializes string to date.
+
+ :param string: str.
+ :return: date.
+ """
+ try:
+ return parse(string).date()
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason="Failed to parse `{0}` as date object".format(string)
+ )
+
+ def __deserialize_datetime(self, string):
+ """Deserializes string to datetime.
+
+ The string should be in iso8601 datetime format.
+
+ :param string: str.
+ :return: datetime.
+ """
+ try:
+ return parse(string)
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason=(
+ "Failed to parse `{0}` as datetime object"
+ .format(string)
+ )
+ )
+
+ def __deserialize_enum(self, data, klass):
+ """Deserializes primitive type to enum.
+
+ :param data: primitive type.
+ :param klass: class literal.
+ :return: enum value.
+ """
+ try:
+ return klass(data)
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason=(
+ "Failed to parse `{0}` as `{1}`"
+ .format(data, klass)
+ )
+ )
+
+ def __deserialize_model(self, data, klass):
+ """Deserializes list or dict to model.
+
+ :param data: dict, list.
+ :param klass: class literal.
+ :return: model object.
+ """
+
+ return klass.from_dict(data)
diff --git a/dc_rest/api_response.py b/dc_rest/api_response.py
new file mode 100644
index 0000000..9bc7c11
--- /dev/null
+++ b/dc_rest/api_response.py
@@ -0,0 +1,21 @@
+"""API response object."""
+
+from __future__ import annotations
+from typing import Optional, Generic, Mapping, TypeVar
+from pydantic import Field, StrictInt, StrictBytes, BaseModel
+
+T = TypeVar("T")
+
+class ApiResponse(BaseModel, Generic[T]):
+ """
+ API response object
+ """
+
+ status_code: StrictInt = Field(description="HTTP status code")
+ headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers")
+ data: T = Field(description="Deserialized data given the data type")
+ raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
+
+ model_config = {
+ "arbitrary_types_allowed": True
+ }
diff --git a/dc_rest/configuration.py b/dc_rest/configuration.py
new file mode 100644
index 0000000..9dd1572
--- /dev/null
+++ b/dc_rest/configuration.py
@@ -0,0 +1,656 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+import copy
+import http.client as httplib
+import logging
+from logging import FileHandler
+import sys
+from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
+from typing_extensions import NotRequired, Self
+
+import urllib3
+
+
+JSON_SCHEMA_VALIDATION_KEYWORDS = {
+ 'multipleOf', 'maximum', 'exclusiveMaximum',
+ 'minimum', 'exclusiveMinimum', 'maxLength',
+ 'minLength', 'pattern', 'maxItems', 'minItems'
+}
+
+ServerVariablesT = Dict[str, str]
+
+GenericAuthSetting = TypedDict(
+ "GenericAuthSetting",
+ {
+ "type": str,
+ "in": str,
+ "key": str,
+ "value": str,
+ },
+)
+
+
+OAuth2AuthSetting = TypedDict(
+ "OAuth2AuthSetting",
+ {
+ "type": Literal["oauth2"],
+ "in": Literal["header"],
+ "key": Literal["Authorization"],
+ "value": str,
+ },
+)
+
+
+APIKeyAuthSetting = TypedDict(
+ "APIKeyAuthSetting",
+ {
+ "type": Literal["api_key"],
+ "in": str,
+ "key": str,
+ "value": Optional[str],
+ },
+)
+
+
+BasicAuthSetting = TypedDict(
+ "BasicAuthSetting",
+ {
+ "type": Literal["basic"],
+ "in": Literal["header"],
+ "key": Literal["Authorization"],
+ "value": Optional[str],
+ },
+)
+
+
+BearerFormatAuthSetting = TypedDict(
+ "BearerFormatAuthSetting",
+ {
+ "type": Literal["bearer"],
+ "in": Literal["header"],
+ "format": Literal["JWT"],
+ "key": Literal["Authorization"],
+ "value": str,
+ },
+)
+
+
+BearerAuthSetting = TypedDict(
+ "BearerAuthSetting",
+ {
+ "type": Literal["bearer"],
+ "in": Literal["header"],
+ "key": Literal["Authorization"],
+ "value": str,
+ },
+)
+
+
+HTTPSignatureAuthSetting = TypedDict(
+ "HTTPSignatureAuthSetting",
+ {
+ "type": Literal["http-signature"],
+ "in": Literal["header"],
+ "key": Literal["Authorization"],
+ "value": None,
+ },
+)
+
+
+AuthSettings = TypedDict(
+ "AuthSettings",
+ {
+ "BotToken": APIKeyAuthSetting,
+ "OAuth2": OAuth2AuthSetting,
+ "OAuth2": OAuth2AuthSetting,
+ "OAuth2": OAuth2AuthSetting,
+ },
+ total=False,
+)
+
+
+class HostSettingVariable(TypedDict):
+ description: str
+ default_value: str
+ enum_values: List[str]
+
+
+class HostSetting(TypedDict):
+ url: str
+ description: str
+ variables: NotRequired[Dict[str, HostSettingVariable]]
+
+
+class Configuration:
+ """This class contains various settings of the API client.
+
+ :param host: Base url.
+ :param ignore_operation_servers
+ Boolean to ignore operation servers for the API client.
+ Config will use `host` as the base url regardless of the operation servers.
+ :param api_key: Dict to store API key(s).
+ Each entry in the dict specifies an API key.
+ The dict key is the name of the security scheme in the OAS specification.
+ The dict value is the API key secret.
+ :param api_key_prefix: Dict to store API prefix (e.g. Bearer).
+ The dict key is the name of the security scheme in the OAS specification.
+ The dict value is an API key prefix when generating the auth data.
+ :param username: Username for HTTP basic authentication.
+ :param password: Password for HTTP basic authentication.
+ :param access_token: Access token.
+ :param server_index: Index to servers configuration.
+ :param server_variables: Mapping with string values to replace variables in
+ templated server configuration. The validation of enums is performed for
+ variables with defined enum values before.
+ :param server_operation_index: Mapping from operation ID to an index to server
+ configuration.
+ :param server_operation_variables: Mapping from operation ID to a mapping with
+ string values to replace variables in templated server configuration.
+ The validation of enums is performed for variables with defined enum
+ values before.
+ :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
+ in PEM format.
+ :param retries: Number of retries for API requests.
+ :param ca_cert_data: verify the peer using concatenated CA certificate data
+ in PEM (str) or DER (bytes) format.
+
+ :Example:
+
+ API Key Authentication Example.
+ Given the following security scheme in the OpenAPI specification:
+ components:
+ securitySchemes:
+ cookieAuth: # name for the security scheme
+ type: apiKey
+ in: cookie
+ name: JSESSIONID # cookie name
+
+ You can programmatically set the cookie:
+
+conf = dc_rest.Configuration(
+ api_key={'cookieAuth': 'abc123'}
+ api_key_prefix={'cookieAuth': 'JSESSIONID'}
+)
+
+ The following cookie will be added to the HTTP request:
+ Cookie: JSESSIONID abc123
+ """
+
+ _default: ClassVar[Optional[Self]] = None
+
+ def __init__(
+ self,
+ host: Optional[str]=None,
+ api_key: Optional[Dict[str, str]]=None,
+ api_key_prefix: Optional[Dict[str, str]]=None,
+ username: Optional[str]=None,
+ password: Optional[str]=None,
+ access_token: Optional[str]=None,
+ server_index: Optional[int]=None,
+ server_variables: Optional[ServerVariablesT]=None,
+ server_operation_index: Optional[Dict[int, int]]=None,
+ server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
+ ignore_operation_servers: bool=False,
+ ssl_ca_cert: Optional[str]=None,
+ retries: Optional[int] = None,
+ ca_cert_data: Optional[Union[str, bytes]] = None,
+ *,
+ debug: Optional[bool] = None,
+ ) -> None:
+ """Constructor
+ """
+ self._base_path = "https://discord.com/api/v10" if host is None else host
+ """Default Base url
+ """
+ self.server_index = 0 if server_index is None and host is None else server_index
+ self.server_operation_index = server_operation_index or {}
+ """Default server index
+ """
+ self.server_variables = server_variables or {}
+ self.server_operation_variables = server_operation_variables or {}
+ """Default server variables
+ """
+ self.ignore_operation_servers = ignore_operation_servers
+ """Ignore operation servers
+ """
+ self.temp_folder_path = None
+ """Temp file folder for downloading files
+ """
+ # Authentication Settings
+ self.api_key = {}
+ if api_key:
+ self.api_key = api_key
+ """dict to store API key(s)
+ """
+ self.api_key_prefix = {}
+ if api_key_prefix:
+ self.api_key_prefix = api_key_prefix
+ """dict to store API prefix (e.g. Bearer)
+ """
+ self.refresh_api_key_hook = None
+ """function hook to refresh API key if expired
+ """
+ self.username = username
+ """Username for HTTP basic authentication
+ """
+ self.password = password
+ """Password for HTTP basic authentication
+ """
+ self.access_token = access_token
+ """Access token
+ """
+ self.logger = {}
+ """Logging Settings
+ """
+ self.logger["package_logger"] = logging.getLogger("dc_rest")
+ self.logger["urllib3_logger"] = logging.getLogger("urllib3")
+ self.logger_format = '%(asctime)s %(levelname)s %(message)s'
+ """Log format
+ """
+ self.logger_stream_handler = None
+ """Log stream handler
+ """
+ self.logger_file_handler: Optional[FileHandler] = None
+ """Log file handler
+ """
+ self.logger_file = None
+ """Debug file location
+ """
+ if debug is not None:
+ self.debug = debug
+ else:
+ self.__debug = False
+ """Debug switch
+ """
+
+ self.verify_ssl = True
+ """SSL/TLS verification
+ Set this to false to skip verifying SSL certificate when calling API
+ from https server.
+ """
+ self.ssl_ca_cert = ssl_ca_cert
+ """Set this to customize the certificate file to verify the peer.
+ """
+ self.ca_cert_data = ca_cert_data
+ """Set this to verify the peer using PEM (str) or DER (bytes)
+ certificate data.
+ """
+ self.cert_file = None
+ """client certificate file
+ """
+ self.key_file = None
+ """client key file
+ """
+ self.assert_hostname = None
+ """Set this to True/False to enable/disable SSL hostname verification.
+ """
+ self.tls_server_name = None
+ """SSL/TLS Server Name Indication (SNI)
+ Set this to the SNI value expected by the server.
+ """
+
+ self.connection_pool_maxsize = 100
+ """This value is passed to the aiohttp to limit simultaneous connections.
+ Default values is 100, None means no-limit.
+ """
+
+ self.proxy: Optional[str] = None
+ """Proxy URL
+ """
+ self.proxy_headers = None
+ """Proxy headers
+ """
+ self.safe_chars_for_path_param = ''
+ """Safe chars for path_param
+ """
+ self.retries = retries
+ """Adding retries to override urllib3 default value 3
+ """
+ # Enable client side validation
+ self.client_side_validation = True
+
+ self.socket_options = None
+ """Options to pass down to the underlying urllib3 socket
+ """
+
+ self.datetime_format = "%Y-%m-%dT%H:%M:%S%z"
+ """datetime format
+ """
+
+ self.date_format = "%Y-%m-%d"
+ """date format
+ """
+
+ def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
+ cls = self.__class__
+ result = cls.__new__(cls)
+ memo[id(self)] = result
+ for k, v in self.__dict__.items():
+ if k not in ('logger', 'logger_file_handler'):
+ setattr(result, k, copy.deepcopy(v, memo))
+ # shallow copy of loggers
+ result.logger = copy.copy(self.logger)
+ # use setters to configure loggers
+ result.logger_file = self.logger_file
+ result.debug = self.debug
+ return result
+
+ def __setattr__(self, name: str, value: Any) -> None:
+ object.__setattr__(self, name, value)
+
+ @classmethod
+ def set_default(cls, default: Optional[Self]) -> None:
+ """Set default instance of configuration.
+
+ It stores default configuration, which can be
+ returned by get_default_copy method.
+
+ :param default: object of Configuration
+ """
+ cls._default = default
+
+ @classmethod
+ def get_default_copy(cls) -> Self:
+ """Deprecated. Please use `get_default` instead.
+
+ Deprecated. Please use `get_default` instead.
+
+ :return: The configuration object.
+ """
+ return cls.get_default()
+
+ @classmethod
+ def get_default(cls) -> Self:
+ """Return the default configuration.
+
+ This method returns newly created, based on default constructor,
+ object of Configuration class or returns a copy of default
+ configuration.
+
+ :return: The configuration object.
+ """
+ if cls._default is None:
+ cls._default = cls()
+ return cls._default
+
+ @property
+ def logger_file(self) -> Optional[str]:
+ """The logger file.
+
+ If the logger_file is None, then add stream handler and remove file
+ handler. Otherwise, add file handler and remove stream handler.
+
+ :param value: The logger_file path.
+ :type: str
+ """
+ return self.__logger_file
+
+ @logger_file.setter
+ def logger_file(self, value: Optional[str]) -> None:
+ """The logger file.
+
+ If the logger_file is None, then add stream handler and remove file
+ handler. Otherwise, add file handler and remove stream handler.
+
+ :param value: The logger_file path.
+ :type: str
+ """
+ self.__logger_file = value
+ if self.__logger_file:
+ # If set logging file,
+ # then add file handler and remove stream handler.
+ self.logger_file_handler = logging.FileHandler(self.__logger_file)
+ self.logger_file_handler.setFormatter(self.logger_formatter)
+ for _, logger in self.logger.items():
+ logger.addHandler(self.logger_file_handler)
+
+ @property
+ def debug(self) -> bool:
+ """Debug status
+
+ :param value: The debug status, True or False.
+ :type: bool
+ """
+ return self.__debug
+
+ @debug.setter
+ def debug(self, value: bool) -> None:
+ """Debug status
+
+ :param value: The debug status, True or False.
+ :type: bool
+ """
+ self.__debug = value
+ if self.__debug:
+ # if debug status is True, turn on debug logging
+ for _, logger in self.logger.items():
+ logger.setLevel(logging.DEBUG)
+ # turn on httplib debug
+ httplib.HTTPConnection.debuglevel = 1
+ else:
+ # if debug status is False, turn off debug logging,
+ # setting log level to default `logging.WARNING`
+ for _, logger in self.logger.items():
+ logger.setLevel(logging.WARNING)
+ # turn off httplib debug
+ httplib.HTTPConnection.debuglevel = 0
+
+ @property
+ def logger_format(self) -> str:
+ """The logger format.
+
+ The logger_formatter will be updated when sets logger_format.
+
+ :param value: The format string.
+ :type: str
+ """
+ return self.__logger_format
+
+ @logger_format.setter
+ def logger_format(self, value: str) -> None:
+ """The logger format.
+
+ The logger_formatter will be updated when sets logger_format.
+
+ :param value: The format string.
+ :type: str
+ """
+ self.__logger_format = value
+ self.logger_formatter = logging.Formatter(self.__logger_format)
+
+ def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
+ """Gets API key (with prefix if set).
+
+ :param identifier: The identifier of apiKey.
+ :param alias: The alternative identifier of apiKey.
+ :return: The token for api key authentication.
+ """
+ if self.refresh_api_key_hook is not None:
+ self.refresh_api_key_hook(self)
+ key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
+ if key:
+ prefix = self.api_key_prefix.get(identifier)
+ if prefix:
+ return "%s %s" % (prefix, key)
+ else:
+ return key
+
+ return None
+
+ def get_basic_auth_token(self) -> Optional[str]:
+ """Gets HTTP basic authentication header (string).
+
+ :return: The token for basic HTTP authentication.
+ """
+ username = ""
+ if self.username is not None:
+ username = self.username
+ password = ""
+ if self.password is not None:
+ password = self.password
+ return urllib3.util.make_headers(
+ basic_auth=username + ':' + password
+ ).get('authorization')
+
+ def auth_settings(self)-> AuthSettings:
+ """Gets Auth Settings dict for api client.
+
+ :return: The Auth Settings information dict.
+ """
+ auth: AuthSettings = {}
+ if 'BotToken' in self.api_key:
+ auth['BotToken'] = {
+ 'type': 'api_key',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': self.get_api_key_with_prefix(
+ 'BotToken',
+ ),
+ }
+ if self.access_token is not None:
+ auth['OAuth2'] = {
+ 'type': 'oauth2',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': 'Bearer ' + self.access_token
+ }
+ if self.access_token is not None:
+ auth['OAuth2'] = {
+ 'type': 'oauth2',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': 'Bearer ' + self.access_token
+ }
+ if self.access_token is not None:
+ auth['OAuth2'] = {
+ 'type': 'oauth2',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': 'Bearer ' + self.access_token
+ }
+ return auth
+
+ def to_debug_report(self) -> str:
+ """Gets the essential information for debugging.
+
+ :return: The report for debugging.
+ """
+ return "Python SDK Debug Report:\n"\
+ "OS: {env}\n"\
+ "Python Version: {pyversion}\n"\
+ "Version of the API: 10\n"\
+ "SDK Package Version: 10".\
+ format(env=sys.platform, pyversion=sys.version)
+
+ def get_host_settings(self) -> List[HostSetting]:
+ """Gets an array of host settings
+
+ :return: An array of host settings
+ """
+ return [
+ {
+ 'url': "https://discord.com/api/v10",
+ 'description': "No description provided",
+ }
+ ]
+
+ def get_host_from_settings(
+ self,
+ index: Optional[int],
+ variables: Optional[ServerVariablesT]=None,
+ servers: Optional[List[HostSetting]]=None,
+ ) -> str:
+ """Gets host URL based on the index and variables
+ :param index: array index of the host settings
+ :param variables: hash of variable and the corresponding value
+ :param servers: an array of host settings or None
+ :return: URL based on host settings
+ """
+ if index is None:
+ return self._base_path
+
+ variables = {} if variables is None else variables
+ servers = self.get_host_settings() if servers is None else servers
+
+ try:
+ server = servers[index]
+ except IndexError:
+ raise ValueError(
+ "Invalid index {0} when selecting the host settings. "
+ "Must be less than {1}".format(index, len(servers)))
+
+ url = server['url']
+
+ # go through variables and replace placeholders
+ for variable_name, variable in server.get('variables', {}).items():
+ used_value = variables.get(
+ variable_name, variable['default_value'])
+
+ if 'enum_values' in variable \
+ and used_value not in variable['enum_values']:
+ raise ValueError(
+ "The variable `{0}` in the host URL has invalid value "
+ "{1}. Must be {2}.".format(
+ variable_name, variables[variable_name],
+ variable['enum_values']))
+
+ url = url.replace("{" + variable_name + "}", used_value)
+
+ return url
+
+ @property
+ def host(self) -> str:
+ """Return generated host."""
+ return self.get_host_from_settings(self.server_index, variables=self.server_variables)
+
+ @host.setter
+ def host(self, value: str) -> None:
+ """Fix base path."""
+ self._base_path = value
+ self.server_index = None
diff --git a/dc_rest/exceptions.py b/dc_rest/exceptions.py
new file mode 100644
index 0000000..1699af5
--- /dev/null
+++ b/dc_rest/exceptions.py
@@ -0,0 +1,250 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+from typing import Any, Optional
+from typing_extensions import Self
+
+class OpenApiException(Exception):
+ """The base exception class for all OpenAPIExceptions"""
+
+
+class ApiTypeError(OpenApiException, TypeError):
+ def __init__(self, msg, path_to_item=None, valid_classes=None,
+ key_type=None) -> None:
+ """ Raises an exception for TypeErrors
+
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (list): a list of keys an indices to get to the
+ current_item
+ None if unset
+ valid_classes (tuple): the primitive classes that current item
+ should be an instance of
+ None if unset
+ key_type (bool): False if our value is a value in a dict
+ True if it is a key in a dict
+ False if our item is an item in a list
+ None if unset
+ """
+ self.path_to_item = path_to_item
+ self.valid_classes = valid_classes
+ self.key_type = key_type
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiTypeError, self).__init__(full_msg)
+
+
+class ApiValueError(OpenApiException, ValueError):
+ def __init__(self, msg, path_to_item=None) -> None:
+ """
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (list) the path to the exception in the
+ received_data dict. None if unset
+ """
+
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiValueError, self).__init__(full_msg)
+
+
+class ApiAttributeError(OpenApiException, AttributeError):
+ def __init__(self, msg, path_to_item=None) -> None:
+ """
+ Raised when an attribute reference or assignment fails.
+
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (None/list) the path to the exception in the
+ received_data dict
+ """
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiAttributeError, self).__init__(full_msg)
+
+
+class ApiKeyError(OpenApiException, KeyError):
+ def __init__(self, msg, path_to_item=None) -> None:
+ """
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (None/list) the path to the exception in the
+ received_data dict
+ """
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiKeyError, self).__init__(full_msg)
+
+
+class ApiException(OpenApiException):
+
+ def __init__(
+ self,
+ status=None,
+ reason=None,
+ http_resp=None,
+ *,
+ body: Optional[str] = None,
+ data: Optional[Any] = None,
+ ) -> None:
+ self.status = status
+ self.reason = reason
+ self.body = body
+ self.data = data
+ self.headers = None
+
+ if http_resp:
+ if self.status is None:
+ self.status = http_resp.status
+ if self.reason is None:
+ self.reason = http_resp.reason
+ if self.body is None:
+ try:
+ self.body = http_resp.data.decode('utf-8')
+ except Exception:
+ pass
+ self.headers = http_resp.getheaders()
+
+ @classmethod
+ def from_response(
+ cls,
+ *,
+ http_resp,
+ body: Optional[str],
+ data: Optional[Any],
+ ) -> Self:
+ if http_resp.status == 400:
+ raise BadRequestException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 401:
+ raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 403:
+ raise ForbiddenException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 404:
+ raise NotFoundException(http_resp=http_resp, body=body, data=data)
+
+ # Added new conditions for 409 and 422
+ if http_resp.status == 409:
+ raise ConflictException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 422:
+ raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
+
+ if 500 <= http_resp.status <= 599:
+ raise ServiceException(http_resp=http_resp, body=body, data=data)
+ raise ApiException(http_resp=http_resp, body=body, data=data)
+
+ def __str__(self):
+ """Custom error messages for exception"""
+ error_message = "({0})\n"\
+ "Reason: {1}\n".format(self.status, self.reason)
+ if self.headers:
+ error_message += "HTTP response headers: {0}\n".format(
+ self.headers)
+
+ if self.data or self.body:
+ error_message += "HTTP response body: {0}\n".format(self.data or self.body)
+
+ return error_message
+
+
+class BadRequestException(ApiException):
+ pass
+
+
+class NotFoundException(ApiException):
+ pass
+
+
+class UnauthorizedException(ApiException):
+ pass
+
+
+class ForbiddenException(ApiException):
+ pass
+
+
+class ServiceException(ApiException):
+ pass
+
+
+class ConflictException(ApiException):
+ """Exception for HTTP 409 Conflict."""
+ pass
+
+
+class UnprocessableEntityException(ApiException):
+ """Exception for HTTP 422 Unprocessable Entity."""
+ pass
+
+
+def render_path(path_to_item):
+ """Returns a string representation of a path"""
+ result = ""
+ for pth in path_to_item:
+ if isinstance(pth, int):
+ result += "[{0}]".format(pth)
+ else:
+ result += "['{0}']".format(pth)
+ return result
diff --git a/dc_rest/models/__init__.py b/dc_rest/models/__init__.py
new file mode 100644
index 0000000..ae37fb2
--- /dev/null
+++ b/dc_rest/models/__init__.py
@@ -0,0 +1,509 @@
+# coding: utf-8
+
+# flake8: noqa
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+# import models into model package
+from dc_rest.models.account_response import AccountResponse
+from dc_rest.models.action_row_component_for_message_request import ActionRowComponentForMessageRequest
+from dc_rest.models.action_row_component_for_message_request_components_inner import ActionRowComponentForMessageRequestComponentsInner
+from dc_rest.models.action_row_component_for_modal_request import ActionRowComponentForModalRequest
+from dc_rest.models.action_row_component_response import ActionRowComponentResponse
+from dc_rest.models.action_row_component_response_components_inner import ActionRowComponentResponseComponentsInner
+from dc_rest.models.activities_attachment_response import ActivitiesAttachmentResponse
+from dc_rest.models.add_group_dm_user201_response import AddGroupDmUser201Response
+from dc_rest.models.add_group_dm_user_request import AddGroupDmUserRequest
+from dc_rest.models.add_guild_member_request import AddGuildMemberRequest
+from dc_rest.models.add_lobby_member_request import AddLobbyMemberRequest
+from dc_rest.models.application_command_attachment_option import ApplicationCommandAttachmentOption
+from dc_rest.models.application_command_attachment_option_response import ApplicationCommandAttachmentOptionResponse
+from dc_rest.models.application_command_autocomplete_callback_request import ApplicationCommandAutocompleteCallbackRequest
+from dc_rest.models.application_command_autocomplete_callback_request_data import ApplicationCommandAutocompleteCallbackRequestData
+from dc_rest.models.application_command_boolean_option import ApplicationCommandBooleanOption
+from dc_rest.models.application_command_boolean_option_response import ApplicationCommandBooleanOptionResponse
+from dc_rest.models.application_command_channel_option import ApplicationCommandChannelOption
+from dc_rest.models.application_command_channel_option_response import ApplicationCommandChannelOptionResponse
+from dc_rest.models.application_command_create_request import ApplicationCommandCreateRequest
+from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner
+from dc_rest.models.application_command_integer_option import ApplicationCommandIntegerOption
+from dc_rest.models.application_command_integer_option_response import ApplicationCommandIntegerOptionResponse
+from dc_rest.models.application_command_interaction_metadata_response import ApplicationCommandInteractionMetadataResponse
+from dc_rest.models.application_command_mentionable_option import ApplicationCommandMentionableOption
+from dc_rest.models.application_command_mentionable_option_response import ApplicationCommandMentionableOptionResponse
+from dc_rest.models.application_command_number_option import ApplicationCommandNumberOption
+from dc_rest.models.application_command_number_option_response import ApplicationCommandNumberOptionResponse
+from dc_rest.models.application_command_option_integer_choice import ApplicationCommandOptionIntegerChoice
+from dc_rest.models.application_command_option_integer_choice_response import ApplicationCommandOptionIntegerChoiceResponse
+from dc_rest.models.application_command_option_number_choice import ApplicationCommandOptionNumberChoice
+from dc_rest.models.application_command_option_number_choice_response import ApplicationCommandOptionNumberChoiceResponse
+from dc_rest.models.application_command_option_string_choice import ApplicationCommandOptionStringChoice
+from dc_rest.models.application_command_option_string_choice_response import ApplicationCommandOptionStringChoiceResponse
+from dc_rest.models.application_command_patch_request_partial import ApplicationCommandPatchRequestPartial
+from dc_rest.models.application_command_permission import ApplicationCommandPermission
+from dc_rest.models.application_command_response import ApplicationCommandResponse
+from dc_rest.models.application_command_response_options_inner import ApplicationCommandResponseOptionsInner
+from dc_rest.models.application_command_role_option import ApplicationCommandRoleOption
+from dc_rest.models.application_command_role_option_response import ApplicationCommandRoleOptionResponse
+from dc_rest.models.application_command_string_option import ApplicationCommandStringOption
+from dc_rest.models.application_command_string_option_response import ApplicationCommandStringOptionResponse
+from dc_rest.models.application_command_subcommand_group_option import ApplicationCommandSubcommandGroupOption
+from dc_rest.models.application_command_subcommand_group_option_response import ApplicationCommandSubcommandGroupOptionResponse
+from dc_rest.models.application_command_subcommand_option import ApplicationCommandSubcommandOption
+from dc_rest.models.application_command_subcommand_option_options_inner import ApplicationCommandSubcommandOptionOptionsInner
+from dc_rest.models.application_command_subcommand_option_response import ApplicationCommandSubcommandOptionResponse
+from dc_rest.models.application_command_subcommand_option_response_options_inner import ApplicationCommandSubcommandOptionResponseOptionsInner
+from dc_rest.models.application_command_update_request import ApplicationCommandUpdateRequest
+from dc_rest.models.application_command_user_option import ApplicationCommandUserOption
+from dc_rest.models.application_command_user_option_response import ApplicationCommandUserOptionResponse
+from dc_rest.models.application_form_partial import ApplicationFormPartial
+from dc_rest.models.application_form_partial_description import ApplicationFormPartialDescription
+from dc_rest.models.application_form_partial_integration_types_config_value import ApplicationFormPartialIntegrationTypesConfigValue
+from dc_rest.models.application_incoming_webhook_response import ApplicationIncomingWebhookResponse
+from dc_rest.models.application_integration_type_configuration import ApplicationIntegrationTypeConfiguration
+from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse
+from dc_rest.models.application_o_auth2_install_params import ApplicationOAuth2InstallParams
+from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse
+from dc_rest.models.application_response import ApplicationResponse
+from dc_rest.models.application_role_connections_metadata_item_request import ApplicationRoleConnectionsMetadataItemRequest
+from dc_rest.models.application_role_connections_metadata_item_response import ApplicationRoleConnectionsMetadataItemResponse
+from dc_rest.models.application_user_role_connection_response import ApplicationUserRoleConnectionResponse
+from dc_rest.models.attachment_response import AttachmentResponse
+from dc_rest.models.audit_log_entry_response import AuditLogEntryResponse
+from dc_rest.models.audit_log_object_change_response import AuditLogObjectChangeResponse
+from dc_rest.models.ban_user_from_guild_request import BanUserFromGuildRequest
+from dc_rest.models.base_create_message_create_request import BaseCreateMessageCreateRequest
+from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner
+from dc_rest.models.basic_application_response import BasicApplicationResponse
+from dc_rest.models.basic_message_response import BasicMessageResponse
+from dc_rest.models.basic_message_response_components_inner import BasicMessageResponseComponentsInner
+from dc_rest.models.basic_message_response_interaction_metadata import BasicMessageResponseInteractionMetadata
+from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce
+from dc_rest.models.block_message_action import BlockMessageAction
+from dc_rest.models.block_message_action_metadata import BlockMessageActionMetadata
+from dc_rest.models.block_message_action_metadata_response import BlockMessageActionMetadataResponse
+from dc_rest.models.block_message_action_response import BlockMessageActionResponse
+from dc_rest.models.bot_account_patch_request import BotAccountPatchRequest
+from dc_rest.models.bulk_ban_users_from_guild_request import BulkBanUsersFromGuildRequest
+from dc_rest.models.bulk_ban_users_response import BulkBanUsersResponse
+from dc_rest.models.bulk_delete_messages_request import BulkDeleteMessagesRequest
+from dc_rest.models.bulk_lobby_member_request import BulkLobbyMemberRequest
+from dc_rest.models.bulk_update_guild_channels_request_inner import BulkUpdateGuildChannelsRequestInner
+from dc_rest.models.bulk_update_guild_roles_request_inner import BulkUpdateGuildRolesRequestInner
+from dc_rest.models.button_component_for_message_request import ButtonComponentForMessageRequest
+from dc_rest.models.button_component_response import ButtonComponentResponse
+from dc_rest.models.channel_follower_response import ChannelFollowerResponse
+from dc_rest.models.channel_follower_webhook_response import ChannelFollowerWebhookResponse
+from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest
+from dc_rest.models.channel_permission_overwrite_response import ChannelPermissionOverwriteResponse
+from dc_rest.models.channel_select_component_for_message_request import ChannelSelectComponentForMessageRequest
+from dc_rest.models.channel_select_component_response import ChannelSelectComponentResponse
+from dc_rest.models.channel_select_default_value import ChannelSelectDefaultValue
+from dc_rest.models.channel_select_default_value_response import ChannelSelectDefaultValueResponse
+from dc_rest.models.command_permission_response import CommandPermissionResponse
+from dc_rest.models.command_permissions_response import CommandPermissionsResponse
+from dc_rest.models.component_emoji_for_message_request import ComponentEmojiForMessageRequest
+from dc_rest.models.component_emoji_response import ComponentEmojiResponse
+from dc_rest.models.connected_account_guild_response import ConnectedAccountGuildResponse
+from dc_rest.models.connected_account_integration_response import ConnectedAccountIntegrationResponse
+from dc_rest.models.connected_account_response import ConnectedAccountResponse
+from dc_rest.models.container_component_for_message_request import ContainerComponentForMessageRequest
+from dc_rest.models.container_component_for_message_request_components_inner import ContainerComponentForMessageRequestComponentsInner
+from dc_rest.models.container_component_response import ContainerComponentResponse
+from dc_rest.models.container_component_response_components_inner import ContainerComponentResponseComponentsInner
+from dc_rest.models.create_application_emoji_request import CreateApplicationEmojiRequest
+from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response
+from dc_rest.models.create_auto_moderation_rule_request import CreateAutoModerationRuleRequest
+from dc_rest.models.create_channel_invite_request import CreateChannelInviteRequest
+from dc_rest.models.create_entitlement_request_data import CreateEntitlementRequestData
+from dc_rest.models.create_forum_thread_request import CreateForumThreadRequest
+from dc_rest.models.create_group_dm_invite_request import CreateGroupDMInviteRequest
+from dc_rest.models.create_guild_channel_request import CreateGuildChannelRequest
+from dc_rest.models.create_guild_emoji_request import CreateGuildEmojiRequest
+from dc_rest.models.create_guild_from_template_request import CreateGuildFromTemplateRequest
+from dc_rest.models.create_guild_invite_request import CreateGuildInviteRequest
+from dc_rest.models.create_guild_request_channel_item import CreateGuildRequestChannelItem
+from dc_rest.models.create_guild_request_role_item import CreateGuildRequestRoleItem
+from dc_rest.models.create_guild_role_request import CreateGuildRoleRequest
+from dc_rest.models.create_guild_scheduled_event_request import CreateGuildScheduledEventRequest
+from dc_rest.models.create_guild_template_request import CreateGuildTemplateRequest
+from dc_rest.models.create_interaction_response_request import CreateInteractionResponseRequest
+from dc_rest.models.create_lobby_request import CreateLobbyRequest
+from dc_rest.models.create_message_interaction_callback_request import CreateMessageInteractionCallbackRequest
+from dc_rest.models.create_message_interaction_callback_response import CreateMessageInteractionCallbackResponse
+from dc_rest.models.create_or_join_lobby_request import CreateOrJoinLobbyRequest
+from dc_rest.models.create_or_update_thread_tag_request import CreateOrUpdateThreadTagRequest
+from dc_rest.models.create_private_channel_request import CreatePrivateChannelRequest
+from dc_rest.models.create_stage_instance_request import CreateStageInstanceRequest
+from dc_rest.models.create_text_thread_with_message_request import CreateTextThreadWithMessageRequest
+from dc_rest.models.create_text_thread_without_message_request import CreateTextThreadWithoutMessageRequest
+from dc_rest.models.create_thread_request import CreateThreadRequest
+from dc_rest.models.create_webhook_request import CreateWebhookRequest
+from dc_rest.models.created_thread_response import CreatedThreadResponse
+from dc_rest.models.default_keyword_list_trigger_metadata import DefaultKeywordListTriggerMetadata
+from dc_rest.models.default_keyword_list_trigger_metadata_response import DefaultKeywordListTriggerMetadataResponse
+from dc_rest.models.default_keyword_list_upsert_request import DefaultKeywordListUpsertRequest
+from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner
+from dc_rest.models.default_keyword_list_upsert_request_partial import DefaultKeywordListUpsertRequestPartial
+from dc_rest.models.default_keyword_rule_response import DefaultKeywordRuleResponse
+from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner
+from dc_rest.models.default_reaction_emoji_response import DefaultReactionEmojiResponse
+from dc_rest.models.discord_integration_response import DiscordIntegrationResponse
+from dc_rest.models.edit_lobby_channel_link_request import EditLobbyChannelLinkRequest
+from dc_rest.models.embedded_activity_instance import EmbeddedActivityInstance
+from dc_rest.models.embedded_activity_instance_location import EmbeddedActivityInstanceLocation
+from dc_rest.models.emoji_response import EmojiResponse
+from dc_rest.models.entitlement_response import EntitlementResponse
+from dc_rest.models.entity_metadata_external import EntityMetadataExternal
+from dc_rest.models.entity_metadata_external_response import EntityMetadataExternalResponse
+from dc_rest.models.error import Error
+from dc_rest.models.error_details import ErrorDetails
+from dc_rest.models.error_response import ErrorResponse
+from dc_rest.models.execute_webhook_request import ExecuteWebhookRequest
+from dc_rest.models.external_connection_integration_response import ExternalConnectionIntegrationResponse
+from dc_rest.models.external_scheduled_event_create_request import ExternalScheduledEventCreateRequest
+from dc_rest.models.external_scheduled_event_patch_request_partial import ExternalScheduledEventPatchRequestPartial
+from dc_rest.models.external_scheduled_event_response import ExternalScheduledEventResponse
+from dc_rest.models.file_component_for_message_request import FileComponentForMessageRequest
+from dc_rest.models.file_component_response import FileComponentResponse
+from dc_rest.models.flag_to_channel_action import FlagToChannelAction
+from dc_rest.models.flag_to_channel_action_metadata import FlagToChannelActionMetadata
+from dc_rest.models.flag_to_channel_action_metadata_response import FlagToChannelActionMetadataResponse
+from dc_rest.models.flag_to_channel_action_response import FlagToChannelActionResponse
+from dc_rest.models.follow_channel_request import FollowChannelRequest
+from dc_rest.models.forum_tag_response import ForumTagResponse
+from dc_rest.models.friend_invite_response import FriendInviteResponse
+from dc_rest.models.gateway_bot_response import GatewayBotResponse
+from dc_rest.models.gateway_bot_session_start_limit_response import GatewayBotSessionStartLimitResponse
+from dc_rest.models.gateway_response import GatewayResponse
+from dc_rest.models.get_channel200_response import GetChannel200Response
+from dc_rest.models.get_entitlements_sku_ids_parameter import GetEntitlementsSkuIdsParameter
+from dc_rest.models.get_sticker200_response import GetSticker200Response
+from dc_rest.models.github_author import GithubAuthor
+from dc_rest.models.github_check_app import GithubCheckApp
+from dc_rest.models.github_check_pull_request import GithubCheckPullRequest
+from dc_rest.models.github_check_run import GithubCheckRun
+from dc_rest.models.github_check_run_output import GithubCheckRunOutput
+from dc_rest.models.github_check_suite import GithubCheckSuite
+from dc_rest.models.github_comment import GithubComment
+from dc_rest.models.github_commit import GithubCommit
+from dc_rest.models.github_discussion import GithubDiscussion
+from dc_rest.models.github_issue import GithubIssue
+from dc_rest.models.github_release import GithubRelease
+from dc_rest.models.github_repository import GithubRepository
+from dc_rest.models.github_review import GithubReview
+from dc_rest.models.github_user import GithubUser
+from dc_rest.models.github_webhook import GithubWebhook
+from dc_rest.models.group_dm_invite_response import GroupDMInviteResponse
+from dc_rest.models.guild_audit_log_response import GuildAuditLogResponse
+from dc_rest.models.guild_audit_log_response_integrations_inner import GuildAuditLogResponseIntegrationsInner
+from dc_rest.models.guild_ban_response import GuildBanResponse
+from dc_rest.models.guild_channel_location import GuildChannelLocation
+from dc_rest.models.guild_channel_response import GuildChannelResponse
+from dc_rest.models.guild_create_request import GuildCreateRequest
+from dc_rest.models.guild_home_settings_response import GuildHomeSettingsResponse
+from dc_rest.models.guild_incoming_webhook_response import GuildIncomingWebhookResponse
+from dc_rest.models.guild_invite_response import GuildInviteResponse
+from dc_rest.models.guild_mfa_level_response import GuildMFALevelResponse
+from dc_rest.models.guild_member_response import GuildMemberResponse
+from dc_rest.models.guild_onboarding_response import GuildOnboardingResponse
+from dc_rest.models.guild_patch_request_partial import GuildPatchRequestPartial
+from dc_rest.models.guild_preview_response import GuildPreviewResponse
+from dc_rest.models.guild_product_purchase_response import GuildProductPurchaseResponse
+from dc_rest.models.guild_prune_response import GuildPruneResponse
+from dc_rest.models.guild_response import GuildResponse
+from dc_rest.models.guild_role_response import GuildRoleResponse
+from dc_rest.models.guild_role_tags_response import GuildRoleTagsResponse
+from dc_rest.models.guild_sticker_response import GuildStickerResponse
+from dc_rest.models.guild_subscription_integration_response import GuildSubscriptionIntegrationResponse
+from dc_rest.models.guild_template_channel_response import GuildTemplateChannelResponse
+from dc_rest.models.guild_template_channel_tags import GuildTemplateChannelTags
+from dc_rest.models.guild_template_response import GuildTemplateResponse
+from dc_rest.models.guild_template_role_response import GuildTemplateRoleResponse
+from dc_rest.models.guild_template_snapshot_response import GuildTemplateSnapshotResponse
+from dc_rest.models.guild_welcome_channel import GuildWelcomeChannel
+from dc_rest.models.guild_welcome_screen_channel_response import GuildWelcomeScreenChannelResponse
+from dc_rest.models.guild_welcome_screen_response import GuildWelcomeScreenResponse
+from dc_rest.models.guild_with_counts_response import GuildWithCountsResponse
+from dc_rest.models.incoming_webhook_interaction_request import IncomingWebhookInteractionRequest
+from dc_rest.models.incoming_webhook_request_partial import IncomingWebhookRequestPartial
+from dc_rest.models.incoming_webhook_update_for_interaction_callback_request_partial import IncomingWebhookUpdateForInteractionCallbackRequestPartial
+from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial
+from dc_rest.models.inner_errors import InnerErrors
+from dc_rest.models.integration_application_response import IntegrationApplicationResponse
+from dc_rest.models.interaction_application_command_autocomplete_callback_integer_data import InteractionApplicationCommandAutocompleteCallbackIntegerData
+from dc_rest.models.interaction_application_command_autocomplete_callback_number_data import InteractionApplicationCommandAutocompleteCallbackNumberData
+from dc_rest.models.interaction_application_command_autocomplete_callback_string_data import InteractionApplicationCommandAutocompleteCallbackStringData
+from dc_rest.models.interaction_callback_response import InteractionCallbackResponse
+from dc_rest.models.interaction_callback_response_resource import InteractionCallbackResponseResource
+from dc_rest.models.interaction_response import InteractionResponse
+from dc_rest.models.invite_application_response import InviteApplicationResponse
+from dc_rest.models.invite_channel_recipient_response import InviteChannelRecipientResponse
+from dc_rest.models.invite_channel_response import InviteChannelResponse
+from dc_rest.models.invite_guild_response import InviteGuildResponse
+from dc_rest.models.keyword_rule_response import KeywordRuleResponse
+from dc_rest.models.keyword_trigger_metadata import KeywordTriggerMetadata
+from dc_rest.models.keyword_trigger_metadata_response import KeywordTriggerMetadataResponse
+from dc_rest.models.keyword_upsert_request import KeywordUpsertRequest
+from dc_rest.models.keyword_upsert_request_partial import KeywordUpsertRequestPartial
+from dc_rest.models.launch_activity_interaction_callback_request import LaunchActivityInteractionCallbackRequest
+from dc_rest.models.launch_activity_interaction_callback_response import LaunchActivityInteractionCallbackResponse
+from dc_rest.models.list_application_emojis_response import ListApplicationEmojisResponse
+from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner
+from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner
+from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner
+from dc_rest.models.list_guild_integrations200_response_inner import ListGuildIntegrations200ResponseInner
+from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner
+from dc_rest.models.list_guild_soundboard_sounds_response import ListGuildSoundboardSoundsResponse
+from dc_rest.models.lobby_member_request import LobbyMemberRequest
+from dc_rest.models.lobby_member_response import LobbyMemberResponse
+from dc_rest.models.lobby_message_response import LobbyMessageResponse
+from dc_rest.models.lobby_response import LobbyResponse
+from dc_rest.models.ml_spam_rule_response import MLSpamRuleResponse
+from dc_rest.models.ml_spam_upsert_request import MLSpamUpsertRequest
+from dc_rest.models.ml_spam_upsert_request_partial import MLSpamUpsertRequestPartial
+from dc_rest.models.media_gallery_component_for_message_request import MediaGalleryComponentForMessageRequest
+from dc_rest.models.media_gallery_component_response import MediaGalleryComponentResponse
+from dc_rest.models.media_gallery_item_request import MediaGalleryItemRequest
+from dc_rest.models.media_gallery_item_response import MediaGalleryItemResponse
+from dc_rest.models.mention_spam_rule_response import MentionSpamRuleResponse
+from dc_rest.models.mention_spam_trigger_metadata import MentionSpamTriggerMetadata
+from dc_rest.models.mention_spam_trigger_metadata_response import MentionSpamTriggerMetadataResponse
+from dc_rest.models.mention_spam_upsert_request import MentionSpamUpsertRequest
+from dc_rest.models.mention_spam_upsert_request_partial import MentionSpamUpsertRequestPartial
+from dc_rest.models.mentionable_select_component_for_message_request import MentionableSelectComponentForMessageRequest
+from dc_rest.models.mentionable_select_component_for_message_request_default_values_inner import MentionableSelectComponentForMessageRequestDefaultValuesInner
+from dc_rest.models.mentionable_select_component_response import MentionableSelectComponentResponse
+from dc_rest.models.mentionable_select_component_response_default_values_inner import MentionableSelectComponentResponseDefaultValuesInner
+from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest
+from dc_rest.models.message_attachment_request import MessageAttachmentRequest
+from dc_rest.models.message_attachment_response import MessageAttachmentResponse
+from dc_rest.models.message_call_response import MessageCallResponse
+from dc_rest.models.message_component_interaction_metadata_response import MessageComponentInteractionMetadataResponse
+from dc_rest.models.message_create_request import MessageCreateRequest
+from dc_rest.models.message_edit_request_partial import MessageEditRequestPartial
+from dc_rest.models.message_embed_author_response import MessageEmbedAuthorResponse
+from dc_rest.models.message_embed_field_response import MessageEmbedFieldResponse
+from dc_rest.models.message_embed_footer_response import MessageEmbedFooterResponse
+from dc_rest.models.message_embed_image_response import MessageEmbedImageResponse
+from dc_rest.models.message_embed_provider_response import MessageEmbedProviderResponse
+from dc_rest.models.message_embed_response import MessageEmbedResponse
+from dc_rest.models.message_embed_video_response import MessageEmbedVideoResponse
+from dc_rest.models.message_interaction_response import MessageInteractionResponse
+from dc_rest.models.message_mention_channel_response import MessageMentionChannelResponse
+from dc_rest.models.message_reaction_count_details_response import MessageReactionCountDetailsResponse
+from dc_rest.models.message_reaction_emoji_response import MessageReactionEmojiResponse
+from dc_rest.models.message_reaction_response import MessageReactionResponse
+from dc_rest.models.message_reference_request import MessageReferenceRequest
+from dc_rest.models.message_reference_response import MessageReferenceResponse
+from dc_rest.models.message_response import MessageResponse
+from dc_rest.models.message_role_subscription_data_response import MessageRoleSubscriptionDataResponse
+from dc_rest.models.message_snapshot_response import MessageSnapshotResponse
+from dc_rest.models.message_sticker_item_response import MessageStickerItemResponse
+from dc_rest.models.minimal_content_message_response import MinimalContentMessageResponse
+from dc_rest.models.modal_interaction_callback_request import ModalInteractionCallbackRequest
+from dc_rest.models.modal_interaction_callback_request_data import ModalInteractionCallbackRequestData
+from dc_rest.models.modal_submit_interaction_metadata_response import ModalSubmitInteractionMetadataResponse
+from dc_rest.models.modal_submit_interaction_metadata_response_triggering_interaction_metadata import ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata
+from dc_rest.models.my_guild_response import MyGuildResponse
+from dc_rest.models.new_member_action_response import NewMemberActionResponse
+from dc_rest.models.o_auth2_get_authorization_response import OAuth2GetAuthorizationResponse
+from dc_rest.models.o_auth2_get_keys import OAuth2GetKeys
+from dc_rest.models.o_auth2_get_open_id_connect_user_info_response import OAuth2GetOpenIDConnectUserInfoResponse
+from dc_rest.models.o_auth2_key import OAuth2Key
+from dc_rest.models.onboarding_prompt_option_request import OnboardingPromptOptionRequest
+from dc_rest.models.onboarding_prompt_option_response import OnboardingPromptOptionResponse
+from dc_rest.models.onboarding_prompt_response import OnboardingPromptResponse
+from dc_rest.models.partial_discord_integration_response import PartialDiscordIntegrationResponse
+from dc_rest.models.partial_external_connection_integration_response import PartialExternalConnectionIntegrationResponse
+from dc_rest.models.partial_guild_subscription_integration_response import PartialGuildSubscriptionIntegrationResponse
+from dc_rest.models.partner_sdk_unmerge_provisional_account_request import PartnerSdkUnmergeProvisionalAccountRequest
+from dc_rest.models.pinned_message_response import PinnedMessageResponse
+from dc_rest.models.pinned_messages_response import PinnedMessagesResponse
+from dc_rest.models.poll_answer_create_request import PollAnswerCreateRequest
+from dc_rest.models.poll_answer_details_response import PollAnswerDetailsResponse
+from dc_rest.models.poll_answer_response import PollAnswerResponse
+from dc_rest.models.poll_create_request import PollCreateRequest
+from dc_rest.models.poll_emoji import PollEmoji
+from dc_rest.models.poll_emoji_create_request import PollEmojiCreateRequest
+from dc_rest.models.poll_media import PollMedia
+from dc_rest.models.poll_media_create_request import PollMediaCreateRequest
+from dc_rest.models.poll_media_response import PollMediaResponse
+from dc_rest.models.poll_response import PollResponse
+from dc_rest.models.poll_results_entry_response import PollResultsEntryResponse
+from dc_rest.models.poll_results_response import PollResultsResponse
+from dc_rest.models.pong_interaction_callback_request import PongInteractionCallbackRequest
+from dc_rest.models.private_application_response import PrivateApplicationResponse
+from dc_rest.models.private_channel_location import PrivateChannelLocation
+from dc_rest.models.private_channel_response import PrivateChannelResponse
+from dc_rest.models.private_group_channel_response import PrivateGroupChannelResponse
+from dc_rest.models.private_guild_member_response import PrivateGuildMemberResponse
+from dc_rest.models.provisional_token_response import ProvisionalTokenResponse
+from dc_rest.models.prune_guild_request import PruneGuildRequest
+from dc_rest.models.prune_guild_request_include_roles import PruneGuildRequestIncludeRoles
+from dc_rest.models.purchase_notification_response import PurchaseNotificationResponse
+from dc_rest.models.quarantine_user_action import QuarantineUserAction
+from dc_rest.models.quarantine_user_action_response import QuarantineUserActionResponse
+from dc_rest.models.resolved_objects_response import ResolvedObjectsResponse
+from dc_rest.models.resource_channel_response import ResourceChannelResponse
+from dc_rest.models.rich_embed import RichEmbed
+from dc_rest.models.rich_embed_author import RichEmbedAuthor
+from dc_rest.models.rich_embed_field import RichEmbedField
+from dc_rest.models.rich_embed_footer import RichEmbedFooter
+from dc_rest.models.rich_embed_image import RichEmbedImage
+from dc_rest.models.rich_embed_provider import RichEmbedProvider
+from dc_rest.models.rich_embed_thumbnail import RichEmbedThumbnail
+from dc_rest.models.rich_embed_video import RichEmbedVideo
+from dc_rest.models.role_select_component_for_message_request import RoleSelectComponentForMessageRequest
+from dc_rest.models.role_select_component_response import RoleSelectComponentResponse
+from dc_rest.models.role_select_default_value import RoleSelectDefaultValue
+from dc_rest.models.role_select_default_value_response import RoleSelectDefaultValueResponse
+from dc_rest.models.sdk_message_request import SDKMessageRequest
+from dc_rest.models.scheduled_event_response import ScheduledEventResponse
+from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse
+from dc_rest.models.section_component_for_message_request import SectionComponentForMessageRequest
+from dc_rest.models.section_component_for_message_request_accessory import SectionComponentForMessageRequestAccessory
+from dc_rest.models.section_component_response import SectionComponentResponse
+from dc_rest.models.section_component_response_accessory import SectionComponentResponseAccessory
+from dc_rest.models.separator_component_for_message_request import SeparatorComponentForMessageRequest
+from dc_rest.models.separator_component_response import SeparatorComponentResponse
+from dc_rest.models.set_channel_permission_overwrite_request import SetChannelPermissionOverwriteRequest
+from dc_rest.models.set_guild_application_command_permissions_request import SetGuildApplicationCommandPermissionsRequest
+from dc_rest.models.set_guild_mfa_level_request import SetGuildMfaLevelRequest
+from dc_rest.models.settings_emoji_response import SettingsEmojiResponse
+from dc_rest.models.slack_webhook import SlackWebhook
+from dc_rest.models.soundboard_create_request import SoundboardCreateRequest
+from dc_rest.models.soundboard_patch_request_partial import SoundboardPatchRequestPartial
+from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse
+from dc_rest.models.soundboard_sound_send_request import SoundboardSoundSendRequest
+from dc_rest.models.spam_link_rule_response import SpamLinkRuleResponse
+from dc_rest.models.stage_instance_response import StageInstanceResponse
+from dc_rest.models.stage_scheduled_event_create_request import StageScheduledEventCreateRequest
+from dc_rest.models.stage_scheduled_event_patch_request_partial import StageScheduledEventPatchRequestPartial
+from dc_rest.models.stage_scheduled_event_response import StageScheduledEventResponse
+from dc_rest.models.standard_sticker_response import StandardStickerResponse
+from dc_rest.models.sticker_pack_collection_response import StickerPackCollectionResponse
+from dc_rest.models.sticker_pack_response import StickerPackResponse
+from dc_rest.models.string_select_component_for_message_request import StringSelectComponentForMessageRequest
+from dc_rest.models.string_select_component_response import StringSelectComponentResponse
+from dc_rest.models.string_select_option_for_message_request import StringSelectOptionForMessageRequest
+from dc_rest.models.string_select_option_response import StringSelectOptionResponse
+from dc_rest.models.team_member_response import TeamMemberResponse
+from dc_rest.models.team_response import TeamResponse
+from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest
+from dc_rest.models.text_display_component_response import TextDisplayComponentResponse
+from dc_rest.models.text_input_component_for_modal_request import TextInputComponentForModalRequest
+from dc_rest.models.text_input_component_response import TextInputComponentResponse
+from dc_rest.models.thread_member_response import ThreadMemberResponse
+from dc_rest.models.thread_metadata_response import ThreadMetadataResponse
+from dc_rest.models.thread_response import ThreadResponse
+from dc_rest.models.thread_search_response import ThreadSearchResponse
+from dc_rest.models.thread_search_tag_parameter import ThreadSearchTagParameter
+from dc_rest.models.threads_response import ThreadsResponse
+from dc_rest.models.thumbnail_component_for_message_request import ThumbnailComponentForMessageRequest
+from dc_rest.models.thumbnail_component_response import ThumbnailComponentResponse
+from dc_rest.models.unfurled_media_request import UnfurledMediaRequest
+from dc_rest.models.unfurled_media_request_with_attachment_reference_required import UnfurledMediaRequestWithAttachmentReferenceRequired
+from dc_rest.models.unfurled_media_response import UnfurledMediaResponse
+from dc_rest.models.update_application_emoji_request import UpdateApplicationEmojiRequest
+from dc_rest.models.update_application_user_role_connection_request import UpdateApplicationUserRoleConnectionRequest
+from dc_rest.models.update_auto_moderation_rule_request import UpdateAutoModerationRuleRequest
+from dc_rest.models.update_channel_request import UpdateChannelRequest
+from dc_rest.models.update_dm_request_partial import UpdateDMRequestPartial
+from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest
+from dc_rest.models.update_group_dm_request_partial import UpdateGroupDMRequestPartial
+from dc_rest.models.update_guild_channel_request_partial import UpdateGuildChannelRequestPartial
+from dc_rest.models.update_guild_emoji_request import UpdateGuildEmojiRequest
+from dc_rest.models.update_guild_member_request import UpdateGuildMemberRequest
+from dc_rest.models.update_guild_onboarding_request import UpdateGuildOnboardingRequest
+from dc_rest.models.update_guild_scheduled_event_request import UpdateGuildScheduledEventRequest
+from dc_rest.models.update_guild_sticker_request import UpdateGuildStickerRequest
+from dc_rest.models.update_guild_template_request import UpdateGuildTemplateRequest
+from dc_rest.models.update_guild_widget_settings_request import UpdateGuildWidgetSettingsRequest
+from dc_rest.models.update_message_interaction_callback_request import UpdateMessageInteractionCallbackRequest
+from dc_rest.models.update_message_interaction_callback_response import UpdateMessageInteractionCallbackResponse
+from dc_rest.models.update_my_guild_member_request import UpdateMyGuildMemberRequest
+from dc_rest.models.update_onboarding_prompt_request import UpdateOnboardingPromptRequest
+from dc_rest.models.update_self_voice_state_request import UpdateSelfVoiceStateRequest
+from dc_rest.models.update_stage_instance_request import UpdateStageInstanceRequest
+from dc_rest.models.update_thread_request_partial import UpdateThreadRequestPartial
+from dc_rest.models.update_thread_tag_request import UpdateThreadTagRequest
+from dc_rest.models.update_voice_state_request import UpdateVoiceStateRequest
+from dc_rest.models.update_webhook_by_token_request import UpdateWebhookByTokenRequest
+from dc_rest.models.update_webhook_request import UpdateWebhookRequest
+from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse
+from dc_rest.models.user_collectibles_response import UserCollectiblesResponse
+from dc_rest.models.user_communication_disabled_action import UserCommunicationDisabledAction
+from dc_rest.models.user_communication_disabled_action_metadata import UserCommunicationDisabledActionMetadata
+from dc_rest.models.user_communication_disabled_action_metadata_response import UserCommunicationDisabledActionMetadataResponse
+from dc_rest.models.user_communication_disabled_action_response import UserCommunicationDisabledActionResponse
+from dc_rest.models.user_guild_onboarding_response import UserGuildOnboardingResponse
+from dc_rest.models.user_nameplate_response import UserNameplateResponse
+from dc_rest.models.user_pii_response import UserPIIResponse
+from dc_rest.models.user_primary_guild_response import UserPrimaryGuildResponse
+from dc_rest.models.user_response import UserResponse
+from dc_rest.models.user_select_component_for_message_request import UserSelectComponentForMessageRequest
+from dc_rest.models.user_select_component_response import UserSelectComponentResponse
+from dc_rest.models.user_select_default_value import UserSelectDefaultValue
+from dc_rest.models.user_select_default_value_response import UserSelectDefaultValueResponse
+from dc_rest.models.vanity_url_error_response import VanityURLErrorResponse
+from dc_rest.models.vanity_url_response import VanityURLResponse
+from dc_rest.models.voice_region_response import VoiceRegionResponse
+from dc_rest.models.voice_scheduled_event_create_request import VoiceScheduledEventCreateRequest
+from dc_rest.models.voice_scheduled_event_patch_request_partial import VoiceScheduledEventPatchRequestPartial
+from dc_rest.models.voice_scheduled_event_response import VoiceScheduledEventResponse
+from dc_rest.models.voice_state_response import VoiceStateResponse
+from dc_rest.models.webhook_slack_embed import WebhookSlackEmbed
+from dc_rest.models.webhook_slack_embed_field import WebhookSlackEmbedField
+from dc_rest.models.webhook_source_channel_response import WebhookSourceChannelResponse
+from dc_rest.models.webhook_source_guild_response import WebhookSourceGuildResponse
+from dc_rest.models.welcome_message_response import WelcomeMessageResponse
+from dc_rest.models.welcome_screen_patch_request_partial import WelcomeScreenPatchRequestPartial
+from dc_rest.models.widget_activity import WidgetActivity
+from dc_rest.models.widget_channel import WidgetChannel
+from dc_rest.models.widget_member import WidgetMember
+from dc_rest.models.widget_response import WidgetResponse
+from dc_rest.models.widget_settings_response import WidgetSettingsResponse
diff --git a/dc_rest/models/account_response.py b/dc_rest/models/account_response.py
new file mode 100644
index 0000000..14ec10f
--- /dev/null
+++ b/dc_rest/models/account_response.py
@@ -0,0 +1,133 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AccountResponse(BaseModel):
+ """
+ AccountResponse
+ """ # noqa: E501
+ id: StrictStr
+ name: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["id", "name"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AccountResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AccountResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in AccountResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/action_row_component_for_message_request.py b/dc_rest/models/action_row_component_for_message_request.py
new file mode 100644
index 0000000..0e9086d
--- /dev/null
+++ b/dc_rest/models/action_row_component_for_message_request.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from dc_rest.models.action_row_component_for_message_request_components_inner import ActionRowComponentForMessageRequestComponentsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ActionRowComponentForMessageRequest(BaseModel):
+ """
+ ActionRowComponentForMessageRequest
+ """ # noqa: E501
+ type: StrictInt
+ components: Annotated[List[ActionRowComponentForMessageRequestComponentsInner], Field(min_length=1, max_length=5)]
+ __properties: ClassVar[List[str]] = ["type", "components"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ActionRowComponentForMessageRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ActionRowComponentForMessageRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ActionRowComponentForMessageRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "components": [ActionRowComponentForMessageRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/action_row_component_for_message_request_components_inner.py b/dc_rest/models/action_row_component_for_message_request_components_inner.py
new file mode 100644
index 0000000..c216a1a
--- /dev/null
+++ b/dc_rest/models/action_row_component_for_message_request_components_inner.py
@@ -0,0 +1,227 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.button_component_for_message_request import ButtonComponentForMessageRequest
+from dc_rest.models.channel_select_component_for_message_request import ChannelSelectComponentForMessageRequest
+from dc_rest.models.mentionable_select_component_for_message_request import MentionableSelectComponentForMessageRequest
+from dc_rest.models.role_select_component_for_message_request import RoleSelectComponentForMessageRequest
+from dc_rest.models.string_select_component_for_message_request import StringSelectComponentForMessageRequest
+from dc_rest.models.user_select_component_for_message_request import UserSelectComponentForMessageRequest
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+ACTIONROWCOMPONENTFORMESSAGEREQUESTCOMPONENTSINNER_ONE_OF_SCHEMAS = ["ButtonComponentForMessageRequest", "ChannelSelectComponentForMessageRequest", "MentionableSelectComponentForMessageRequest", "RoleSelectComponentForMessageRequest", "StringSelectComponentForMessageRequest", "UserSelectComponentForMessageRequest"]
+
+class ActionRowComponentForMessageRequestComponentsInner(BaseModel):
+ """
+ ActionRowComponentForMessageRequestComponentsInner
+ """
+ # data type: ButtonComponentForMessageRequest
+ oneof_schema_1_validator: Optional[ButtonComponentForMessageRequest] = None
+ # data type: ChannelSelectComponentForMessageRequest
+ oneof_schema_2_validator: Optional[ChannelSelectComponentForMessageRequest] = None
+ # data type: MentionableSelectComponentForMessageRequest
+ oneof_schema_3_validator: Optional[MentionableSelectComponentForMessageRequest] = None
+ # data type: RoleSelectComponentForMessageRequest
+ oneof_schema_4_validator: Optional[RoleSelectComponentForMessageRequest] = None
+ # data type: StringSelectComponentForMessageRequest
+ oneof_schema_5_validator: Optional[StringSelectComponentForMessageRequest] = None
+ # data type: UserSelectComponentForMessageRequest
+ oneof_schema_6_validator: Optional[UserSelectComponentForMessageRequest] = None
+ actual_instance: Optional[Union[ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest]] = None
+ one_of_schemas: Set[str] = { "ButtonComponentForMessageRequest", "ChannelSelectComponentForMessageRequest", "MentionableSelectComponentForMessageRequest", "RoleSelectComponentForMessageRequest", "StringSelectComponentForMessageRequest", "UserSelectComponentForMessageRequest" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = ActionRowComponentForMessageRequestComponentsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ButtonComponentForMessageRequest
+ if not isinstance(v, ButtonComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ButtonComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: ChannelSelectComponentForMessageRequest
+ if not isinstance(v, ChannelSelectComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ChannelSelectComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: MentionableSelectComponentForMessageRequest
+ if not isinstance(v, MentionableSelectComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MentionableSelectComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: RoleSelectComponentForMessageRequest
+ if not isinstance(v, RoleSelectComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `RoleSelectComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: StringSelectComponentForMessageRequest
+ if not isinstance(v, StringSelectComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `StringSelectComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: UserSelectComponentForMessageRequest
+ if not isinstance(v, UserSelectComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `UserSelectComponentForMessageRequest`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ActionRowComponentForMessageRequestComponentsInner with oneOf schemas: ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ActionRowComponentForMessageRequestComponentsInner with oneOf schemas: ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ButtonComponentForMessageRequest
+ try:
+ instance.actual_instance = ButtonComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ChannelSelectComponentForMessageRequest
+ try:
+ instance.actual_instance = ChannelSelectComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MentionableSelectComponentForMessageRequest
+ try:
+ instance.actual_instance = MentionableSelectComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into RoleSelectComponentForMessageRequest
+ try:
+ instance.actual_instance = RoleSelectComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into StringSelectComponentForMessageRequest
+ try:
+ instance.actual_instance = StringSelectComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into UserSelectComponentForMessageRequest
+ try:
+ instance.actual_instance = UserSelectComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ActionRowComponentForMessageRequestComponentsInner with oneOf schemas: ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ActionRowComponentForMessageRequestComponentsInner with oneOf schemas: ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/action_row_component_for_modal_request.py b/dc_rest/models/action_row_component_for_modal_request.py
new file mode 100644
index 0000000..2fe890a
--- /dev/null
+++ b/dc_rest/models/action_row_component_for_modal_request.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from dc_rest.models.text_input_component_for_modal_request import TextInputComponentForModalRequest
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ActionRowComponentForModalRequest(BaseModel):
+ """
+ ActionRowComponentForModalRequest
+ """ # noqa: E501
+ type: StrictInt
+ components: Annotated[List[TextInputComponentForModalRequest], Field(min_length=1, max_length=5)]
+ __properties: ClassVar[List[str]] = ["type", "components"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ActionRowComponentForModalRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ActionRowComponentForModalRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ActionRowComponentForModalRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "components": [TextInputComponentForModalRequest.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/action_row_component_response.py b/dc_rest/models/action_row_component_response.py
new file mode 100644
index 0000000..2bc5a28
--- /dev/null
+++ b/dc_rest/models/action_row_component_response.py
@@ -0,0 +1,143 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.action_row_component_response_components_inner import ActionRowComponentResponseComponentsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ActionRowComponentResponse(BaseModel):
+ """
+ ActionRowComponentResponse
+ """ # noqa: E501
+ type: StrictInt
+ id: StrictInt
+ components: Optional[List[ActionRowComponentResponseComponentsInner]] = None
+ __properties: ClassVar[List[str]] = ["type", "id", "components"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ActionRowComponentResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ # set to None if components (nullable) is None
+ # and model_fields_set contains the field
+ if self.components is None and "components" in self.model_fields_set:
+ _dict['components'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ActionRowComponentResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ActionRowComponentResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "id": obj.get("id"),
+ "components": [ActionRowComponentResponseComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/action_row_component_response_components_inner.py b/dc_rest/models/action_row_component_response_components_inner.py
new file mode 100644
index 0000000..08f55f4
--- /dev/null
+++ b/dc_rest/models/action_row_component_response_components_inner.py
@@ -0,0 +1,241 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.button_component_response import ButtonComponentResponse
+from dc_rest.models.channel_select_component_response import ChannelSelectComponentResponse
+from dc_rest.models.mentionable_select_component_response import MentionableSelectComponentResponse
+from dc_rest.models.role_select_component_response import RoleSelectComponentResponse
+from dc_rest.models.string_select_component_response import StringSelectComponentResponse
+from dc_rest.models.text_input_component_response import TextInputComponentResponse
+from dc_rest.models.user_select_component_response import UserSelectComponentResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+ACTIONROWCOMPONENTRESPONSECOMPONENTSINNER_ONE_OF_SCHEMAS = ["ButtonComponentResponse", "ChannelSelectComponentResponse", "MentionableSelectComponentResponse", "RoleSelectComponentResponse", "StringSelectComponentResponse", "TextInputComponentResponse", "UserSelectComponentResponse"]
+
+class ActionRowComponentResponseComponentsInner(BaseModel):
+ """
+ ActionRowComponentResponseComponentsInner
+ """
+ # data type: ButtonComponentResponse
+ oneof_schema_1_validator: Optional[ButtonComponentResponse] = None
+ # data type: ChannelSelectComponentResponse
+ oneof_schema_2_validator: Optional[ChannelSelectComponentResponse] = None
+ # data type: MentionableSelectComponentResponse
+ oneof_schema_3_validator: Optional[MentionableSelectComponentResponse] = None
+ # data type: RoleSelectComponentResponse
+ oneof_schema_4_validator: Optional[RoleSelectComponentResponse] = None
+ # data type: StringSelectComponentResponse
+ oneof_schema_5_validator: Optional[StringSelectComponentResponse] = None
+ # data type: TextInputComponentResponse
+ oneof_schema_6_validator: Optional[TextInputComponentResponse] = None
+ # data type: UserSelectComponentResponse
+ oneof_schema_7_validator: Optional[UserSelectComponentResponse] = None
+ actual_instance: Optional[Union[ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse]] = None
+ one_of_schemas: Set[str] = { "ButtonComponentResponse", "ChannelSelectComponentResponse", "MentionableSelectComponentResponse", "RoleSelectComponentResponse", "StringSelectComponentResponse", "TextInputComponentResponse", "UserSelectComponentResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = ActionRowComponentResponseComponentsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ButtonComponentResponse
+ if not isinstance(v, ButtonComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ButtonComponentResponse`")
+ else:
+ match += 1
+ # validate data type: ChannelSelectComponentResponse
+ if not isinstance(v, ChannelSelectComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ChannelSelectComponentResponse`")
+ else:
+ match += 1
+ # validate data type: MentionableSelectComponentResponse
+ if not isinstance(v, MentionableSelectComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MentionableSelectComponentResponse`")
+ else:
+ match += 1
+ # validate data type: RoleSelectComponentResponse
+ if not isinstance(v, RoleSelectComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `RoleSelectComponentResponse`")
+ else:
+ match += 1
+ # validate data type: StringSelectComponentResponse
+ if not isinstance(v, StringSelectComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `StringSelectComponentResponse`")
+ else:
+ match += 1
+ # validate data type: TextInputComponentResponse
+ if not isinstance(v, TextInputComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `TextInputComponentResponse`")
+ else:
+ match += 1
+ # validate data type: UserSelectComponentResponse
+ if not isinstance(v, UserSelectComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `UserSelectComponentResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ActionRowComponentResponseComponentsInner with oneOf schemas: ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ActionRowComponentResponseComponentsInner with oneOf schemas: ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ButtonComponentResponse
+ try:
+ instance.actual_instance = ButtonComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ChannelSelectComponentResponse
+ try:
+ instance.actual_instance = ChannelSelectComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MentionableSelectComponentResponse
+ try:
+ instance.actual_instance = MentionableSelectComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into RoleSelectComponentResponse
+ try:
+ instance.actual_instance = RoleSelectComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into StringSelectComponentResponse
+ try:
+ instance.actual_instance = StringSelectComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into TextInputComponentResponse
+ try:
+ instance.actual_instance = TextInputComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into UserSelectComponentResponse
+ try:
+ instance.actual_instance = UserSelectComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ActionRowComponentResponseComponentsInner with oneOf schemas: ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ActionRowComponentResponseComponentsInner with oneOf schemas: ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/activities_attachment_response.py b/dc_rest/models/activities_attachment_response.py
new file mode 100644
index 0000000..856fa4a
--- /dev/null
+++ b/dc_rest/models/activities_attachment_response.py
@@ -0,0 +1,130 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List
+from dc_rest.models.attachment_response import AttachmentResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ActivitiesAttachmentResponse(BaseModel):
+ """
+ ActivitiesAttachmentResponse
+ """ # noqa: E501
+ attachment: AttachmentResponse
+ __properties: ClassVar[List[str]] = ["attachment"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ActivitiesAttachmentResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of attachment
+ if self.attachment:
+ _dict['attachment'] = self.attachment.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ActivitiesAttachmentResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ActivitiesAttachmentResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "attachment": AttachmentResponse.from_dict(obj["attachment"]) if obj.get("attachment") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/add_group_dm_user201_response.py b/dc_rest/models/add_group_dm_user201_response.py
new file mode 100644
index 0000000..7212738
--- /dev/null
+++ b/dc_rest/models/add_group_dm_user201_response.py
@@ -0,0 +1,171 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.private_channel_response import PrivateChannelResponse
+from dc_rest.models.private_group_channel_response import PrivateGroupChannelResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+ADDGROUPDMUSER201RESPONSE_ONE_OF_SCHEMAS = ["PrivateChannelResponse", "PrivateGroupChannelResponse"]
+
+class AddGroupDmUser201Response(BaseModel):
+ """
+ AddGroupDmUser201Response
+ """
+ # data type: PrivateChannelResponse
+ oneof_schema_1_validator: Optional[PrivateChannelResponse] = None
+ # data type: PrivateGroupChannelResponse
+ oneof_schema_2_validator: Optional[PrivateGroupChannelResponse] = None
+ actual_instance: Optional[Union[PrivateChannelResponse, PrivateGroupChannelResponse]] = None
+ one_of_schemas: Set[str] = { "PrivateChannelResponse", "PrivateGroupChannelResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = AddGroupDmUser201Response.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: PrivateChannelResponse
+ if not isinstance(v, PrivateChannelResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PrivateChannelResponse`")
+ else:
+ match += 1
+ # validate data type: PrivateGroupChannelResponse
+ if not isinstance(v, PrivateGroupChannelResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PrivateGroupChannelResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in AddGroupDmUser201Response with oneOf schemas: PrivateChannelResponse, PrivateGroupChannelResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in AddGroupDmUser201Response with oneOf schemas: PrivateChannelResponse, PrivateGroupChannelResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into PrivateChannelResponse
+ try:
+ instance.actual_instance = PrivateChannelResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into PrivateGroupChannelResponse
+ try:
+ instance.actual_instance = PrivateGroupChannelResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into AddGroupDmUser201Response with oneOf schemas: PrivateChannelResponse, PrivateGroupChannelResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into AddGroupDmUser201Response with oneOf schemas: PrivateChannelResponse, PrivateGroupChannelResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], PrivateChannelResponse, PrivateGroupChannelResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/add_group_dm_user_request.py b/dc_rest/models/add_group_dm_user_request.py
new file mode 100644
index 0000000..6a15f08
--- /dev/null
+++ b/dc_rest/models/add_group_dm_user_request.py
@@ -0,0 +1,139 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AddGroupDmUserRequest(BaseModel):
+ """
+ AddGroupDmUserRequest
+ """ # noqa: E501
+ access_token: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ nick: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ __properties: ClassVar[List[str]] = ["access_token", "nick"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AddGroupDmUserRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if access_token (nullable) is None
+ # and model_fields_set contains the field
+ if self.access_token is None and "access_token" in self.model_fields_set:
+ _dict['access_token'] = None
+
+ # set to None if nick (nullable) is None
+ # and model_fields_set contains the field
+ if self.nick is None and "nick" in self.model_fields_set:
+ _dict['nick'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AddGroupDmUserRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in AddGroupDmUserRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "access_token": obj.get("access_token"),
+ "nick": obj.get("nick")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/add_guild_member_request.py b/dc_rest/models/add_guild_member_request.py
new file mode 100644
index 0000000..e784296
--- /dev/null
+++ b/dc_rest/models/add_guild_member_request.py
@@ -0,0 +1,162 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AddGuildMemberRequest(BaseModel):
+ """
+ AddGuildMemberRequest
+ """ # noqa: E501
+ nick: Optional[Annotated[str, Field(strict=True, max_length=32)]] = None
+ roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=1521)]] = None
+ mute: Optional[StrictBool] = None
+ deaf: Optional[StrictBool] = None
+ access_token: Annotated[str, Field(strict=True, max_length=152133)]
+ flags: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["nick", "roles", "mute", "deaf", "access_token", "flags"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AddGuildMemberRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if nick (nullable) is None
+ # and model_fields_set contains the field
+ if self.nick is None and "nick" in self.model_fields_set:
+ _dict['nick'] = None
+
+ # set to None if roles (nullable) is None
+ # and model_fields_set contains the field
+ if self.roles is None and "roles" in self.model_fields_set:
+ _dict['roles'] = None
+
+ # set to None if mute (nullable) is None
+ # and model_fields_set contains the field
+ if self.mute is None and "mute" in self.model_fields_set:
+ _dict['mute'] = None
+
+ # set to None if deaf (nullable) is None
+ # and model_fields_set contains the field
+ if self.deaf is None and "deaf" in self.model_fields_set:
+ _dict['deaf'] = None
+
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AddGuildMemberRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in AddGuildMemberRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "nick": obj.get("nick"),
+ "roles": obj.get("roles"),
+ "mute": obj.get("mute"),
+ "deaf": obj.get("deaf"),
+ "access_token": obj.get("access_token"),
+ "flags": obj.get("flags")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/add_lobby_member_request.py b/dc_rest/models/add_lobby_member_request.py
new file mode 100644
index 0000000..b55b0ee
--- /dev/null
+++ b/dc_rest/models/add_lobby_member_request.py
@@ -0,0 +1,144 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AddLobbyMemberRequest(BaseModel):
+ """
+ AddLobbyMemberRequest
+ """ # noqa: E501
+ metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None
+ flags: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["metadata", "flags"]
+
+ @field_validator('flags')
+ def flags_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set([1]):
+ raise ValueError("must be one of enum values (1)")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AddLobbyMemberRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AddLobbyMemberRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in AddLobbyMemberRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "metadata": obj.get("metadata"),
+ "flags": obj.get("flags")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_attachment_option.py b/dc_rest/models/application_command_attachment_option.py
new file mode 100644
index 0000000..7f91ffb
--- /dev/null
+++ b/dc_rest/models/application_command_attachment_option.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandAttachmentOption(BaseModel):
+ """
+ ApplicationCommandAttachmentOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandAttachmentOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandAttachmentOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandAttachmentOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_attachment_option_response.py b/dc_rest/models/application_command_attachment_option_response.py
new file mode 100644
index 0000000..962ffe0
--- /dev/null
+++ b/dc_rest/models/application_command_attachment_option_response.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandAttachmentOptionResponse(BaseModel):
+ """
+ ApplicationCommandAttachmentOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandAttachmentOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandAttachmentOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandAttachmentOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_autocomplete_callback_request.py b/dc_rest/models/application_command_autocomplete_callback_request.py
new file mode 100644
index 0000000..7a65a80
--- /dev/null
+++ b/dc_rest/models/application_command_autocomplete_callback_request.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.application_command_autocomplete_callback_request_data import ApplicationCommandAutocompleteCallbackRequestData
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandAutocompleteCallbackRequest(BaseModel):
+ """
+ ApplicationCommandAutocompleteCallbackRequest
+ """ # noqa: E501
+ type: Optional[StrictInt]
+ data: ApplicationCommandAutocompleteCallbackRequestData
+ __properties: ClassVar[List[str]] = ["type", "data"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandAutocompleteCallbackRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of data
+ if self.data:
+ _dict['data'] = self.data.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandAutocompleteCallbackRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandAutocompleteCallbackRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "data": ApplicationCommandAutocompleteCallbackRequestData.from_dict(obj["data"]) if obj.get("data") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_autocomplete_callback_request_data.py b/dc_rest/models/application_command_autocomplete_callback_request_data.py
new file mode 100644
index 0000000..0cf6f65
--- /dev/null
+++ b/dc_rest/models/application_command_autocomplete_callback_request_data.py
@@ -0,0 +1,183 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+from inspect import getfullargspec
+import json
+import pprint
+import re # noqa: F401
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Optional
+from dc_rest.models.interaction_application_command_autocomplete_callback_integer_data import InteractionApplicationCommandAutocompleteCallbackIntegerData
+from dc_rest.models.interaction_application_command_autocomplete_callback_number_data import InteractionApplicationCommandAutocompleteCallbackNumberData
+from dc_rest.models.interaction_application_command_autocomplete_callback_string_data import InteractionApplicationCommandAutocompleteCallbackStringData
+from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
+from typing_extensions import Literal, Self
+from pydantic import Field
+
+APPLICATIONCOMMANDAUTOCOMPLETECALLBACKREQUESTDATA_ANY_OF_SCHEMAS = ["InteractionApplicationCommandAutocompleteCallbackIntegerData", "InteractionApplicationCommandAutocompleteCallbackNumberData", "InteractionApplicationCommandAutocompleteCallbackStringData"]
+
+class ApplicationCommandAutocompleteCallbackRequestData(BaseModel):
+ """
+ ApplicationCommandAutocompleteCallbackRequestData
+ """
+
+ # data type: InteractionApplicationCommandAutocompleteCallbackIntegerData
+ anyof_schema_1_validator: Optional[InteractionApplicationCommandAutocompleteCallbackIntegerData] = None
+ # data type: InteractionApplicationCommandAutocompleteCallbackNumberData
+ anyof_schema_2_validator: Optional[InteractionApplicationCommandAutocompleteCallbackNumberData] = None
+ # data type: InteractionApplicationCommandAutocompleteCallbackStringData
+ anyof_schema_3_validator: Optional[InteractionApplicationCommandAutocompleteCallbackStringData] = None
+ if TYPE_CHECKING:
+ actual_instance: Optional[Union[InteractionApplicationCommandAutocompleteCallbackIntegerData, InteractionApplicationCommandAutocompleteCallbackNumberData, InteractionApplicationCommandAutocompleteCallbackStringData]] = None
+ else:
+ actual_instance: Any = None
+ any_of_schemas: Set[str] = { "InteractionApplicationCommandAutocompleteCallbackIntegerData", "InteractionApplicationCommandAutocompleteCallbackNumberData", "InteractionApplicationCommandAutocompleteCallbackStringData" }
+
+ model_config = {
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_anyof(cls, v):
+ instance = ApplicationCommandAutocompleteCallbackRequestData.model_construct()
+ error_messages = []
+ # validate data type: InteractionApplicationCommandAutocompleteCallbackIntegerData
+ if not isinstance(v, InteractionApplicationCommandAutocompleteCallbackIntegerData):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `InteractionApplicationCommandAutocompleteCallbackIntegerData`")
+ else:
+ return v
+
+ # validate data type: InteractionApplicationCommandAutocompleteCallbackNumberData
+ if not isinstance(v, InteractionApplicationCommandAutocompleteCallbackNumberData):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `InteractionApplicationCommandAutocompleteCallbackNumberData`")
+ else:
+ return v
+
+ # validate data type: InteractionApplicationCommandAutocompleteCallbackStringData
+ if not isinstance(v, InteractionApplicationCommandAutocompleteCallbackStringData):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `InteractionApplicationCommandAutocompleteCallbackStringData`")
+ else:
+ return v
+
+ if error_messages:
+ # no match
+ raise ValueError("No match found when setting the actual_instance in ApplicationCommandAutocompleteCallbackRequestData with anyOf schemas: InteractionApplicationCommandAutocompleteCallbackIntegerData, InteractionApplicationCommandAutocompleteCallbackNumberData, InteractionApplicationCommandAutocompleteCallbackStringData. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Dict[str, Any]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ # anyof_schema_1_validator: Optional[InteractionApplicationCommandAutocompleteCallbackIntegerData] = None
+ try:
+ instance.actual_instance = InteractionApplicationCommandAutocompleteCallbackIntegerData.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # anyof_schema_2_validator: Optional[InteractionApplicationCommandAutocompleteCallbackNumberData] = None
+ try:
+ instance.actual_instance = InteractionApplicationCommandAutocompleteCallbackNumberData.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # anyof_schema_3_validator: Optional[InteractionApplicationCommandAutocompleteCallbackStringData] = None
+ try:
+ instance.actual_instance = InteractionApplicationCommandAutocompleteCallbackStringData.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if error_messages:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ApplicationCommandAutocompleteCallbackRequestData with anyOf schemas: InteractionApplicationCommandAutocompleteCallbackIntegerData, InteractionApplicationCommandAutocompleteCallbackNumberData, InteractionApplicationCommandAutocompleteCallbackStringData. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], InteractionApplicationCommandAutocompleteCallbackIntegerData, InteractionApplicationCommandAutocompleteCallbackNumberData, InteractionApplicationCommandAutocompleteCallbackStringData]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/application_command_boolean_option.py b/dc_rest/models/application_command_boolean_option.py
new file mode 100644
index 0000000..0418004
--- /dev/null
+++ b/dc_rest/models/application_command_boolean_option.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandBooleanOption(BaseModel):
+ """
+ ApplicationCommandBooleanOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandBooleanOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandBooleanOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandBooleanOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_boolean_option_response.py b/dc_rest/models/application_command_boolean_option_response.py
new file mode 100644
index 0000000..7526ebd
--- /dev/null
+++ b/dc_rest/models/application_command_boolean_option_response.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandBooleanOptionResponse(BaseModel):
+ """
+ ApplicationCommandBooleanOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandBooleanOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandBooleanOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandBooleanOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_channel_option.py b/dc_rest/models/application_command_channel_option.py
new file mode 100644
index 0000000..0b6215b
--- /dev/null
+++ b/dc_rest/models/application_command_channel_option.py
@@ -0,0 +1,149 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandChannelOption(BaseModel):
+ """
+ ApplicationCommandChannelOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ channel_types: Optional[List[StrictInt]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "channel_types"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandChannelOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if channel_types (nullable) is None
+ # and model_fields_set contains the field
+ if self.channel_types is None and "channel_types" in self.model_fields_set:
+ _dict['channel_types'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandChannelOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandChannelOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "channel_types": obj.get("channel_types")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_channel_option_response.py b/dc_rest/models/application_command_channel_option_response.py
new file mode 100644
index 0000000..11e52d0
--- /dev/null
+++ b/dc_rest/models/application_command_channel_option_response.py
@@ -0,0 +1,162 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandChannelOptionResponse(BaseModel):
+ """
+ ApplicationCommandChannelOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ channel_types: Optional[List[StrictInt]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "channel_types"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandChannelOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if channel_types (nullable) is None
+ # and model_fields_set contains the field
+ if self.channel_types is None and "channel_types" in self.model_fields_set:
+ _dict['channel_types'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandChannelOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandChannelOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "channel_types": obj.get("channel_types")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_create_request.py b/dc_rest/models/application_command_create_request.py
new file mode 100644
index 0000000..b3540f7
--- /dev/null
+++ b/dc_rest/models/application_command_create_request.py
@@ -0,0 +1,185 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandCreateRequest(BaseModel):
+ """
+ ApplicationCommandCreateRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ options: Optional[Annotated[List[ApplicationCommandCreateRequestOptionsInner], Field(max_length=25)]] = None
+ default_member_permissions: Optional[Annotated[int, Field(le=4503599627370495, strict=True, ge=0)]] = None
+ dm_permission: Optional[StrictBool] = None
+ contexts: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None
+ integration_types: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None
+ handler: Optional[StrictInt] = None
+ type: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["name", "name_localizations", "description", "description_localizations", "options", "default_member_permissions", "dm_permission", "contexts", "integration_types", "handler", "type"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandCreateRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in options (list)
+ _items = []
+ if self.options:
+ for _item_options in self.options:
+ if _item_options:
+ _items.append(_item_options.to_dict())
+ _dict['options'] = _items
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if options (nullable) is None
+ # and model_fields_set contains the field
+ if self.options is None and "options" in self.model_fields_set:
+ _dict['options'] = None
+
+ # set to None if default_member_permissions (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_member_permissions is None and "default_member_permissions" in self.model_fields_set:
+ _dict['default_member_permissions'] = None
+
+ # set to None if dm_permission (nullable) is None
+ # and model_fields_set contains the field
+ if self.dm_permission is None and "dm_permission" in self.model_fields_set:
+ _dict['dm_permission'] = None
+
+ # set to None if contexts (nullable) is None
+ # and model_fields_set contains the field
+ if self.contexts is None and "contexts" in self.model_fields_set:
+ _dict['contexts'] = None
+
+ # set to None if integration_types (nullable) is None
+ # and model_fields_set contains the field
+ if self.integration_types is None and "integration_types" in self.model_fields_set:
+ _dict['integration_types'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandCreateRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandCreateRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "options": [ApplicationCommandCreateRequestOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None,
+ "default_member_permissions": obj.get("default_member_permissions"),
+ "dm_permission": obj.get("dm_permission"),
+ "contexts": obj.get("contexts"),
+ "integration_types": obj.get("integration_types"),
+ "handler": obj.get("handler"),
+ "type": obj.get("type")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_create_request_options_inner.py b/dc_rest/models/application_command_create_request_options_inner.py
new file mode 100644
index 0000000..3d4da2f
--- /dev/null
+++ b/dc_rest/models/application_command_create_request_options_inner.py
@@ -0,0 +1,297 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.application_command_attachment_option import ApplicationCommandAttachmentOption
+from dc_rest.models.application_command_boolean_option import ApplicationCommandBooleanOption
+from dc_rest.models.application_command_channel_option import ApplicationCommandChannelOption
+from dc_rest.models.application_command_integer_option import ApplicationCommandIntegerOption
+from dc_rest.models.application_command_mentionable_option import ApplicationCommandMentionableOption
+from dc_rest.models.application_command_number_option import ApplicationCommandNumberOption
+from dc_rest.models.application_command_role_option import ApplicationCommandRoleOption
+from dc_rest.models.application_command_string_option import ApplicationCommandStringOption
+from dc_rest.models.application_command_subcommand_group_option import ApplicationCommandSubcommandGroupOption
+from dc_rest.models.application_command_subcommand_option import ApplicationCommandSubcommandOption
+from dc_rest.models.application_command_user_option import ApplicationCommandUserOption
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+APPLICATIONCOMMANDCREATEREQUESTOPTIONSINNER_ONE_OF_SCHEMAS = ["ApplicationCommandAttachmentOption", "ApplicationCommandBooleanOption", "ApplicationCommandChannelOption", "ApplicationCommandIntegerOption", "ApplicationCommandMentionableOption", "ApplicationCommandNumberOption", "ApplicationCommandRoleOption", "ApplicationCommandStringOption", "ApplicationCommandSubcommandGroupOption", "ApplicationCommandSubcommandOption", "ApplicationCommandUserOption"]
+
+class ApplicationCommandCreateRequestOptionsInner(BaseModel):
+ """
+ ApplicationCommandCreateRequestOptionsInner
+ """
+ # data type: ApplicationCommandAttachmentOption
+ oneof_schema_1_validator: Optional[ApplicationCommandAttachmentOption] = None
+ # data type: ApplicationCommandBooleanOption
+ oneof_schema_2_validator: Optional[ApplicationCommandBooleanOption] = None
+ # data type: ApplicationCommandChannelOption
+ oneof_schema_3_validator: Optional[ApplicationCommandChannelOption] = None
+ # data type: ApplicationCommandIntegerOption
+ oneof_schema_4_validator: Optional[ApplicationCommandIntegerOption] = None
+ # data type: ApplicationCommandMentionableOption
+ oneof_schema_5_validator: Optional[ApplicationCommandMentionableOption] = None
+ # data type: ApplicationCommandNumberOption
+ oneof_schema_6_validator: Optional[ApplicationCommandNumberOption] = None
+ # data type: ApplicationCommandRoleOption
+ oneof_schema_7_validator: Optional[ApplicationCommandRoleOption] = None
+ # data type: ApplicationCommandStringOption
+ oneof_schema_8_validator: Optional[ApplicationCommandStringOption] = None
+ # data type: ApplicationCommandSubcommandGroupOption
+ oneof_schema_9_validator: Optional[ApplicationCommandSubcommandGroupOption] = None
+ # data type: ApplicationCommandSubcommandOption
+ oneof_schema_10_validator: Optional[ApplicationCommandSubcommandOption] = None
+ # data type: ApplicationCommandUserOption
+ oneof_schema_11_validator: Optional[ApplicationCommandUserOption] = None
+ actual_instance: Optional[Union[ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption]] = None
+ one_of_schemas: Set[str] = { "ApplicationCommandAttachmentOption", "ApplicationCommandBooleanOption", "ApplicationCommandChannelOption", "ApplicationCommandIntegerOption", "ApplicationCommandMentionableOption", "ApplicationCommandNumberOption", "ApplicationCommandRoleOption", "ApplicationCommandStringOption", "ApplicationCommandSubcommandGroupOption", "ApplicationCommandSubcommandOption", "ApplicationCommandUserOption" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = ApplicationCommandCreateRequestOptionsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ApplicationCommandAttachmentOption
+ if not isinstance(v, ApplicationCommandAttachmentOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandAttachmentOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandBooleanOption
+ if not isinstance(v, ApplicationCommandBooleanOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandBooleanOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandChannelOption
+ if not isinstance(v, ApplicationCommandChannelOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandChannelOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandIntegerOption
+ if not isinstance(v, ApplicationCommandIntegerOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandIntegerOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandMentionableOption
+ if not isinstance(v, ApplicationCommandMentionableOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandMentionableOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandNumberOption
+ if not isinstance(v, ApplicationCommandNumberOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandNumberOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandRoleOption
+ if not isinstance(v, ApplicationCommandRoleOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandRoleOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandStringOption
+ if not isinstance(v, ApplicationCommandStringOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandStringOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandSubcommandGroupOption
+ if not isinstance(v, ApplicationCommandSubcommandGroupOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandSubcommandGroupOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandSubcommandOption
+ if not isinstance(v, ApplicationCommandSubcommandOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandSubcommandOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandUserOption
+ if not isinstance(v, ApplicationCommandUserOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandUserOption`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ApplicationCommandCreateRequestOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ApplicationCommandCreateRequestOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ApplicationCommandAttachmentOption
+ try:
+ instance.actual_instance = ApplicationCommandAttachmentOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandBooleanOption
+ try:
+ instance.actual_instance = ApplicationCommandBooleanOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandChannelOption
+ try:
+ instance.actual_instance = ApplicationCommandChannelOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandIntegerOption
+ try:
+ instance.actual_instance = ApplicationCommandIntegerOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandMentionableOption
+ try:
+ instance.actual_instance = ApplicationCommandMentionableOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandNumberOption
+ try:
+ instance.actual_instance = ApplicationCommandNumberOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandRoleOption
+ try:
+ instance.actual_instance = ApplicationCommandRoleOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandStringOption
+ try:
+ instance.actual_instance = ApplicationCommandStringOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandSubcommandGroupOption
+ try:
+ instance.actual_instance = ApplicationCommandSubcommandGroupOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandSubcommandOption
+ try:
+ instance.actual_instance = ApplicationCommandSubcommandOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandUserOption
+ try:
+ instance.actual_instance = ApplicationCommandUserOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ApplicationCommandCreateRequestOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ApplicationCommandCreateRequestOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/application_command_integer_option.py b/dc_rest/models/application_command_integer_option.py
new file mode 100644
index 0000000..3442c1b
--- /dev/null
+++ b/dc_rest/models/application_command_integer_option.py
@@ -0,0 +1,168 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_option_integer_choice import ApplicationCommandOptionIntegerChoice
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandIntegerOption(BaseModel):
+ """
+ ApplicationCommandIntegerOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ autocomplete: Optional[StrictBool] = None
+ choices: Optional[Annotated[List[ApplicationCommandOptionIntegerChoice], Field(max_length=25)]] = None
+ min_value: Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]] = None
+ max_value: Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "autocomplete", "choices", "min_value", "max_value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandIntegerOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in choices (list)
+ _items = []
+ if self.choices:
+ for _item_choices in self.choices:
+ if _item_choices:
+ _items.append(_item_choices.to_dict())
+ _dict['choices'] = _items
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if autocomplete (nullable) is None
+ # and model_fields_set contains the field
+ if self.autocomplete is None and "autocomplete" in self.model_fields_set:
+ _dict['autocomplete'] = None
+
+ # set to None if choices (nullable) is None
+ # and model_fields_set contains the field
+ if self.choices is None and "choices" in self.model_fields_set:
+ _dict['choices'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandIntegerOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandIntegerOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "autocomplete": obj.get("autocomplete"),
+ "choices": [ApplicationCommandOptionIntegerChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None,
+ "min_value": obj.get("min_value"),
+ "max_value": obj.get("max_value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_integer_option_response.py b/dc_rest/models/application_command_integer_option_response.py
new file mode 100644
index 0000000..b15aefd
--- /dev/null
+++ b/dc_rest/models/application_command_integer_option_response.py
@@ -0,0 +1,182 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_option_integer_choice_response import ApplicationCommandOptionIntegerChoiceResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandIntegerOptionResponse(BaseModel):
+ """
+ ApplicationCommandIntegerOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ autocomplete: Optional[StrictBool] = None
+ choices: Optional[List[ApplicationCommandOptionIntegerChoiceResponse]] = None
+ min_value: Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]] = None
+ max_value: Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "autocomplete", "choices", "min_value", "max_value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandIntegerOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in choices (list)
+ _items = []
+ if self.choices:
+ for _item_choices in self.choices:
+ if _item_choices:
+ _items.append(_item_choices.to_dict())
+ _dict['choices'] = _items
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if autocomplete (nullable) is None
+ # and model_fields_set contains the field
+ if self.autocomplete is None and "autocomplete" in self.model_fields_set:
+ _dict['autocomplete'] = None
+
+ # set to None if choices (nullable) is None
+ # and model_fields_set contains the field
+ if self.choices is None and "choices" in self.model_fields_set:
+ _dict['choices'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandIntegerOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandIntegerOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "autocomplete": obj.get("autocomplete"),
+ "choices": [ApplicationCommandOptionIntegerChoiceResponse.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None,
+ "min_value": obj.get("min_value"),
+ "max_value": obj.get("max_value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_interaction_metadata_response.py b/dc_rest/models/application_command_interaction_metadata_response.py
new file mode 100644
index 0000000..b9aea42
--- /dev/null
+++ b/dc_rest/models/application_command_interaction_metadata_response.py
@@ -0,0 +1,183 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandInteractionMetadataResponse(BaseModel):
+ """
+ ApplicationCommandInteractionMetadataResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ type: StrictInt
+ user: Optional[UserResponse] = None
+ authorizing_integration_owners: Dict[str, Annotated[str, Field(strict=True)]]
+ original_response_message_id: Optional[Annotated[str, Field(strict=True)]] = None
+ target_user: Optional[UserResponse] = None
+ target_message_id: Optional[Annotated[str, Field(strict=True)]] = None
+ __properties: ClassVar[List[str]] = ["id", "type", "user", "authorizing_integration_owners", "original_response_message_id", "target_user", "target_message_id"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('original_response_message_id')
+ def original_response_message_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('target_message_id')
+ def target_message_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandInteractionMetadataResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of target_user
+ if self.target_user:
+ _dict['target_user'] = self.target_user.to_dict()
+ # set to None if user (nullable) is None
+ # and model_fields_set contains the field
+ if self.user is None and "user" in self.model_fields_set:
+ _dict['user'] = None
+
+ # set to None if target_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_user is None and "target_user" in self.model_fields_set:
+ _dict['target_user'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandInteractionMetadataResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandInteractionMetadataResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None,
+ "authorizing_integration_owners": obj.get("authorizing_integration_owners"),
+ "original_response_message_id": obj.get("original_response_message_id"),
+ "target_user": UserResponse.from_dict(obj["target_user"]) if obj.get("target_user") is not None else None,
+ "target_message_id": obj.get("target_message_id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_mentionable_option.py b/dc_rest/models/application_command_mentionable_option.py
new file mode 100644
index 0000000..6a495e7
--- /dev/null
+++ b/dc_rest/models/application_command_mentionable_option.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandMentionableOption(BaseModel):
+ """
+ ApplicationCommandMentionableOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandMentionableOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandMentionableOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandMentionableOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_mentionable_option_response.py b/dc_rest/models/application_command_mentionable_option_response.py
new file mode 100644
index 0000000..66cf56e
--- /dev/null
+++ b/dc_rest/models/application_command_mentionable_option_response.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandMentionableOptionResponse(BaseModel):
+ """
+ ApplicationCommandMentionableOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandMentionableOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandMentionableOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandMentionableOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_number_option.py b/dc_rest/models/application_command_number_option.py
new file mode 100644
index 0000000..6530512
--- /dev/null
+++ b/dc_rest/models/application_command_number_option.py
@@ -0,0 +1,178 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing_extensions import Annotated
+from dc_rest.models.application_command_option_number_choice import ApplicationCommandOptionNumberChoice
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandNumberOption(BaseModel):
+ """
+ ApplicationCommandNumberOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ autocomplete: Optional[StrictBool] = None
+ choices: Optional[Annotated[List[ApplicationCommandOptionNumberChoice], Field(max_length=25)]] = None
+ min_value: Optional[Union[StrictFloat, StrictInt]] = None
+ max_value: Optional[Union[StrictFloat, StrictInt]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "autocomplete", "choices", "min_value", "max_value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandNumberOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in choices (list)
+ _items = []
+ if self.choices:
+ for _item_choices in self.choices:
+ if _item_choices:
+ _items.append(_item_choices.to_dict())
+ _dict['choices'] = _items
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if autocomplete (nullable) is None
+ # and model_fields_set contains the field
+ if self.autocomplete is None and "autocomplete" in self.model_fields_set:
+ _dict['autocomplete'] = None
+
+ # set to None if choices (nullable) is None
+ # and model_fields_set contains the field
+ if self.choices is None and "choices" in self.model_fields_set:
+ _dict['choices'] = None
+
+ # set to None if min_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.min_value is None and "min_value" in self.model_fields_set:
+ _dict['min_value'] = None
+
+ # set to None if max_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_value is None and "max_value" in self.model_fields_set:
+ _dict['max_value'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandNumberOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandNumberOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "autocomplete": obj.get("autocomplete"),
+ "choices": [ApplicationCommandOptionNumberChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None,
+ "min_value": obj.get("min_value"),
+ "max_value": obj.get("max_value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_number_option_response.py b/dc_rest/models/application_command_number_option_response.py
new file mode 100644
index 0000000..c801b74
--- /dev/null
+++ b/dc_rest/models/application_command_number_option_response.py
@@ -0,0 +1,191 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from dc_rest.models.application_command_option_number_choice_response import ApplicationCommandOptionNumberChoiceResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandNumberOptionResponse(BaseModel):
+ """
+ ApplicationCommandNumberOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ autocomplete: Optional[StrictBool] = None
+ choices: Optional[List[ApplicationCommandOptionNumberChoiceResponse]] = None
+ min_value: Optional[Union[StrictFloat, StrictInt]] = None
+ max_value: Optional[Union[StrictFloat, StrictInt]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "autocomplete", "choices", "min_value", "max_value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandNumberOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in choices (list)
+ _items = []
+ if self.choices:
+ for _item_choices in self.choices:
+ if _item_choices:
+ _items.append(_item_choices.to_dict())
+ _dict['choices'] = _items
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if autocomplete (nullable) is None
+ # and model_fields_set contains the field
+ if self.autocomplete is None and "autocomplete" in self.model_fields_set:
+ _dict['autocomplete'] = None
+
+ # set to None if choices (nullable) is None
+ # and model_fields_set contains the field
+ if self.choices is None and "choices" in self.model_fields_set:
+ _dict['choices'] = None
+
+ # set to None if min_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.min_value is None and "min_value" in self.model_fields_set:
+ _dict['min_value'] = None
+
+ # set to None if max_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_value is None and "max_value" in self.model_fields_set:
+ _dict['max_value'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandNumberOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandNumberOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "autocomplete": obj.get("autocomplete"),
+ "choices": [ApplicationCommandOptionNumberChoiceResponse.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None,
+ "min_value": obj.get("min_value"),
+ "max_value": obj.get("max_value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_option_integer_choice.py b/dc_rest/models/application_command_option_integer_choice.py
new file mode 100644
index 0000000..b205991
--- /dev/null
+++ b/dc_rest/models/application_command_option_integer_choice.py
@@ -0,0 +1,131 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandOptionIntegerChoice(BaseModel):
+ """
+ ApplicationCommandOptionIntegerChoice
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ value: Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]
+ __properties: ClassVar[List[str]] = ["name", "name_localizations", "value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionIntegerChoice from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionIntegerChoice from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionIntegerChoice) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "value": obj.get("value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_option_integer_choice_response.py b/dc_rest/models/application_command_option_integer_choice_response.py
new file mode 100644
index 0000000..1fc7ad8
--- /dev/null
+++ b/dc_rest/models/application_command_option_integer_choice_response.py
@@ -0,0 +1,138 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandOptionIntegerChoiceResponse(BaseModel):
+ """
+ ApplicationCommandOptionIntegerChoiceResponse
+ """ # noqa: E501
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ value: Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]
+ __properties: ClassVar[List[str]] = ["name", "name_localized", "name_localizations", "value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionIntegerChoiceResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionIntegerChoiceResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionIntegerChoiceResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "value": obj.get("value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_option_number_choice.py b/dc_rest/models/application_command_option_number_choice.py
new file mode 100644
index 0000000..06aea35
--- /dev/null
+++ b/dc_rest/models/application_command_option_number_choice.py
@@ -0,0 +1,131 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandOptionNumberChoice(BaseModel):
+ """
+ ApplicationCommandOptionNumberChoice
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ value: Union[StrictFloat, StrictInt]
+ __properties: ClassVar[List[str]] = ["name", "name_localizations", "value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionNumberChoice from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionNumberChoice from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionNumberChoice) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "value": obj.get("value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_option_number_choice_response.py b/dc_rest/models/application_command_option_number_choice_response.py
new file mode 100644
index 0000000..4e389a1
--- /dev/null
+++ b/dc_rest/models/application_command_option_number_choice_response.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandOptionNumberChoiceResponse(BaseModel):
+ """
+ ApplicationCommandOptionNumberChoiceResponse
+ """ # noqa: E501
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ value: Union[StrictFloat, StrictInt]
+ __properties: ClassVar[List[str]] = ["name", "name_localized", "name_localizations", "value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionNumberChoiceResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionNumberChoiceResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionNumberChoiceResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "value": obj.get("value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_option_string_choice.py b/dc_rest/models/application_command_option_string_choice.py
new file mode 100644
index 0000000..b4d436e
--- /dev/null
+++ b/dc_rest/models/application_command_option_string_choice.py
@@ -0,0 +1,131 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandOptionStringChoice(BaseModel):
+ """
+ ApplicationCommandOptionStringChoice
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ value: Annotated[str, Field(strict=True, max_length=6000)]
+ __properties: ClassVar[List[str]] = ["name", "name_localizations", "value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionStringChoice from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionStringChoice from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionStringChoice) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "value": obj.get("value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_option_string_choice_response.py b/dc_rest/models/application_command_option_string_choice_response.py
new file mode 100644
index 0000000..268ad7b
--- /dev/null
+++ b/dc_rest/models/application_command_option_string_choice_response.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandOptionStringChoiceResponse(BaseModel):
+ """
+ ApplicationCommandOptionStringChoiceResponse
+ """ # noqa: E501
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ value: StrictStr
+ __properties: ClassVar[List[str]] = ["name", "name_localized", "name_localizations", "value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionStringChoiceResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandOptionStringChoiceResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionStringChoiceResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "value": obj.get("value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_patch_request_partial.py b/dc_rest/models/application_command_patch_request_partial.py
new file mode 100644
index 0000000..a5309d7
--- /dev/null
+++ b/dc_rest/models/application_command_patch_request_partial.py
@@ -0,0 +1,183 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandPatchRequestPartial(BaseModel):
+ """
+ ApplicationCommandPatchRequestPartial
+ """ # noqa: E501
+ name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=32)]] = None
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ options: Optional[Annotated[List[ApplicationCommandCreateRequestOptionsInner], Field(max_length=25)]] = None
+ default_member_permissions: Optional[Annotated[int, Field(le=4503599627370495, strict=True, ge=0)]] = None
+ dm_permission: Optional[StrictBool] = None
+ contexts: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None
+ integration_types: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None
+ handler: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["name", "name_localizations", "description", "description_localizations", "options", "default_member_permissions", "dm_permission", "contexts", "integration_types", "handler"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandPatchRequestPartial from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in options (list)
+ _items = []
+ if self.options:
+ for _item_options in self.options:
+ if _item_options:
+ _items.append(_item_options.to_dict())
+ _dict['options'] = _items
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if options (nullable) is None
+ # and model_fields_set contains the field
+ if self.options is None and "options" in self.model_fields_set:
+ _dict['options'] = None
+
+ # set to None if default_member_permissions (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_member_permissions is None and "default_member_permissions" in self.model_fields_set:
+ _dict['default_member_permissions'] = None
+
+ # set to None if dm_permission (nullable) is None
+ # and model_fields_set contains the field
+ if self.dm_permission is None and "dm_permission" in self.model_fields_set:
+ _dict['dm_permission'] = None
+
+ # set to None if contexts (nullable) is None
+ # and model_fields_set contains the field
+ if self.contexts is None and "contexts" in self.model_fields_set:
+ _dict['contexts'] = None
+
+ # set to None if integration_types (nullable) is None
+ # and model_fields_set contains the field
+ if self.integration_types is None and "integration_types" in self.model_fields_set:
+ _dict['integration_types'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandPatchRequestPartial from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandPatchRequestPartial) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "options": [ApplicationCommandCreateRequestOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None,
+ "default_member_permissions": obj.get("default_member_permissions"),
+ "dm_permission": obj.get("dm_permission"),
+ "contexts": obj.get("contexts"),
+ "integration_types": obj.get("integration_types"),
+ "handler": obj.get("handler")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_permission.py b/dc_rest/models/application_command_permission.py
new file mode 100644
index 0000000..1adc23a
--- /dev/null
+++ b/dc_rest/models/application_command_permission.py
@@ -0,0 +1,138 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandPermission(BaseModel):
+ """
+ ApplicationCommandPermission
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ type: StrictInt
+ permission: StrictBool
+ __properties: ClassVar[List[str]] = ["id", "type", "permission"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandPermission from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandPermission from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandPermission) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "permission": obj.get("permission")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_response.py b/dc_rest/models/application_command_response.py
new file mode 100644
index 0000000..9dbacfd
--- /dev/null
+++ b/dc_rest/models/application_command_response.py
@@ -0,0 +1,238 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_response_options_inner import ApplicationCommandResponseOptionsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandResponse(BaseModel):
+ """
+ ApplicationCommandResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ application_id: Annotated[str, Field(strict=True)]
+ version: Annotated[str, Field(strict=True)]
+ default_member_permissions: Optional[StrictStr] = None
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None
+ dm_permission: Optional[StrictBool] = None
+ contexts: Optional[List[StrictInt]] = None
+ integration_types: Optional[List[StrictInt]] = None
+ options: Optional[List[ApplicationCommandResponseOptionsInner]] = None
+ nsfw: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["id", "application_id", "version", "default_member_permissions", "type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "guild_id", "dm_permission", "contexts", "integration_types", "options", "nsfw"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('application_id')
+ def application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('version')
+ def version_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in options (list)
+ _items = []
+ if self.options:
+ for _item_options in self.options:
+ if _item_options:
+ _items.append(_item_options.to_dict())
+ _dict['options'] = _items
+ # set to None if default_member_permissions (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_member_permissions is None and "default_member_permissions" in self.model_fields_set:
+ _dict['default_member_permissions'] = None
+
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if dm_permission (nullable) is None
+ # and model_fields_set contains the field
+ if self.dm_permission is None and "dm_permission" in self.model_fields_set:
+ _dict['dm_permission'] = None
+
+ # set to None if contexts (nullable) is None
+ # and model_fields_set contains the field
+ if self.contexts is None and "contexts" in self.model_fields_set:
+ _dict['contexts'] = None
+
+ # set to None if integration_types (nullable) is None
+ # and model_fields_set contains the field
+ if self.integration_types is None and "integration_types" in self.model_fields_set:
+ _dict['integration_types'] = None
+
+ # set to None if options (nullable) is None
+ # and model_fields_set contains the field
+ if self.options is None and "options" in self.model_fields_set:
+ _dict['options'] = None
+
+ # set to None if nsfw (nullable) is None
+ # and model_fields_set contains the field
+ if self.nsfw is None and "nsfw" in self.model_fields_set:
+ _dict['nsfw'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "application_id": obj.get("application_id"),
+ "version": obj.get("version"),
+ "default_member_permissions": obj.get("default_member_permissions"),
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "guild_id": obj.get("guild_id"),
+ "dm_permission": obj.get("dm_permission"),
+ "contexts": obj.get("contexts"),
+ "integration_types": obj.get("integration_types"),
+ "options": [ApplicationCommandResponseOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None,
+ "nsfw": obj.get("nsfw")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_response_options_inner.py b/dc_rest/models/application_command_response_options_inner.py
new file mode 100644
index 0000000..c7024a6
--- /dev/null
+++ b/dc_rest/models/application_command_response_options_inner.py
@@ -0,0 +1,297 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.application_command_attachment_option_response import ApplicationCommandAttachmentOptionResponse
+from dc_rest.models.application_command_boolean_option_response import ApplicationCommandBooleanOptionResponse
+from dc_rest.models.application_command_channel_option_response import ApplicationCommandChannelOptionResponse
+from dc_rest.models.application_command_integer_option_response import ApplicationCommandIntegerOptionResponse
+from dc_rest.models.application_command_mentionable_option_response import ApplicationCommandMentionableOptionResponse
+from dc_rest.models.application_command_number_option_response import ApplicationCommandNumberOptionResponse
+from dc_rest.models.application_command_role_option_response import ApplicationCommandRoleOptionResponse
+from dc_rest.models.application_command_string_option_response import ApplicationCommandStringOptionResponse
+from dc_rest.models.application_command_subcommand_group_option_response import ApplicationCommandSubcommandGroupOptionResponse
+from dc_rest.models.application_command_subcommand_option_response import ApplicationCommandSubcommandOptionResponse
+from dc_rest.models.application_command_user_option_response import ApplicationCommandUserOptionResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+APPLICATIONCOMMANDRESPONSEOPTIONSINNER_ONE_OF_SCHEMAS = ["ApplicationCommandAttachmentOptionResponse", "ApplicationCommandBooleanOptionResponse", "ApplicationCommandChannelOptionResponse", "ApplicationCommandIntegerOptionResponse", "ApplicationCommandMentionableOptionResponse", "ApplicationCommandNumberOptionResponse", "ApplicationCommandRoleOptionResponse", "ApplicationCommandStringOptionResponse", "ApplicationCommandSubcommandGroupOptionResponse", "ApplicationCommandSubcommandOptionResponse", "ApplicationCommandUserOptionResponse"]
+
+class ApplicationCommandResponseOptionsInner(BaseModel):
+ """
+ ApplicationCommandResponseOptionsInner
+ """
+ # data type: ApplicationCommandAttachmentOptionResponse
+ oneof_schema_1_validator: Optional[ApplicationCommandAttachmentOptionResponse] = None
+ # data type: ApplicationCommandBooleanOptionResponse
+ oneof_schema_2_validator: Optional[ApplicationCommandBooleanOptionResponse] = None
+ # data type: ApplicationCommandChannelOptionResponse
+ oneof_schema_3_validator: Optional[ApplicationCommandChannelOptionResponse] = None
+ # data type: ApplicationCommandIntegerOptionResponse
+ oneof_schema_4_validator: Optional[ApplicationCommandIntegerOptionResponse] = None
+ # data type: ApplicationCommandMentionableOptionResponse
+ oneof_schema_5_validator: Optional[ApplicationCommandMentionableOptionResponse] = None
+ # data type: ApplicationCommandNumberOptionResponse
+ oneof_schema_6_validator: Optional[ApplicationCommandNumberOptionResponse] = None
+ # data type: ApplicationCommandRoleOptionResponse
+ oneof_schema_7_validator: Optional[ApplicationCommandRoleOptionResponse] = None
+ # data type: ApplicationCommandStringOptionResponse
+ oneof_schema_8_validator: Optional[ApplicationCommandStringOptionResponse] = None
+ # data type: ApplicationCommandSubcommandGroupOptionResponse
+ oneof_schema_9_validator: Optional[ApplicationCommandSubcommandGroupOptionResponse] = None
+ # data type: ApplicationCommandSubcommandOptionResponse
+ oneof_schema_10_validator: Optional[ApplicationCommandSubcommandOptionResponse] = None
+ # data type: ApplicationCommandUserOptionResponse
+ oneof_schema_11_validator: Optional[ApplicationCommandUserOptionResponse] = None
+ actual_instance: Optional[Union[ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse]] = None
+ one_of_schemas: Set[str] = { "ApplicationCommandAttachmentOptionResponse", "ApplicationCommandBooleanOptionResponse", "ApplicationCommandChannelOptionResponse", "ApplicationCommandIntegerOptionResponse", "ApplicationCommandMentionableOptionResponse", "ApplicationCommandNumberOptionResponse", "ApplicationCommandRoleOptionResponse", "ApplicationCommandStringOptionResponse", "ApplicationCommandSubcommandGroupOptionResponse", "ApplicationCommandSubcommandOptionResponse", "ApplicationCommandUserOptionResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = ApplicationCommandResponseOptionsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ApplicationCommandAttachmentOptionResponse
+ if not isinstance(v, ApplicationCommandAttachmentOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandAttachmentOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandBooleanOptionResponse
+ if not isinstance(v, ApplicationCommandBooleanOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandBooleanOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandChannelOptionResponse
+ if not isinstance(v, ApplicationCommandChannelOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandChannelOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandIntegerOptionResponse
+ if not isinstance(v, ApplicationCommandIntegerOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandIntegerOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandMentionableOptionResponse
+ if not isinstance(v, ApplicationCommandMentionableOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandMentionableOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandNumberOptionResponse
+ if not isinstance(v, ApplicationCommandNumberOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandNumberOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandRoleOptionResponse
+ if not isinstance(v, ApplicationCommandRoleOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandRoleOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandStringOptionResponse
+ if not isinstance(v, ApplicationCommandStringOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandStringOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandSubcommandGroupOptionResponse
+ if not isinstance(v, ApplicationCommandSubcommandGroupOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandSubcommandGroupOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandSubcommandOptionResponse
+ if not isinstance(v, ApplicationCommandSubcommandOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandSubcommandOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandUserOptionResponse
+ if not isinstance(v, ApplicationCommandUserOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandUserOptionResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ApplicationCommandResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ApplicationCommandResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ApplicationCommandAttachmentOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandAttachmentOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandBooleanOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandBooleanOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandChannelOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandChannelOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandIntegerOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandIntegerOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandMentionableOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandMentionableOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandNumberOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandNumberOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandRoleOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandRoleOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandStringOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandStringOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandSubcommandGroupOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandSubcommandGroupOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandSubcommandOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandSubcommandOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandUserOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandUserOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ApplicationCommandResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ApplicationCommandResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/application_command_role_option.py b/dc_rest/models/application_command_role_option.py
new file mode 100644
index 0000000..4bbc41e
--- /dev/null
+++ b/dc_rest/models/application_command_role_option.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandRoleOption(BaseModel):
+ """
+ ApplicationCommandRoleOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandRoleOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandRoleOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandRoleOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_role_option_response.py b/dc_rest/models/application_command_role_option_response.py
new file mode 100644
index 0000000..188b4d4
--- /dev/null
+++ b/dc_rest/models/application_command_role_option_response.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandRoleOptionResponse(BaseModel):
+ """
+ ApplicationCommandRoleOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandRoleOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandRoleOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandRoleOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_string_option.py b/dc_rest/models/application_command_string_option.py
new file mode 100644
index 0000000..3036472
--- /dev/null
+++ b/dc_rest/models/application_command_string_option.py
@@ -0,0 +1,178 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_option_string_choice import ApplicationCommandOptionStringChoice
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandStringOption(BaseModel):
+ """
+ ApplicationCommandStringOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ autocomplete: Optional[StrictBool] = None
+ min_length: Optional[Annotated[int, Field(le=6000, strict=True, ge=0)]] = None
+ max_length: Optional[Annotated[int, Field(le=6000, strict=True, ge=1)]] = None
+ choices: Optional[Annotated[List[ApplicationCommandOptionStringChoice], Field(max_length=25)]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "autocomplete", "min_length", "max_length", "choices"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandStringOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in choices (list)
+ _items = []
+ if self.choices:
+ for _item_choices in self.choices:
+ if _item_choices:
+ _items.append(_item_choices.to_dict())
+ _dict['choices'] = _items
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if autocomplete (nullable) is None
+ # and model_fields_set contains the field
+ if self.autocomplete is None and "autocomplete" in self.model_fields_set:
+ _dict['autocomplete'] = None
+
+ # set to None if min_length (nullable) is None
+ # and model_fields_set contains the field
+ if self.min_length is None and "min_length" in self.model_fields_set:
+ _dict['min_length'] = None
+
+ # set to None if max_length (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_length is None and "max_length" in self.model_fields_set:
+ _dict['max_length'] = None
+
+ # set to None if choices (nullable) is None
+ # and model_fields_set contains the field
+ if self.choices is None and "choices" in self.model_fields_set:
+ _dict['choices'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandStringOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandStringOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "autocomplete": obj.get("autocomplete"),
+ "min_length": obj.get("min_length"),
+ "max_length": obj.get("max_length"),
+ "choices": [ApplicationCommandOptionStringChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_string_option_response.py b/dc_rest/models/application_command_string_option_response.py
new file mode 100644
index 0000000..268f582
--- /dev/null
+++ b/dc_rest/models/application_command_string_option_response.py
@@ -0,0 +1,191 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.application_command_option_string_choice_response import ApplicationCommandOptionStringChoiceResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandStringOptionResponse(BaseModel):
+ """
+ ApplicationCommandStringOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ autocomplete: Optional[StrictBool] = None
+ choices: Optional[List[ApplicationCommandOptionStringChoiceResponse]] = None
+ min_length: Optional[StrictInt] = None
+ max_length: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "autocomplete", "choices", "min_length", "max_length"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandStringOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in choices (list)
+ _items = []
+ if self.choices:
+ for _item_choices in self.choices:
+ if _item_choices:
+ _items.append(_item_choices.to_dict())
+ _dict['choices'] = _items
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if autocomplete (nullable) is None
+ # and model_fields_set contains the field
+ if self.autocomplete is None and "autocomplete" in self.model_fields_set:
+ _dict['autocomplete'] = None
+
+ # set to None if choices (nullable) is None
+ # and model_fields_set contains the field
+ if self.choices is None and "choices" in self.model_fields_set:
+ _dict['choices'] = None
+
+ # set to None if min_length (nullable) is None
+ # and model_fields_set contains the field
+ if self.min_length is None and "min_length" in self.model_fields_set:
+ _dict['min_length'] = None
+
+ # set to None if max_length (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_length is None and "max_length" in self.model_fields_set:
+ _dict['max_length'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandStringOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandStringOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "autocomplete": obj.get("autocomplete"),
+ "choices": [ApplicationCommandOptionStringChoiceResponse.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None,
+ "min_length": obj.get("min_length"),
+ "max_length": obj.get("max_length")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_subcommand_group_option.py b/dc_rest/models/application_command_subcommand_group_option.py
new file mode 100644
index 0000000..730de4f
--- /dev/null
+++ b/dc_rest/models/application_command_subcommand_group_option.py
@@ -0,0 +1,157 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_subcommand_option import ApplicationCommandSubcommandOption
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandSubcommandGroupOption(BaseModel):
+ """
+ ApplicationCommandSubcommandGroupOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ options: Optional[Annotated[List[ApplicationCommandSubcommandOption], Field(max_length=25)]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "options"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandSubcommandGroupOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in options (list)
+ _items = []
+ if self.options:
+ for _item_options in self.options:
+ if _item_options:
+ _items.append(_item_options.to_dict())
+ _dict['options'] = _items
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if options (nullable) is None
+ # and model_fields_set contains the field
+ if self.options is None and "options" in self.model_fields_set:
+ _dict['options'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandSubcommandGroupOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandSubcommandGroupOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "options": [ApplicationCommandSubcommandOption.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_subcommand_group_option_response.py b/dc_rest/models/application_command_subcommand_group_option_response.py
new file mode 100644
index 0000000..6394eca
--- /dev/null
+++ b/dc_rest/models/application_command_subcommand_group_option_response.py
@@ -0,0 +1,170 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.application_command_subcommand_option_response import ApplicationCommandSubcommandOptionResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandSubcommandGroupOptionResponse(BaseModel):
+ """
+ ApplicationCommandSubcommandGroupOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ options: Optional[List[ApplicationCommandSubcommandOptionResponse]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "options"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandSubcommandGroupOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in options (list)
+ _items = []
+ if self.options:
+ for _item_options in self.options:
+ if _item_options:
+ _items.append(_item_options.to_dict())
+ _dict['options'] = _items
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if options (nullable) is None
+ # and model_fields_set contains the field
+ if self.options is None and "options" in self.model_fields_set:
+ _dict['options'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandSubcommandGroupOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandSubcommandGroupOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "options": [ApplicationCommandSubcommandOptionResponse.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_subcommand_option.py b/dc_rest/models/application_command_subcommand_option.py
new file mode 100644
index 0000000..6a923c1
--- /dev/null
+++ b/dc_rest/models/application_command_subcommand_option.py
@@ -0,0 +1,157 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_subcommand_option_options_inner import ApplicationCommandSubcommandOptionOptionsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandSubcommandOption(BaseModel):
+ """
+ ApplicationCommandSubcommandOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ options: Optional[Annotated[List[ApplicationCommandSubcommandOptionOptionsInner], Field(max_length=25)]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "options"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandSubcommandOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in options (list)
+ _items = []
+ if self.options:
+ for _item_options in self.options:
+ if _item_options:
+ _items.append(_item_options.to_dict())
+ _dict['options'] = _items
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if options (nullable) is None
+ # and model_fields_set contains the field
+ if self.options is None and "options" in self.model_fields_set:
+ _dict['options'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandSubcommandOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandSubcommandOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "options": [ApplicationCommandSubcommandOptionOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_subcommand_option_options_inner.py b/dc_rest/models/application_command_subcommand_option_options_inner.py
new file mode 100644
index 0000000..81a9593
--- /dev/null
+++ b/dc_rest/models/application_command_subcommand_option_options_inner.py
@@ -0,0 +1,269 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.application_command_attachment_option import ApplicationCommandAttachmentOption
+from dc_rest.models.application_command_boolean_option import ApplicationCommandBooleanOption
+from dc_rest.models.application_command_channel_option import ApplicationCommandChannelOption
+from dc_rest.models.application_command_integer_option import ApplicationCommandIntegerOption
+from dc_rest.models.application_command_mentionable_option import ApplicationCommandMentionableOption
+from dc_rest.models.application_command_number_option import ApplicationCommandNumberOption
+from dc_rest.models.application_command_role_option import ApplicationCommandRoleOption
+from dc_rest.models.application_command_string_option import ApplicationCommandStringOption
+from dc_rest.models.application_command_user_option import ApplicationCommandUserOption
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+APPLICATIONCOMMANDSUBCOMMANDOPTIONOPTIONSINNER_ONE_OF_SCHEMAS = ["ApplicationCommandAttachmentOption", "ApplicationCommandBooleanOption", "ApplicationCommandChannelOption", "ApplicationCommandIntegerOption", "ApplicationCommandMentionableOption", "ApplicationCommandNumberOption", "ApplicationCommandRoleOption", "ApplicationCommandStringOption", "ApplicationCommandUserOption"]
+
+class ApplicationCommandSubcommandOptionOptionsInner(BaseModel):
+ """
+ ApplicationCommandSubcommandOptionOptionsInner
+ """
+ # data type: ApplicationCommandAttachmentOption
+ oneof_schema_1_validator: Optional[ApplicationCommandAttachmentOption] = None
+ # data type: ApplicationCommandBooleanOption
+ oneof_schema_2_validator: Optional[ApplicationCommandBooleanOption] = None
+ # data type: ApplicationCommandChannelOption
+ oneof_schema_3_validator: Optional[ApplicationCommandChannelOption] = None
+ # data type: ApplicationCommandIntegerOption
+ oneof_schema_4_validator: Optional[ApplicationCommandIntegerOption] = None
+ # data type: ApplicationCommandMentionableOption
+ oneof_schema_5_validator: Optional[ApplicationCommandMentionableOption] = None
+ # data type: ApplicationCommandNumberOption
+ oneof_schema_6_validator: Optional[ApplicationCommandNumberOption] = None
+ # data type: ApplicationCommandRoleOption
+ oneof_schema_7_validator: Optional[ApplicationCommandRoleOption] = None
+ # data type: ApplicationCommandStringOption
+ oneof_schema_8_validator: Optional[ApplicationCommandStringOption] = None
+ # data type: ApplicationCommandUserOption
+ oneof_schema_9_validator: Optional[ApplicationCommandUserOption] = None
+ actual_instance: Optional[Union[ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption]] = None
+ one_of_schemas: Set[str] = { "ApplicationCommandAttachmentOption", "ApplicationCommandBooleanOption", "ApplicationCommandChannelOption", "ApplicationCommandIntegerOption", "ApplicationCommandMentionableOption", "ApplicationCommandNumberOption", "ApplicationCommandRoleOption", "ApplicationCommandStringOption", "ApplicationCommandUserOption" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = ApplicationCommandSubcommandOptionOptionsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ApplicationCommandAttachmentOption
+ if not isinstance(v, ApplicationCommandAttachmentOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandAttachmentOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandBooleanOption
+ if not isinstance(v, ApplicationCommandBooleanOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandBooleanOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandChannelOption
+ if not isinstance(v, ApplicationCommandChannelOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandChannelOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandIntegerOption
+ if not isinstance(v, ApplicationCommandIntegerOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandIntegerOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandMentionableOption
+ if not isinstance(v, ApplicationCommandMentionableOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandMentionableOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandNumberOption
+ if not isinstance(v, ApplicationCommandNumberOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandNumberOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandRoleOption
+ if not isinstance(v, ApplicationCommandRoleOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandRoleOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandStringOption
+ if not isinstance(v, ApplicationCommandStringOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandStringOption`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandUserOption
+ if not isinstance(v, ApplicationCommandUserOption):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandUserOption`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ApplicationCommandSubcommandOptionOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ApplicationCommandSubcommandOptionOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ApplicationCommandAttachmentOption
+ try:
+ instance.actual_instance = ApplicationCommandAttachmentOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandBooleanOption
+ try:
+ instance.actual_instance = ApplicationCommandBooleanOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandChannelOption
+ try:
+ instance.actual_instance = ApplicationCommandChannelOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandIntegerOption
+ try:
+ instance.actual_instance = ApplicationCommandIntegerOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandMentionableOption
+ try:
+ instance.actual_instance = ApplicationCommandMentionableOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandNumberOption
+ try:
+ instance.actual_instance = ApplicationCommandNumberOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandRoleOption
+ try:
+ instance.actual_instance = ApplicationCommandRoleOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandStringOption
+ try:
+ instance.actual_instance = ApplicationCommandStringOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandUserOption
+ try:
+ instance.actual_instance = ApplicationCommandUserOption.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ApplicationCommandSubcommandOptionOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ApplicationCommandSubcommandOptionOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/application_command_subcommand_option_response.py b/dc_rest/models/application_command_subcommand_option_response.py
new file mode 100644
index 0000000..ad40c6b
--- /dev/null
+++ b/dc_rest/models/application_command_subcommand_option_response.py
@@ -0,0 +1,170 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.application_command_subcommand_option_response_options_inner import ApplicationCommandSubcommandOptionResponseOptionsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandSubcommandOptionResponse(BaseModel):
+ """
+ ApplicationCommandSubcommandOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ options: Optional[List[ApplicationCommandSubcommandOptionResponseOptionsInner]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "options"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandSubcommandOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in options (list)
+ _items = []
+ if self.options:
+ for _item_options in self.options:
+ if _item_options:
+ _items.append(_item_options.to_dict())
+ _dict['options'] = _items
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ # set to None if options (nullable) is None
+ # and model_fields_set contains the field
+ if self.options is None and "options" in self.model_fields_set:
+ _dict['options'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandSubcommandOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandSubcommandOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required"),
+ "options": [ApplicationCommandSubcommandOptionResponseOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_subcommand_option_response_options_inner.py b/dc_rest/models/application_command_subcommand_option_response_options_inner.py
new file mode 100644
index 0000000..a05eedd
--- /dev/null
+++ b/dc_rest/models/application_command_subcommand_option_response_options_inner.py
@@ -0,0 +1,269 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.application_command_attachment_option_response import ApplicationCommandAttachmentOptionResponse
+from dc_rest.models.application_command_boolean_option_response import ApplicationCommandBooleanOptionResponse
+from dc_rest.models.application_command_channel_option_response import ApplicationCommandChannelOptionResponse
+from dc_rest.models.application_command_integer_option_response import ApplicationCommandIntegerOptionResponse
+from dc_rest.models.application_command_mentionable_option_response import ApplicationCommandMentionableOptionResponse
+from dc_rest.models.application_command_number_option_response import ApplicationCommandNumberOptionResponse
+from dc_rest.models.application_command_role_option_response import ApplicationCommandRoleOptionResponse
+from dc_rest.models.application_command_string_option_response import ApplicationCommandStringOptionResponse
+from dc_rest.models.application_command_user_option_response import ApplicationCommandUserOptionResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+APPLICATIONCOMMANDSUBCOMMANDOPTIONRESPONSEOPTIONSINNER_ONE_OF_SCHEMAS = ["ApplicationCommandAttachmentOptionResponse", "ApplicationCommandBooleanOptionResponse", "ApplicationCommandChannelOptionResponse", "ApplicationCommandIntegerOptionResponse", "ApplicationCommandMentionableOptionResponse", "ApplicationCommandNumberOptionResponse", "ApplicationCommandRoleOptionResponse", "ApplicationCommandStringOptionResponse", "ApplicationCommandUserOptionResponse"]
+
+class ApplicationCommandSubcommandOptionResponseOptionsInner(BaseModel):
+ """
+ ApplicationCommandSubcommandOptionResponseOptionsInner
+ """
+ # data type: ApplicationCommandAttachmentOptionResponse
+ oneof_schema_1_validator: Optional[ApplicationCommandAttachmentOptionResponse] = None
+ # data type: ApplicationCommandBooleanOptionResponse
+ oneof_schema_2_validator: Optional[ApplicationCommandBooleanOptionResponse] = None
+ # data type: ApplicationCommandChannelOptionResponse
+ oneof_schema_3_validator: Optional[ApplicationCommandChannelOptionResponse] = None
+ # data type: ApplicationCommandIntegerOptionResponse
+ oneof_schema_4_validator: Optional[ApplicationCommandIntegerOptionResponse] = None
+ # data type: ApplicationCommandMentionableOptionResponse
+ oneof_schema_5_validator: Optional[ApplicationCommandMentionableOptionResponse] = None
+ # data type: ApplicationCommandNumberOptionResponse
+ oneof_schema_6_validator: Optional[ApplicationCommandNumberOptionResponse] = None
+ # data type: ApplicationCommandRoleOptionResponse
+ oneof_schema_7_validator: Optional[ApplicationCommandRoleOptionResponse] = None
+ # data type: ApplicationCommandStringOptionResponse
+ oneof_schema_8_validator: Optional[ApplicationCommandStringOptionResponse] = None
+ # data type: ApplicationCommandUserOptionResponse
+ oneof_schema_9_validator: Optional[ApplicationCommandUserOptionResponse] = None
+ actual_instance: Optional[Union[ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse]] = None
+ one_of_schemas: Set[str] = { "ApplicationCommandAttachmentOptionResponse", "ApplicationCommandBooleanOptionResponse", "ApplicationCommandChannelOptionResponse", "ApplicationCommandIntegerOptionResponse", "ApplicationCommandMentionableOptionResponse", "ApplicationCommandNumberOptionResponse", "ApplicationCommandRoleOptionResponse", "ApplicationCommandStringOptionResponse", "ApplicationCommandUserOptionResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = ApplicationCommandSubcommandOptionResponseOptionsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ApplicationCommandAttachmentOptionResponse
+ if not isinstance(v, ApplicationCommandAttachmentOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandAttachmentOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandBooleanOptionResponse
+ if not isinstance(v, ApplicationCommandBooleanOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandBooleanOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandChannelOptionResponse
+ if not isinstance(v, ApplicationCommandChannelOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandChannelOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandIntegerOptionResponse
+ if not isinstance(v, ApplicationCommandIntegerOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandIntegerOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandMentionableOptionResponse
+ if not isinstance(v, ApplicationCommandMentionableOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandMentionableOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandNumberOptionResponse
+ if not isinstance(v, ApplicationCommandNumberOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandNumberOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandRoleOptionResponse
+ if not isinstance(v, ApplicationCommandRoleOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandRoleOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandStringOptionResponse
+ if not isinstance(v, ApplicationCommandStringOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandStringOptionResponse`")
+ else:
+ match += 1
+ # validate data type: ApplicationCommandUserOptionResponse
+ if not isinstance(v, ApplicationCommandUserOptionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandUserOptionResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ApplicationCommandSubcommandOptionResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ApplicationCommandSubcommandOptionResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ApplicationCommandAttachmentOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandAttachmentOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandBooleanOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandBooleanOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandChannelOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandChannelOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandIntegerOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandIntegerOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandMentionableOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandMentionableOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandNumberOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandNumberOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandRoleOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandRoleOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandStringOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandStringOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ApplicationCommandUserOptionResponse
+ try:
+ instance.actual_instance = ApplicationCommandUserOptionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ApplicationCommandSubcommandOptionResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ApplicationCommandSubcommandOptionResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/application_command_update_request.py b/dc_rest/models/application_command_update_request.py
new file mode 100644
index 0000000..9710654
--- /dev/null
+++ b/dc_rest/models/application_command_update_request.py
@@ -0,0 +1,197 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandUpdateRequest(BaseModel):
+ """
+ ApplicationCommandUpdateRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ options: Optional[Annotated[List[ApplicationCommandCreateRequestOptionsInner], Field(max_length=25)]] = None
+ default_member_permissions: Optional[Annotated[int, Field(le=4503599627370495, strict=True, ge=0)]] = None
+ dm_permission: Optional[StrictBool] = None
+ contexts: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None
+ integration_types: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None
+ handler: Optional[StrictInt] = None
+ type: Optional[StrictInt] = None
+ id: Optional[Annotated[str, Field(strict=True)]] = None
+ __properties: ClassVar[List[str]] = ["name", "name_localizations", "description", "description_localizations", "options", "default_member_permissions", "dm_permission", "contexts", "integration_types", "handler", "type", "id"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandUpdateRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in options (list)
+ _items = []
+ if self.options:
+ for _item_options in self.options:
+ if _item_options:
+ _items.append(_item_options.to_dict())
+ _dict['options'] = _items
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if options (nullable) is None
+ # and model_fields_set contains the field
+ if self.options is None and "options" in self.model_fields_set:
+ _dict['options'] = None
+
+ # set to None if default_member_permissions (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_member_permissions is None and "default_member_permissions" in self.model_fields_set:
+ _dict['default_member_permissions'] = None
+
+ # set to None if dm_permission (nullable) is None
+ # and model_fields_set contains the field
+ if self.dm_permission is None and "dm_permission" in self.model_fields_set:
+ _dict['dm_permission'] = None
+
+ # set to None if contexts (nullable) is None
+ # and model_fields_set contains the field
+ if self.contexts is None and "contexts" in self.model_fields_set:
+ _dict['contexts'] = None
+
+ # set to None if integration_types (nullable) is None
+ # and model_fields_set contains the field
+ if self.integration_types is None and "integration_types" in self.model_fields_set:
+ _dict['integration_types'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandUpdateRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandUpdateRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "options": [ApplicationCommandCreateRequestOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None,
+ "default_member_permissions": obj.get("default_member_permissions"),
+ "dm_permission": obj.get("dm_permission"),
+ "contexts": obj.get("contexts"),
+ "integration_types": obj.get("integration_types"),
+ "handler": obj.get("handler"),
+ "type": obj.get("type"),
+ "id": obj.get("id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_user_option.py b/dc_rest/models/application_command_user_option.py
new file mode 100644
index 0000000..d5a06a5
--- /dev/null
+++ b/dc_rest/models/application_command_user_option.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandUserOption(BaseModel):
+ """
+ ApplicationCommandUserOption
+ """ # noqa: E501
+ type: StrictInt
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=32)]
+ name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None
+ required: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandUserOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandUserOption from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandUserOption) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_command_user_option_response.py b/dc_rest/models/application_command_user_option_response.py
new file mode 100644
index 0000000..14c5fe4
--- /dev/null
+++ b/dc_rest/models/application_command_user_option_response.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationCommandUserOptionResponse(BaseModel):
+ """
+ ApplicationCommandUserOptionResponse
+ """ # noqa: E501
+ type: StrictInt
+ name: StrictStr
+ name_localized: Optional[StrictStr] = None
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localized: Optional[StrictStr] = None
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ required: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationCommandUserOptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.name_localized is None and "name_localized" in self.model_fields_set:
+ _dict['name_localized'] = None
+
+ # set to None if description_localized (nullable) is None
+ # and model_fields_set contains the field
+ if self.description_localized is None and "description_localized" in self.model_fields_set:
+ _dict['description_localized'] = None
+
+ # set to None if required (nullable) is None
+ # and model_fields_set contains the field
+ if self.required is None and "required" in self.model_fields_set:
+ _dict['required'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationCommandUserOptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationCommandUserOptionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "name_localized": obj.get("name_localized"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localized": obj.get("description_localized"),
+ "description_localizations": obj.get("description_localizations"),
+ "required": obj.get("required")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_form_partial.py b/dc_rest/models/application_form_partial.py
new file mode 100644
index 0000000..619cc30
--- /dev/null
+++ b/dc_rest/models/application_form_partial.py
@@ -0,0 +1,234 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_form_partial_description import ApplicationFormPartialDescription
+from dc_rest.models.application_form_partial_integration_types_config_value import ApplicationFormPartialIntegrationTypesConfigValue
+from dc_rest.models.application_o_auth2_install_params import ApplicationOAuth2InstallParams
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationFormPartial(BaseModel):
+ """
+ ApplicationFormPartial
+ """ # noqa: E501
+ description: Optional[ApplicationFormPartialDescription] = None
+ icon: Optional[StrictStr] = None
+ cover_image: Optional[StrictStr] = None
+ team_id: Optional[Annotated[str, Field(strict=True)]] = None
+ flags: Optional[StrictInt] = None
+ interactions_endpoint_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None
+ explicit_content_filter: Optional[StrictInt] = None
+ max_participants: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None
+ type: Optional[StrictInt] = None
+ tags: Optional[Annotated[List[Annotated[str, Field(strict=True, max_length=20)]], Field(max_length=5)]] = None
+ custom_install_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None
+ install_params: Optional[ApplicationOAuth2InstallParams] = None
+ role_connections_verification_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None
+ integration_types_config: Optional[Dict[str, Optional[ApplicationFormPartialIntegrationTypesConfigValue]]] = None
+ __properties: ClassVar[List[str]] = ["description", "icon", "cover_image", "team_id", "flags", "interactions_endpoint_url", "explicit_content_filter", "max_participants", "type", "tags", "custom_install_url", "install_params", "role_connections_verification_url", "integration_types_config"]
+
+ @field_validator('team_id')
+ def team_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationFormPartial from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of description
+ if self.description:
+ _dict['description'] = self.description.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of install_params
+ if self.install_params:
+ _dict['install_params'] = self.install_params.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each value in integration_types_config (dict)
+ _field_dict = {}
+ if self.integration_types_config:
+ for _key_integration_types_config in self.integration_types_config:
+ if self.integration_types_config[_key_integration_types_config]:
+ _field_dict[_key_integration_types_config] = self.integration_types_config[_key_integration_types_config].to_dict()
+ _dict['integration_types_config'] = _field_dict
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if cover_image (nullable) is None
+ # and model_fields_set contains the field
+ if self.cover_image is None and "cover_image" in self.model_fields_set:
+ _dict['cover_image'] = None
+
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ # set to None if interactions_endpoint_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.interactions_endpoint_url is None and "interactions_endpoint_url" in self.model_fields_set:
+ _dict['interactions_endpoint_url'] = None
+
+ # set to None if max_participants (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_participants is None and "max_participants" in self.model_fields_set:
+ _dict['max_participants'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.tags is None and "tags" in self.model_fields_set:
+ _dict['tags'] = None
+
+ # set to None if custom_install_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_install_url is None and "custom_install_url" in self.model_fields_set:
+ _dict['custom_install_url'] = None
+
+ # set to None if install_params (nullable) is None
+ # and model_fields_set contains the field
+ if self.install_params is None and "install_params" in self.model_fields_set:
+ _dict['install_params'] = None
+
+ # set to None if role_connections_verification_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.role_connections_verification_url is None and "role_connections_verification_url" in self.model_fields_set:
+ _dict['role_connections_verification_url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationFormPartial from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationFormPartial) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "description": ApplicationFormPartialDescription.from_dict(obj["description"]) if obj.get("description") is not None else None,
+ "icon": obj.get("icon"),
+ "cover_image": obj.get("cover_image"),
+ "team_id": obj.get("team_id"),
+ "flags": obj.get("flags"),
+ "interactions_endpoint_url": obj.get("interactions_endpoint_url"),
+ "explicit_content_filter": obj.get("explicit_content_filter"),
+ "max_participants": obj.get("max_participants"),
+ "type": obj.get("type"),
+ "tags": obj.get("tags"),
+ "custom_install_url": obj.get("custom_install_url"),
+ "install_params": ApplicationOAuth2InstallParams.from_dict(obj["install_params"]) if obj.get("install_params") is not None else None,
+ "role_connections_verification_url": obj.get("role_connections_verification_url"),
+ "integration_types_config": dict(
+ (_k, ApplicationFormPartialIntegrationTypesConfigValue.from_dict(_v))
+ for _k, _v in obj["integration_types_config"].items()
+ )
+ if obj.get("integration_types_config") is not None
+ else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_form_partial_description.py b/dc_rest/models/application_form_partial_description.py
new file mode 100644
index 0000000..3071c96
--- /dev/null
+++ b/dc_rest/models/application_form_partial_description.py
@@ -0,0 +1,129 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationFormPartialDescription(BaseModel):
+ """
+ ApplicationFormPartialDescription
+ """ # noqa: E501
+ default: Annotated[str, Field(strict=True, max_length=400)]
+ localizations: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=400)]]] = None
+ __properties: ClassVar[List[str]] = ["default", "localizations"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationFormPartialDescription from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationFormPartialDescription from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationFormPartialDescription) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "default": obj.get("default"),
+ "localizations": obj.get("localizations")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_form_partial_integration_types_config_value.py b/dc_rest/models/application_form_partial_integration_types_config_value.py
new file mode 100644
index 0000000..10c1eeb
--- /dev/null
+++ b/dc_rest/models/application_form_partial_integration_types_config_value.py
@@ -0,0 +1,163 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.application_integration_type_configuration import ApplicationIntegrationTypeConfiguration
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+APPLICATIONFORMPARTIALINTEGRATIONTYPESCONFIGVALUE_ONE_OF_SCHEMAS = ["ApplicationIntegrationTypeConfiguration"]
+
+class ApplicationFormPartialIntegrationTypesConfigValue(BaseModel):
+ """
+ ApplicationFormPartialIntegrationTypesConfigValue
+ """
+ # data type: ApplicationIntegrationTypeConfiguration
+ oneof_schema_1_validator: Optional[ApplicationIntegrationTypeConfiguration] = None
+ actual_instance: Optional[Union[ApplicationIntegrationTypeConfiguration]] = None
+ one_of_schemas: Set[str] = { "ApplicationIntegrationTypeConfiguration" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ if v is None:
+ return v
+
+ instance = ApplicationFormPartialIntegrationTypesConfigValue.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ApplicationIntegrationTypeConfiguration
+ if not isinstance(v, ApplicationIntegrationTypeConfiguration):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationIntegrationTypeConfiguration`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ApplicationFormPartialIntegrationTypesConfigValue with oneOf schemas: ApplicationIntegrationTypeConfiguration. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ApplicationFormPartialIntegrationTypesConfigValue with oneOf schemas: ApplicationIntegrationTypeConfiguration. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: Optional[str]) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ if json_str is None:
+ return instance
+
+ error_messages = []
+ match = 0
+
+ # deserialize data into ApplicationIntegrationTypeConfiguration
+ try:
+ instance.actual_instance = ApplicationIntegrationTypeConfiguration.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ApplicationFormPartialIntegrationTypesConfigValue with oneOf schemas: ApplicationIntegrationTypeConfiguration. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ApplicationFormPartialIntegrationTypesConfigValue with oneOf schemas: ApplicationIntegrationTypeConfiguration. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationIntegrationTypeConfiguration]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/application_incoming_webhook_response.py b/dc_rest/models/application_incoming_webhook_response.py
new file mode 100644
index 0000000..18b5708
--- /dev/null
+++ b/dc_rest/models/application_incoming_webhook_response.py
@@ -0,0 +1,192 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationIncomingWebhookResponse(BaseModel):
+ """
+ ApplicationIncomingWebhookResponse
+ """ # noqa: E501
+ application_id: Optional[Annotated[str, Field(strict=True)]] = None
+ avatar: Optional[StrictStr] = None
+ channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ type: StrictInt
+ user: Optional[UserResponse] = None
+ __properties: ClassVar[List[str]] = ["application_id", "avatar", "channel_id", "guild_id", "id", "name", "type", "user"]
+
+ @field_validator('application_id')
+ def application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationIncomingWebhookResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if avatar (nullable) is None
+ # and model_fields_set contains the field
+ if self.avatar is None and "avatar" in self.model_fields_set:
+ _dict['avatar'] = None
+
+ # set to None if user (nullable) is None
+ # and model_fields_set contains the field
+ if self.user is None and "user" in self.model_fields_set:
+ _dict['user'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationIncomingWebhookResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationIncomingWebhookResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "application_id": obj.get("application_id"),
+ "avatar": obj.get("avatar"),
+ "channel_id": obj.get("channel_id"),
+ "guild_id": obj.get("guild_id"),
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "type": obj.get("type"),
+ "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_integration_type_configuration.py b/dc_rest/models/application_integration_type_configuration.py
new file mode 100644
index 0000000..d974030
--- /dev/null
+++ b/dc_rest/models/application_integration_type_configuration.py
@@ -0,0 +1,135 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.application_o_auth2_install_params import ApplicationOAuth2InstallParams
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationIntegrationTypeConfiguration(BaseModel):
+ """
+ ApplicationIntegrationTypeConfiguration
+ """ # noqa: E501
+ oauth2_install_params: Optional[ApplicationOAuth2InstallParams] = None
+ __properties: ClassVar[List[str]] = ["oauth2_install_params"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationIntegrationTypeConfiguration from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of oauth2_install_params
+ if self.oauth2_install_params:
+ _dict['oauth2_install_params'] = self.oauth2_install_params.to_dict()
+ # set to None if oauth2_install_params (nullable) is None
+ # and model_fields_set contains the field
+ if self.oauth2_install_params is None and "oauth2_install_params" in self.model_fields_set:
+ _dict['oauth2_install_params'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationIntegrationTypeConfiguration from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationIntegrationTypeConfiguration) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "oauth2_install_params": ApplicationOAuth2InstallParams.from_dict(obj["oauth2_install_params"]) if obj.get("oauth2_install_params") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_integration_type_configuration_response.py b/dc_rest/models/application_integration_type_configuration_response.py
new file mode 100644
index 0000000..f36ab26
--- /dev/null
+++ b/dc_rest/models/application_integration_type_configuration_response.py
@@ -0,0 +1,135 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationIntegrationTypeConfigurationResponse(BaseModel):
+ """
+ ApplicationIntegrationTypeConfigurationResponse
+ """ # noqa: E501
+ oauth2_install_params: Optional[ApplicationOAuth2InstallParamsResponse] = None
+ __properties: ClassVar[List[str]] = ["oauth2_install_params"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationIntegrationTypeConfigurationResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of oauth2_install_params
+ if self.oauth2_install_params:
+ _dict['oauth2_install_params'] = self.oauth2_install_params.to_dict()
+ # set to None if oauth2_install_params (nullable) is None
+ # and model_fields_set contains the field
+ if self.oauth2_install_params is None and "oauth2_install_params" in self.model_fields_set:
+ _dict['oauth2_install_params'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationIntegrationTypeConfigurationResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationIntegrationTypeConfigurationResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "oauth2_install_params": ApplicationOAuth2InstallParamsResponse.from_dict(obj["oauth2_install_params"]) if obj.get("oauth2_install_params") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_o_auth2_install_params.py b/dc_rest/models/application_o_auth2_install_params.py
new file mode 100644
index 0000000..e220166
--- /dev/null
+++ b/dc_rest/models/application_o_auth2_install_params.py
@@ -0,0 +1,139 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationOAuth2InstallParams(BaseModel):
+ """
+ ApplicationOAuth2InstallParams
+ """ # noqa: E501
+ scopes: Optional[Annotated[List[StrictStr], Field(min_length=1)]] = None
+ permissions: Optional[Annotated[int, Field(le=4503599627370495, strict=True, ge=0)]] = None
+ __properties: ClassVar[List[str]] = ["scopes", "permissions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationOAuth2InstallParams from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if scopes (nullable) is None
+ # and model_fields_set contains the field
+ if self.scopes is None and "scopes" in self.model_fields_set:
+ _dict['scopes'] = None
+
+ # set to None if permissions (nullable) is None
+ # and model_fields_set contains the field
+ if self.permissions is None and "permissions" in self.model_fields_set:
+ _dict['permissions'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationOAuth2InstallParams from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationOAuth2InstallParams) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "scopes": obj.get("scopes"),
+ "permissions": obj.get("permissions")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_o_auth2_install_params_response.py b/dc_rest/models/application_o_auth2_install_params_response.py
new file mode 100644
index 0000000..8e8c45b
--- /dev/null
+++ b/dc_rest/models/application_o_auth2_install_params_response.py
@@ -0,0 +1,128 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationOAuth2InstallParamsResponse(BaseModel):
+ """
+ ApplicationOAuth2InstallParamsResponse
+ """ # noqa: E501
+ scopes: List[StrictStr]
+ permissions: StrictStr
+ __properties: ClassVar[List[str]] = ["scopes", "permissions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationOAuth2InstallParamsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationOAuth2InstallParamsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationOAuth2InstallParamsResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "scopes": obj.get("scopes"),
+ "permissions": obj.get("permissions")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_response.py b/dc_rest/models/application_response.py
new file mode 100644
index 0000000..d0a9b00
--- /dev/null
+++ b/dc_rest/models/application_response.py
@@ -0,0 +1,287 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse
+from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationResponse(BaseModel):
+ """
+ ApplicationResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ icon: Optional[StrictStr] = None
+ description: StrictStr
+ type: Optional[StrictInt] = None
+ cover_image: Optional[StrictStr] = None
+ primary_sku_id: Optional[Annotated[str, Field(strict=True)]] = None
+ bot: Optional[UserResponse] = None
+ slug: Optional[StrictStr] = None
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None
+ rpc_origins: Optional[List[Optional[StrictStr]]] = None
+ bot_public: Optional[StrictBool] = None
+ bot_require_code_grant: Optional[StrictBool] = None
+ terms_of_service_url: Optional[StrictStr] = None
+ privacy_policy_url: Optional[StrictStr] = None
+ custom_install_url: Optional[StrictStr] = None
+ install_params: Optional[ApplicationOAuth2InstallParamsResponse] = None
+ integration_types_config: Optional[Dict[str, ApplicationIntegrationTypeConfigurationResponse]] = None
+ verify_key: StrictStr
+ flags: StrictInt
+ max_participants: Optional[StrictInt] = None
+ tags: Optional[List[StrictStr]] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "type", "cover_image", "primary_sku_id", "bot", "slug", "guild_id", "rpc_origins", "bot_public", "bot_require_code_grant", "terms_of_service_url", "privacy_policy_url", "custom_install_url", "install_params", "integration_types_config", "verify_key", "flags", "max_participants", "tags"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('primary_sku_id')
+ def primary_sku_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of bot
+ if self.bot:
+ _dict['bot'] = self.bot.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of install_params
+ if self.install_params:
+ _dict['install_params'] = self.install_params.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each value in integration_types_config (dict)
+ _field_dict = {}
+ if self.integration_types_config:
+ for _key_integration_types_config in self.integration_types_config:
+ if self.integration_types_config[_key_integration_types_config]:
+ _field_dict[_key_integration_types_config] = self.integration_types_config[_key_integration_types_config].to_dict()
+ _dict['integration_types_config'] = _field_dict
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if cover_image (nullable) is None
+ # and model_fields_set contains the field
+ if self.cover_image is None and "cover_image" in self.model_fields_set:
+ _dict['cover_image'] = None
+
+ # set to None if bot (nullable) is None
+ # and model_fields_set contains the field
+ if self.bot is None and "bot" in self.model_fields_set:
+ _dict['bot'] = None
+
+ # set to None if slug (nullable) is None
+ # and model_fields_set contains the field
+ if self.slug is None and "slug" in self.model_fields_set:
+ _dict['slug'] = None
+
+ # set to None if rpc_origins (nullable) is None
+ # and model_fields_set contains the field
+ if self.rpc_origins is None and "rpc_origins" in self.model_fields_set:
+ _dict['rpc_origins'] = None
+
+ # set to None if bot_public (nullable) is None
+ # and model_fields_set contains the field
+ if self.bot_public is None and "bot_public" in self.model_fields_set:
+ _dict['bot_public'] = None
+
+ # set to None if bot_require_code_grant (nullable) is None
+ # and model_fields_set contains the field
+ if self.bot_require_code_grant is None and "bot_require_code_grant" in self.model_fields_set:
+ _dict['bot_require_code_grant'] = None
+
+ # set to None if terms_of_service_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.terms_of_service_url is None and "terms_of_service_url" in self.model_fields_set:
+ _dict['terms_of_service_url'] = None
+
+ # set to None if privacy_policy_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set:
+ _dict['privacy_policy_url'] = None
+
+ # set to None if custom_install_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_install_url is None and "custom_install_url" in self.model_fields_set:
+ _dict['custom_install_url'] = None
+
+ # set to None if install_params (nullable) is None
+ # and model_fields_set contains the field
+ if self.install_params is None and "install_params" in self.model_fields_set:
+ _dict['install_params'] = None
+
+ # set to None if max_participants (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_participants is None and "max_participants" in self.model_fields_set:
+ _dict['max_participants'] = None
+
+ # set to None if tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.tags is None and "tags" in self.model_fields_set:
+ _dict['tags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "icon": obj.get("icon"),
+ "description": obj.get("description"),
+ "type": obj.get("type"),
+ "cover_image": obj.get("cover_image"),
+ "primary_sku_id": obj.get("primary_sku_id"),
+ "bot": UserResponse.from_dict(obj["bot"]) if obj.get("bot") is not None else None,
+ "slug": obj.get("slug"),
+ "guild_id": obj.get("guild_id"),
+ "rpc_origins": obj.get("rpc_origins"),
+ "bot_public": obj.get("bot_public"),
+ "bot_require_code_grant": obj.get("bot_require_code_grant"),
+ "terms_of_service_url": obj.get("terms_of_service_url"),
+ "privacy_policy_url": obj.get("privacy_policy_url"),
+ "custom_install_url": obj.get("custom_install_url"),
+ "install_params": ApplicationOAuth2InstallParamsResponse.from_dict(obj["install_params"]) if obj.get("install_params") is not None else None,
+ "integration_types_config": dict(
+ (_k, ApplicationIntegrationTypeConfigurationResponse.from_dict(_v))
+ for _k, _v in obj["integration_types_config"].items()
+ )
+ if obj.get("integration_types_config") is not None
+ else None,
+ "verify_key": obj.get("verify_key"),
+ "flags": obj.get("flags"),
+ "max_participants": obj.get("max_participants"),
+ "tags": obj.get("tags")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_role_connections_metadata_item_request.py b/dc_rest/models/application_role_connections_metadata_item_request.py
new file mode 100644
index 0000000..55009ba
--- /dev/null
+++ b/dc_rest/models/application_role_connections_metadata_item_request.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationRoleConnectionsMetadataItemRequest(BaseModel):
+ """
+ ApplicationRoleConnectionsMetadataItemRequest
+ """ # noqa: E501
+ type: StrictInt
+ key: Annotated[str, Field(min_length=1, strict=True, max_length=50)]
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ name_localizations: Optional[Dict[str, Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]]]] = None
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=200)]
+ description_localizations: Optional[Dict[str, Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]]]] = None
+ __properties: ClassVar[List[str]] = ["type", "key", "name", "name_localizations", "description", "description_localizations"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationRoleConnectionsMetadataItemRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationRoleConnectionsMetadataItemRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationRoleConnectionsMetadataItemRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "key": obj.get("key"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_role_connections_metadata_item_response.py b/dc_rest/models/application_role_connections_metadata_item_response.py
new file mode 100644
index 0000000..f7ef945
--- /dev/null
+++ b/dc_rest/models/application_role_connections_metadata_item_response.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationRoleConnectionsMetadataItemResponse(BaseModel):
+ """
+ ApplicationRoleConnectionsMetadataItemResponse
+ """ # noqa: E501
+ type: StrictInt
+ key: StrictStr
+ name: StrictStr
+ name_localizations: Optional[Dict[str, StrictStr]] = None
+ description: StrictStr
+ description_localizations: Optional[Dict[str, StrictStr]] = None
+ __properties: ClassVar[List[str]] = ["type", "key", "name", "name_localizations", "description", "description_localizations"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationRoleConnectionsMetadataItemResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationRoleConnectionsMetadataItemResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationRoleConnectionsMetadataItemResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "key": obj.get("key"),
+ "name": obj.get("name"),
+ "name_localizations": obj.get("name_localizations"),
+ "description": obj.get("description"),
+ "description_localizations": obj.get("description_localizations")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/application_user_role_connection_response.py b/dc_rest/models/application_user_role_connection_response.py
new file mode 100644
index 0000000..2b5f2f7
--- /dev/null
+++ b/dc_rest/models/application_user_role_connection_response.py
@@ -0,0 +1,140 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ApplicationUserRoleConnectionResponse(BaseModel):
+ """
+ ApplicationUserRoleConnectionResponse
+ """ # noqa: E501
+ platform_name: Optional[StrictStr] = None
+ platform_username: Optional[StrictStr] = None
+ metadata: Optional[Dict[str, StrictStr]] = None
+ __properties: ClassVar[List[str]] = ["platform_name", "platform_username", "metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ApplicationUserRoleConnectionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if platform_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.platform_name is None and "platform_name" in self.model_fields_set:
+ _dict['platform_name'] = None
+
+ # set to None if platform_username (nullable) is None
+ # and model_fields_set contains the field
+ if self.platform_username is None and "platform_username" in self.model_fields_set:
+ _dict['platform_username'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ApplicationUserRoleConnectionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ApplicationUserRoleConnectionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "platform_name": obj.get("platform_name"),
+ "platform_username": obj.get("platform_username"),
+ "metadata": obj.get("metadata")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/attachment_response.py b/dc_rest/models/attachment_response.py
new file mode 100644
index 0000000..d9dd7fa
--- /dev/null
+++ b/dc_rest/models/attachment_response.py
@@ -0,0 +1,232 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing_extensions import Annotated
+from dc_rest.models.application_response import ApplicationResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AttachmentResponse(BaseModel):
+ """
+ AttachmentResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ filename: StrictStr
+ size: StrictInt
+ url: StrictStr
+ proxy_url: StrictStr
+ width: Optional[StrictInt] = None
+ height: Optional[StrictInt] = None
+ duration_secs: Optional[Union[StrictFloat, StrictInt]] = None
+ waveform: Optional[StrictStr] = None
+ description: Optional[StrictStr] = None
+ content_type: Optional[StrictStr] = None
+ ephemeral: Optional[StrictBool] = None
+ title: Optional[StrictStr] = None
+ application: Optional[ApplicationResponse] = None
+ clip_created_at: Optional[datetime] = None
+ clip_participants: Optional[List[UserResponse]] = None
+ __properties: ClassVar[List[str]] = ["id", "filename", "size", "url", "proxy_url", "width", "height", "duration_secs", "waveform", "description", "content_type", "ephemeral", "title", "application", "clip_created_at", "clip_participants"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AttachmentResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of application
+ if self.application:
+ _dict['application'] = self.application.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in clip_participants (list)
+ _items = []
+ if self.clip_participants:
+ for _item_clip_participants in self.clip_participants:
+ if _item_clip_participants:
+ _items.append(_item_clip_participants.to_dict())
+ _dict['clip_participants'] = _items
+ # set to None if width (nullable) is None
+ # and model_fields_set contains the field
+ if self.width is None and "width" in self.model_fields_set:
+ _dict['width'] = None
+
+ # set to None if height (nullable) is None
+ # and model_fields_set contains the field
+ if self.height is None and "height" in self.model_fields_set:
+ _dict['height'] = None
+
+ # set to None if duration_secs (nullable) is None
+ # and model_fields_set contains the field
+ if self.duration_secs is None and "duration_secs" in self.model_fields_set:
+ _dict['duration_secs'] = None
+
+ # set to None if waveform (nullable) is None
+ # and model_fields_set contains the field
+ if self.waveform is None and "waveform" in self.model_fields_set:
+ _dict['waveform'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if content_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.content_type is None and "content_type" in self.model_fields_set:
+ _dict['content_type'] = None
+
+ # set to None if ephemeral (nullable) is None
+ # and model_fields_set contains the field
+ if self.ephemeral is None and "ephemeral" in self.model_fields_set:
+ _dict['ephemeral'] = None
+
+ # set to None if title (nullable) is None
+ # and model_fields_set contains the field
+ if self.title is None and "title" in self.model_fields_set:
+ _dict['title'] = None
+
+ # set to None if application (nullable) is None
+ # and model_fields_set contains the field
+ if self.application is None and "application" in self.model_fields_set:
+ _dict['application'] = None
+
+ # set to None if clip_created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.clip_created_at is None and "clip_created_at" in self.model_fields_set:
+ _dict['clip_created_at'] = None
+
+ # set to None if clip_participants (nullable) is None
+ # and model_fields_set contains the field
+ if self.clip_participants is None and "clip_participants" in self.model_fields_set:
+ _dict['clip_participants'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AttachmentResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in AttachmentResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "filename": obj.get("filename"),
+ "size": obj.get("size"),
+ "url": obj.get("url"),
+ "proxy_url": obj.get("proxy_url"),
+ "width": obj.get("width"),
+ "height": obj.get("height"),
+ "duration_secs": obj.get("duration_secs"),
+ "waveform": obj.get("waveform"),
+ "description": obj.get("description"),
+ "content_type": obj.get("content_type"),
+ "ephemeral": obj.get("ephemeral"),
+ "title": obj.get("title"),
+ "application": ApplicationResponse.from_dict(obj["application"]) if obj.get("application") is not None else None,
+ "clip_created_at": obj.get("clip_created_at"),
+ "clip_participants": [UserResponse.from_dict(_item) for _item in obj["clip_participants"]] if obj.get("clip_participants") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/audit_log_entry_response.py b/dc_rest/models/audit_log_entry_response.py
new file mode 100644
index 0000000..41df868
--- /dev/null
+++ b/dc_rest/models/audit_log_entry_response.py
@@ -0,0 +1,189 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.audit_log_object_change_response import AuditLogObjectChangeResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AuditLogEntryResponse(BaseModel):
+ """
+ AuditLogEntryResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ action_type: Optional[StrictInt]
+ user_id: Optional[Annotated[str, Field(strict=True)]] = None
+ target_id: Optional[Annotated[str, Field(strict=True)]] = None
+ changes: Optional[List[AuditLogObjectChangeResponse]] = None
+ options: Optional[Dict[str, StrictStr]] = None
+ reason: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["id", "action_type", "user_id", "target_id", "changes", "options", "reason"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('user_id')
+ def user_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('target_id')
+ def target_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AuditLogEntryResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in changes (list)
+ _items = []
+ if self.changes:
+ for _item_changes in self.changes:
+ if _item_changes:
+ _items.append(_item_changes.to_dict())
+ _dict['changes'] = _items
+ # set to None if action_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.action_type is None and "action_type" in self.model_fields_set:
+ _dict['action_type'] = None
+
+ # set to None if changes (nullable) is None
+ # and model_fields_set contains the field
+ if self.changes is None and "changes" in self.model_fields_set:
+ _dict['changes'] = None
+
+ # set to None if reason (nullable) is None
+ # and model_fields_set contains the field
+ if self.reason is None and "reason" in self.model_fields_set:
+ _dict['reason'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AuditLogEntryResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in AuditLogEntryResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "action_type": obj.get("action_type"),
+ "user_id": obj.get("user_id"),
+ "target_id": obj.get("target_id"),
+ "changes": [AuditLogObjectChangeResponse.from_dict(_item) for _item in obj["changes"]] if obj.get("changes") is not None else None,
+ "options": obj.get("options"),
+ "reason": obj.get("reason")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/audit_log_object_change_response.py b/dc_rest/models/audit_log_object_change_response.py
new file mode 100644
index 0000000..be51857
--- /dev/null
+++ b/dc_rest/models/audit_log_object_change_response.py
@@ -0,0 +1,145 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AuditLogObjectChangeResponse(BaseModel):
+ """
+ AuditLogObjectChangeResponse
+ """ # noqa: E501
+ key: Optional[StrictStr] = None
+ new_value: Optional[Any] = None
+ old_value: Optional[Any] = None
+ __properties: ClassVar[List[str]] = ["key", "new_value", "old_value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AuditLogObjectChangeResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if key (nullable) is None
+ # and model_fields_set contains the field
+ if self.key is None and "key" in self.model_fields_set:
+ _dict['key'] = None
+
+ # set to None if new_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.new_value is None and "new_value" in self.model_fields_set:
+ _dict['new_value'] = None
+
+ # set to None if old_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.old_value is None and "old_value" in self.model_fields_set:
+ _dict['old_value'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AuditLogObjectChangeResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in AuditLogObjectChangeResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "key": obj.get("key"),
+ "new_value": obj.get("new_value"),
+ "old_value": obj.get("old_value")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/ban_user_from_guild_request.py b/dc_rest/models/ban_user_from_guild_request.py
new file mode 100644
index 0000000..081e3df
--- /dev/null
+++ b/dc_rest/models/ban_user_from_guild_request.py
@@ -0,0 +1,139 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BanUserFromGuildRequest(BaseModel):
+ """
+ BanUserFromGuildRequest
+ """ # noqa: E501
+ delete_message_seconds: Optional[Annotated[int, Field(le=604800, strict=True, ge=0)]] = None
+ delete_message_days: Optional[Annotated[int, Field(le=7, strict=True, ge=0)]] = None
+ __properties: ClassVar[List[str]] = ["delete_message_seconds", "delete_message_days"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BanUserFromGuildRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if delete_message_seconds (nullable) is None
+ # and model_fields_set contains the field
+ if self.delete_message_seconds is None and "delete_message_seconds" in self.model_fields_set:
+ _dict['delete_message_seconds'] = None
+
+ # set to None if delete_message_days (nullable) is None
+ # and model_fields_set contains the field
+ if self.delete_message_days is None and "delete_message_days" in self.model_fields_set:
+ _dict['delete_message_days'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BanUserFromGuildRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BanUserFromGuildRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "delete_message_seconds": obj.get("delete_message_seconds"),
+ "delete_message_days": obj.get("delete_message_days")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/base_create_message_create_request.py b/dc_rest/models/base_create_message_create_request.py
new file mode 100644
index 0000000..af652d6
--- /dev/null
+++ b/dc_rest/models/base_create_message_create_request.py
@@ -0,0 +1,215 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner
+from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest
+from dc_rest.models.message_attachment_request import MessageAttachmentRequest
+from dc_rest.models.poll_create_request import PollCreateRequest
+from dc_rest.models.rich_embed import RichEmbed
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BaseCreateMessageCreateRequest(BaseModel):
+ """
+ BaseCreateMessageCreateRequest
+ """ # noqa: E501
+ content: Optional[Annotated[str, Field(strict=True, max_length=4000)]] = None
+ embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None
+ allowed_mentions: Optional[MessageAllowedMentionsRequest] = None
+ sticker_ids: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = None
+ components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None
+ flags: Optional[StrictInt] = None
+ attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None
+ poll: Optional[PollCreateRequest] = None
+ confetti_potion: Optional[Dict[str, Any]] = None
+ __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "sticker_ids", "components", "flags", "attachments", "poll", "confetti_potion"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BaseCreateMessageCreateRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in embeds (list)
+ _items = []
+ if self.embeds:
+ for _item_embeds in self.embeds:
+ if _item_embeds:
+ _items.append(_item_embeds.to_dict())
+ _dict['embeds'] = _items
+ # override the default output from pydantic by calling `to_dict()` of allowed_mentions
+ if self.allowed_mentions:
+ _dict['allowed_mentions'] = self.allowed_mentions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in attachments (list)
+ _items = []
+ if self.attachments:
+ for _item_attachments in self.attachments:
+ if _item_attachments:
+ _items.append(_item_attachments.to_dict())
+ _dict['attachments'] = _items
+ # override the default output from pydantic by calling `to_dict()` of poll
+ if self.poll:
+ _dict['poll'] = self.poll.to_dict()
+ # set to None if content (nullable) is None
+ # and model_fields_set contains the field
+ if self.content is None and "content" in self.model_fields_set:
+ _dict['content'] = None
+
+ # set to None if embeds (nullable) is None
+ # and model_fields_set contains the field
+ if self.embeds is None and "embeds" in self.model_fields_set:
+ _dict['embeds'] = None
+
+ # set to None if allowed_mentions (nullable) is None
+ # and model_fields_set contains the field
+ if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set:
+ _dict['allowed_mentions'] = None
+
+ # set to None if sticker_ids (nullable) is None
+ # and model_fields_set contains the field
+ if self.sticker_ids is None and "sticker_ids" in self.model_fields_set:
+ _dict['sticker_ids'] = None
+
+ # set to None if components (nullable) is None
+ # and model_fields_set contains the field
+ if self.components is None and "components" in self.model_fields_set:
+ _dict['components'] = None
+
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ # set to None if attachments (nullable) is None
+ # and model_fields_set contains the field
+ if self.attachments is None and "attachments" in self.model_fields_set:
+ _dict['attachments'] = None
+
+ # set to None if poll (nullable) is None
+ # and model_fields_set contains the field
+ if self.poll is None and "poll" in self.model_fields_set:
+ _dict['poll'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BaseCreateMessageCreateRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BaseCreateMessageCreateRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "content": obj.get("content"),
+ "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None,
+ "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None,
+ "sticker_ids": obj.get("sticker_ids"),
+ "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None,
+ "flags": obj.get("flags"),
+ "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None,
+ "poll": PollCreateRequest.from_dict(obj["poll"]) if obj.get("poll") is not None else None,
+ "confetti_potion": obj.get("confetti_potion")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/base_create_message_create_request_components_inner.py b/dc_rest/models/base_create_message_create_request_components_inner.py
new file mode 100644
index 0000000..83aad18
--- /dev/null
+++ b/dc_rest/models/base_create_message_create_request_components_inner.py
@@ -0,0 +1,241 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.action_row_component_for_message_request import ActionRowComponentForMessageRequest
+from dc_rest.models.container_component_for_message_request import ContainerComponentForMessageRequest
+from dc_rest.models.file_component_for_message_request import FileComponentForMessageRequest
+from dc_rest.models.media_gallery_component_for_message_request import MediaGalleryComponentForMessageRequest
+from dc_rest.models.section_component_for_message_request import SectionComponentForMessageRequest
+from dc_rest.models.separator_component_for_message_request import SeparatorComponentForMessageRequest
+from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+BASECREATEMESSAGECREATEREQUESTCOMPONENTSINNER_ONE_OF_SCHEMAS = ["ActionRowComponentForMessageRequest", "ContainerComponentForMessageRequest", "FileComponentForMessageRequest", "MediaGalleryComponentForMessageRequest", "SectionComponentForMessageRequest", "SeparatorComponentForMessageRequest", "TextDisplayComponentForMessageRequest"]
+
+class BaseCreateMessageCreateRequestComponentsInner(BaseModel):
+ """
+ BaseCreateMessageCreateRequestComponentsInner
+ """
+ # data type: ActionRowComponentForMessageRequest
+ oneof_schema_1_validator: Optional[ActionRowComponentForMessageRequest] = None
+ # data type: ContainerComponentForMessageRequest
+ oneof_schema_2_validator: Optional[ContainerComponentForMessageRequest] = None
+ # data type: FileComponentForMessageRequest
+ oneof_schema_3_validator: Optional[FileComponentForMessageRequest] = None
+ # data type: MediaGalleryComponentForMessageRequest
+ oneof_schema_4_validator: Optional[MediaGalleryComponentForMessageRequest] = None
+ # data type: SectionComponentForMessageRequest
+ oneof_schema_5_validator: Optional[SectionComponentForMessageRequest] = None
+ # data type: SeparatorComponentForMessageRequest
+ oneof_schema_6_validator: Optional[SeparatorComponentForMessageRequest] = None
+ # data type: TextDisplayComponentForMessageRequest
+ oneof_schema_7_validator: Optional[TextDisplayComponentForMessageRequest] = None
+ actual_instance: Optional[Union[ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest]] = None
+ one_of_schemas: Set[str] = { "ActionRowComponentForMessageRequest", "ContainerComponentForMessageRequest", "FileComponentForMessageRequest", "MediaGalleryComponentForMessageRequest", "SectionComponentForMessageRequest", "SeparatorComponentForMessageRequest", "TextDisplayComponentForMessageRequest" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = BaseCreateMessageCreateRequestComponentsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ActionRowComponentForMessageRequest
+ if not isinstance(v, ActionRowComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ActionRowComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: ContainerComponentForMessageRequest
+ if not isinstance(v, ContainerComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ContainerComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: FileComponentForMessageRequest
+ if not isinstance(v, FileComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `FileComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: MediaGalleryComponentForMessageRequest
+ if not isinstance(v, MediaGalleryComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MediaGalleryComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: SectionComponentForMessageRequest
+ if not isinstance(v, SectionComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SectionComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: SeparatorComponentForMessageRequest
+ if not isinstance(v, SeparatorComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SeparatorComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: TextDisplayComponentForMessageRequest
+ if not isinstance(v, TextDisplayComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `TextDisplayComponentForMessageRequest`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in BaseCreateMessageCreateRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in BaseCreateMessageCreateRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ActionRowComponentForMessageRequest
+ try:
+ instance.actual_instance = ActionRowComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ContainerComponentForMessageRequest
+ try:
+ instance.actual_instance = ContainerComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into FileComponentForMessageRequest
+ try:
+ instance.actual_instance = FileComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MediaGalleryComponentForMessageRequest
+ try:
+ instance.actual_instance = MediaGalleryComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SectionComponentForMessageRequest
+ try:
+ instance.actual_instance = SectionComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SeparatorComponentForMessageRequest
+ try:
+ instance.actual_instance = SeparatorComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into TextDisplayComponentForMessageRequest
+ try:
+ instance.actual_instance = TextDisplayComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into BaseCreateMessageCreateRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into BaseCreateMessageCreateRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/basic_application_response.py b/dc_rest/models/basic_application_response.py
new file mode 100644
index 0000000..e311648
--- /dev/null
+++ b/dc_rest/models/basic_application_response.py
@@ -0,0 +1,182 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BasicApplicationResponse(BaseModel):
+ """
+ BasicApplicationResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ icon: Optional[StrictStr] = None
+ description: StrictStr
+ type: Optional[StrictInt] = None
+ cover_image: Optional[StrictStr] = None
+ primary_sku_id: Optional[Annotated[str, Field(strict=True)]] = None
+ bot: Optional[UserResponse] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "type", "cover_image", "primary_sku_id", "bot"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('primary_sku_id')
+ def primary_sku_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BasicApplicationResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of bot
+ if self.bot:
+ _dict['bot'] = self.bot.to_dict()
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if cover_image (nullable) is None
+ # and model_fields_set contains the field
+ if self.cover_image is None and "cover_image" in self.model_fields_set:
+ _dict['cover_image'] = None
+
+ # set to None if bot (nullable) is None
+ # and model_fields_set contains the field
+ if self.bot is None and "bot" in self.model_fields_set:
+ _dict['bot'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BasicApplicationResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BasicApplicationResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "icon": obj.get("icon"),
+ "description": obj.get("description"),
+ "type": obj.get("type"),
+ "cover_image": obj.get("cover_image"),
+ "primary_sku_id": obj.get("primary_sku_id"),
+ "bot": UserResponse.from_dict(obj["bot"]) if obj.get("bot") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/basic_message_response.py b/dc_rest/models/basic_message_response.py
new file mode 100644
index 0000000..a2f9999
--- /dev/null
+++ b/dc_rest/models/basic_message_response.py
@@ -0,0 +1,426 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.basic_application_response import BasicApplicationResponse
+from dc_rest.models.basic_message_response_components_inner import BasicMessageResponseComponentsInner
+from dc_rest.models.basic_message_response_interaction_metadata import BasicMessageResponseInteractionMetadata
+from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce
+from dc_rest.models.get_sticker200_response import GetSticker200Response
+from dc_rest.models.message_attachment_response import MessageAttachmentResponse
+from dc_rest.models.message_call_response import MessageCallResponse
+from dc_rest.models.message_embed_response import MessageEmbedResponse
+from dc_rest.models.message_interaction_response import MessageInteractionResponse
+from dc_rest.models.message_mention_channel_response import MessageMentionChannelResponse
+from dc_rest.models.message_reference_response import MessageReferenceResponse
+from dc_rest.models.message_role_subscription_data_response import MessageRoleSubscriptionDataResponse
+from dc_rest.models.message_snapshot_response import MessageSnapshotResponse
+from dc_rest.models.message_sticker_item_response import MessageStickerItemResponse
+from dc_rest.models.poll_response import PollResponse
+from dc_rest.models.purchase_notification_response import PurchaseNotificationResponse
+from dc_rest.models.resolved_objects_response import ResolvedObjectsResponse
+from dc_rest.models.thread_response import ThreadResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BasicMessageResponse(BaseModel):
+ """
+ BasicMessageResponse
+ """ # noqa: E501
+ type: StrictInt
+ content: StrictStr
+ mentions: List[UserResponse]
+ mention_roles: List[Annotated[str, Field(strict=True)]]
+ attachments: List[MessageAttachmentResponse]
+ embeds: List[MessageEmbedResponse]
+ timestamp: datetime
+ edited_timestamp: Optional[datetime] = None
+ flags: StrictInt
+ components: List[BasicMessageResponseComponentsInner]
+ resolved: Optional[ResolvedObjectsResponse] = None
+ stickers: Optional[List[GetSticker200Response]] = None
+ sticker_items: Optional[List[MessageStickerItemResponse]] = None
+ id: Annotated[str, Field(strict=True)]
+ channel_id: Annotated[str, Field(strict=True)]
+ author: UserResponse
+ pinned: StrictBool
+ mention_everyone: StrictBool
+ tts: StrictBool
+ call: Optional[MessageCallResponse] = None
+ activity: Optional[Dict[str, Any]] = None
+ application: Optional[BasicApplicationResponse] = None
+ application_id: Optional[Annotated[str, Field(strict=True)]] = None
+ interaction: Optional[MessageInteractionResponse] = None
+ nonce: Optional[BasicMessageResponseNonce] = None
+ webhook_id: Optional[Annotated[str, Field(strict=True)]] = None
+ message_reference: Optional[MessageReferenceResponse] = None
+ thread: Optional[ThreadResponse] = None
+ mention_channels: Optional[List[Optional[MessageMentionChannelResponse]]] = None
+ role_subscription_data: Optional[MessageRoleSubscriptionDataResponse] = None
+ purchase_notification: Optional[PurchaseNotificationResponse] = None
+ position: Optional[StrictInt] = None
+ poll: Optional[PollResponse] = None
+ interaction_metadata: Optional[BasicMessageResponseInteractionMetadata] = None
+ message_snapshots: Optional[List[MessageSnapshotResponse]] = None
+ __properties: ClassVar[List[str]] = ["type", "content", "mentions", "mention_roles", "attachments", "embeds", "timestamp", "edited_timestamp", "flags", "components", "resolved", "stickers", "sticker_items", "id", "channel_id", "author", "pinned", "mention_everyone", "tts", "call", "activity", "application", "application_id", "interaction", "nonce", "webhook_id", "message_reference", "thread", "mention_channels", "role_subscription_data", "purchase_notification", "position", "poll", "interaction_metadata", "message_snapshots"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('application_id')
+ def application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('webhook_id')
+ def webhook_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BasicMessageResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in mentions (list)
+ _items = []
+ if self.mentions:
+ for _item_mentions in self.mentions:
+ if _item_mentions:
+ _items.append(_item_mentions.to_dict())
+ _dict['mentions'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in attachments (list)
+ _items = []
+ if self.attachments:
+ for _item_attachments in self.attachments:
+ if _item_attachments:
+ _items.append(_item_attachments.to_dict())
+ _dict['attachments'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in embeds (list)
+ _items = []
+ if self.embeds:
+ for _item_embeds in self.embeds:
+ if _item_embeds:
+ _items.append(_item_embeds.to_dict())
+ _dict['embeds'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ # override the default output from pydantic by calling `to_dict()` of resolved
+ if self.resolved:
+ _dict['resolved'] = self.resolved.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in stickers (list)
+ _items = []
+ if self.stickers:
+ for _item_stickers in self.stickers:
+ if _item_stickers:
+ _items.append(_item_stickers.to_dict())
+ _dict['stickers'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in sticker_items (list)
+ _items = []
+ if self.sticker_items:
+ for _item_sticker_items in self.sticker_items:
+ if _item_sticker_items:
+ _items.append(_item_sticker_items.to_dict())
+ _dict['sticker_items'] = _items
+ # override the default output from pydantic by calling `to_dict()` of author
+ if self.author:
+ _dict['author'] = self.author.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of call
+ if self.call:
+ _dict['call'] = self.call.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of application
+ if self.application:
+ _dict['application'] = self.application.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of interaction
+ if self.interaction:
+ _dict['interaction'] = self.interaction.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of nonce
+ if self.nonce:
+ _dict['nonce'] = self.nonce.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of message_reference
+ if self.message_reference:
+ _dict['message_reference'] = self.message_reference.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of thread
+ if self.thread:
+ _dict['thread'] = self.thread.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in mention_channels (list)
+ _items = []
+ if self.mention_channels:
+ for _item_mention_channels in self.mention_channels:
+ if _item_mention_channels:
+ _items.append(_item_mention_channels.to_dict())
+ _dict['mention_channels'] = _items
+ # override the default output from pydantic by calling `to_dict()` of role_subscription_data
+ if self.role_subscription_data:
+ _dict['role_subscription_data'] = self.role_subscription_data.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of purchase_notification
+ if self.purchase_notification:
+ _dict['purchase_notification'] = self.purchase_notification.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of poll
+ if self.poll:
+ _dict['poll'] = self.poll.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of interaction_metadata
+ if self.interaction_metadata:
+ _dict['interaction_metadata'] = self.interaction_metadata.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in message_snapshots (list)
+ _items = []
+ if self.message_snapshots:
+ for _item_message_snapshots in self.message_snapshots:
+ if _item_message_snapshots:
+ _items.append(_item_message_snapshots.to_dict())
+ _dict['message_snapshots'] = _items
+ # set to None if edited_timestamp (nullable) is None
+ # and model_fields_set contains the field
+ if self.edited_timestamp is None and "edited_timestamp" in self.model_fields_set:
+ _dict['edited_timestamp'] = None
+
+ # set to None if resolved (nullable) is None
+ # and model_fields_set contains the field
+ if self.resolved is None and "resolved" in self.model_fields_set:
+ _dict['resolved'] = None
+
+ # set to None if stickers (nullable) is None
+ # and model_fields_set contains the field
+ if self.stickers is None and "stickers" in self.model_fields_set:
+ _dict['stickers'] = None
+
+ # set to None if sticker_items (nullable) is None
+ # and model_fields_set contains the field
+ if self.sticker_items is None and "sticker_items" in self.model_fields_set:
+ _dict['sticker_items'] = None
+
+ # set to None if call (nullable) is None
+ # and model_fields_set contains the field
+ if self.call is None and "call" in self.model_fields_set:
+ _dict['call'] = None
+
+ # set to None if application (nullable) is None
+ # and model_fields_set contains the field
+ if self.application is None and "application" in self.model_fields_set:
+ _dict['application'] = None
+
+ # set to None if interaction (nullable) is None
+ # and model_fields_set contains the field
+ if self.interaction is None and "interaction" in self.model_fields_set:
+ _dict['interaction'] = None
+
+ # set to None if nonce (nullable) is None
+ # and model_fields_set contains the field
+ if self.nonce is None and "nonce" in self.model_fields_set:
+ _dict['nonce'] = None
+
+ # set to None if message_reference (nullable) is None
+ # and model_fields_set contains the field
+ if self.message_reference is None and "message_reference" in self.model_fields_set:
+ _dict['message_reference'] = None
+
+ # set to None if thread (nullable) is None
+ # and model_fields_set contains the field
+ if self.thread is None and "thread" in self.model_fields_set:
+ _dict['thread'] = None
+
+ # set to None if mention_channels (nullable) is None
+ # and model_fields_set contains the field
+ if self.mention_channels is None and "mention_channels" in self.model_fields_set:
+ _dict['mention_channels'] = None
+
+ # set to None if role_subscription_data (nullable) is None
+ # and model_fields_set contains the field
+ if self.role_subscription_data is None and "role_subscription_data" in self.model_fields_set:
+ _dict['role_subscription_data'] = None
+
+ # set to None if purchase_notification (nullable) is None
+ # and model_fields_set contains the field
+ if self.purchase_notification is None and "purchase_notification" in self.model_fields_set:
+ _dict['purchase_notification'] = None
+
+ # set to None if position (nullable) is None
+ # and model_fields_set contains the field
+ if self.position is None and "position" in self.model_fields_set:
+ _dict['position'] = None
+
+ # set to None if poll (nullable) is None
+ # and model_fields_set contains the field
+ if self.poll is None and "poll" in self.model_fields_set:
+ _dict['poll'] = None
+
+ # set to None if interaction_metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.interaction_metadata is None and "interaction_metadata" in self.model_fields_set:
+ _dict['interaction_metadata'] = None
+
+ # set to None if message_snapshots (nullable) is None
+ # and model_fields_set contains the field
+ if self.message_snapshots is None and "message_snapshots" in self.model_fields_set:
+ _dict['message_snapshots'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BasicMessageResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BasicMessageResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "content": obj.get("content"),
+ "mentions": [UserResponse.from_dict(_item) for _item in obj["mentions"]] if obj.get("mentions") is not None else None,
+ "mention_roles": obj.get("mention_roles"),
+ "attachments": [MessageAttachmentResponse.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None,
+ "embeds": [MessageEmbedResponse.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None,
+ "timestamp": obj.get("timestamp"),
+ "edited_timestamp": obj.get("edited_timestamp"),
+ "flags": obj.get("flags"),
+ "components": [BasicMessageResponseComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None,
+ "resolved": ResolvedObjectsResponse.from_dict(obj["resolved"]) if obj.get("resolved") is not None else None,
+ "stickers": [GetSticker200Response.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None,
+ "sticker_items": [MessageStickerItemResponse.from_dict(_item) for _item in obj["sticker_items"]] if obj.get("sticker_items") is not None else None,
+ "id": obj.get("id"),
+ "channel_id": obj.get("channel_id"),
+ "author": UserResponse.from_dict(obj["author"]) if obj.get("author") is not None else None,
+ "pinned": obj.get("pinned"),
+ "mention_everyone": obj.get("mention_everyone"),
+ "tts": obj.get("tts"),
+ "call": MessageCallResponse.from_dict(obj["call"]) if obj.get("call") is not None else None,
+ "activity": obj.get("activity"),
+ "application": BasicApplicationResponse.from_dict(obj["application"]) if obj.get("application") is not None else None,
+ "application_id": obj.get("application_id"),
+ "interaction": MessageInteractionResponse.from_dict(obj["interaction"]) if obj.get("interaction") is not None else None,
+ "nonce": BasicMessageResponseNonce.from_dict(obj["nonce"]) if obj.get("nonce") is not None else None,
+ "webhook_id": obj.get("webhook_id"),
+ "message_reference": MessageReferenceResponse.from_dict(obj["message_reference"]) if obj.get("message_reference") is not None else None,
+ "thread": ThreadResponse.from_dict(obj["thread"]) if obj.get("thread") is not None else None,
+ "mention_channels": [MessageMentionChannelResponse.from_dict(_item) for _item in obj["mention_channels"]] if obj.get("mention_channels") is not None else None,
+ "role_subscription_data": MessageRoleSubscriptionDataResponse.from_dict(obj["role_subscription_data"]) if obj.get("role_subscription_data") is not None else None,
+ "purchase_notification": PurchaseNotificationResponse.from_dict(obj["purchase_notification"]) if obj.get("purchase_notification") is not None else None,
+ "position": obj.get("position"),
+ "poll": PollResponse.from_dict(obj["poll"]) if obj.get("poll") is not None else None,
+ "interaction_metadata": BasicMessageResponseInteractionMetadata.from_dict(obj["interaction_metadata"]) if obj.get("interaction_metadata") is not None else None,
+ "message_snapshots": [MessageSnapshotResponse.from_dict(_item) for _item in obj["message_snapshots"]] if obj.get("message_snapshots") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/basic_message_response_components_inner.py b/dc_rest/models/basic_message_response_components_inner.py
new file mode 100644
index 0000000..aeeba0d
--- /dev/null
+++ b/dc_rest/models/basic_message_response_components_inner.py
@@ -0,0 +1,241 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.action_row_component_response import ActionRowComponentResponse
+from dc_rest.models.container_component_response import ContainerComponentResponse
+from dc_rest.models.file_component_response import FileComponentResponse
+from dc_rest.models.media_gallery_component_response import MediaGalleryComponentResponse
+from dc_rest.models.section_component_response import SectionComponentResponse
+from dc_rest.models.separator_component_response import SeparatorComponentResponse
+from dc_rest.models.text_display_component_response import TextDisplayComponentResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+BASICMESSAGERESPONSECOMPONENTSINNER_ONE_OF_SCHEMAS = ["ActionRowComponentResponse", "ContainerComponentResponse", "FileComponentResponse", "MediaGalleryComponentResponse", "SectionComponentResponse", "SeparatorComponentResponse", "TextDisplayComponentResponse"]
+
+class BasicMessageResponseComponentsInner(BaseModel):
+ """
+ BasicMessageResponseComponentsInner
+ """
+ # data type: ActionRowComponentResponse
+ oneof_schema_1_validator: Optional[ActionRowComponentResponse] = None
+ # data type: ContainerComponentResponse
+ oneof_schema_2_validator: Optional[ContainerComponentResponse] = None
+ # data type: FileComponentResponse
+ oneof_schema_3_validator: Optional[FileComponentResponse] = None
+ # data type: MediaGalleryComponentResponse
+ oneof_schema_4_validator: Optional[MediaGalleryComponentResponse] = None
+ # data type: SectionComponentResponse
+ oneof_schema_5_validator: Optional[SectionComponentResponse] = None
+ # data type: SeparatorComponentResponse
+ oneof_schema_6_validator: Optional[SeparatorComponentResponse] = None
+ # data type: TextDisplayComponentResponse
+ oneof_schema_7_validator: Optional[TextDisplayComponentResponse] = None
+ actual_instance: Optional[Union[ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse]] = None
+ one_of_schemas: Set[str] = { "ActionRowComponentResponse", "ContainerComponentResponse", "FileComponentResponse", "MediaGalleryComponentResponse", "SectionComponentResponse", "SeparatorComponentResponse", "TextDisplayComponentResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = BasicMessageResponseComponentsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ActionRowComponentResponse
+ if not isinstance(v, ActionRowComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ActionRowComponentResponse`")
+ else:
+ match += 1
+ # validate data type: ContainerComponentResponse
+ if not isinstance(v, ContainerComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ContainerComponentResponse`")
+ else:
+ match += 1
+ # validate data type: FileComponentResponse
+ if not isinstance(v, FileComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `FileComponentResponse`")
+ else:
+ match += 1
+ # validate data type: MediaGalleryComponentResponse
+ if not isinstance(v, MediaGalleryComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MediaGalleryComponentResponse`")
+ else:
+ match += 1
+ # validate data type: SectionComponentResponse
+ if not isinstance(v, SectionComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SectionComponentResponse`")
+ else:
+ match += 1
+ # validate data type: SeparatorComponentResponse
+ if not isinstance(v, SeparatorComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SeparatorComponentResponse`")
+ else:
+ match += 1
+ # validate data type: TextDisplayComponentResponse
+ if not isinstance(v, TextDisplayComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `TextDisplayComponentResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in BasicMessageResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in BasicMessageResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ActionRowComponentResponse
+ try:
+ instance.actual_instance = ActionRowComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ContainerComponentResponse
+ try:
+ instance.actual_instance = ContainerComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into FileComponentResponse
+ try:
+ instance.actual_instance = FileComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MediaGalleryComponentResponse
+ try:
+ instance.actual_instance = MediaGalleryComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SectionComponentResponse
+ try:
+ instance.actual_instance = SectionComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SeparatorComponentResponse
+ try:
+ instance.actual_instance = SeparatorComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into TextDisplayComponentResponse
+ try:
+ instance.actual_instance = TextDisplayComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into BasicMessageResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into BasicMessageResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/basic_message_response_interaction_metadata.py b/dc_rest/models/basic_message_response_interaction_metadata.py
new file mode 100644
index 0000000..d183d06
--- /dev/null
+++ b/dc_rest/models/basic_message_response_interaction_metadata.py
@@ -0,0 +1,191 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.application_command_interaction_metadata_response import ApplicationCommandInteractionMetadataResponse
+from dc_rest.models.message_component_interaction_metadata_response import MessageComponentInteractionMetadataResponse
+from dc_rest.models.modal_submit_interaction_metadata_response import ModalSubmitInteractionMetadataResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+BASICMESSAGERESPONSEINTERACTIONMETADATA_ONE_OF_SCHEMAS = ["ApplicationCommandInteractionMetadataResponse", "MessageComponentInteractionMetadataResponse", "ModalSubmitInteractionMetadataResponse"]
+
+class BasicMessageResponseInteractionMetadata(BaseModel):
+ """
+ BasicMessageResponseInteractionMetadata
+ """
+ # data type: ApplicationCommandInteractionMetadataResponse
+ oneof_schema_1_validator: Optional[ApplicationCommandInteractionMetadataResponse] = None
+ # data type: MessageComponentInteractionMetadataResponse
+ oneof_schema_2_validator: Optional[MessageComponentInteractionMetadataResponse] = None
+ # data type: ModalSubmitInteractionMetadataResponse
+ oneof_schema_3_validator: Optional[ModalSubmitInteractionMetadataResponse] = None
+ actual_instance: Optional[Union[ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse]] = None
+ one_of_schemas: Set[str] = { "ApplicationCommandInteractionMetadataResponse", "MessageComponentInteractionMetadataResponse", "ModalSubmitInteractionMetadataResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ if v is None:
+ return v
+
+ instance = BasicMessageResponseInteractionMetadata.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ApplicationCommandInteractionMetadataResponse
+ if not isinstance(v, ApplicationCommandInteractionMetadataResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandInteractionMetadataResponse`")
+ else:
+ match += 1
+ # validate data type: MessageComponentInteractionMetadataResponse
+ if not isinstance(v, MessageComponentInteractionMetadataResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MessageComponentInteractionMetadataResponse`")
+ else:
+ match += 1
+ # validate data type: ModalSubmitInteractionMetadataResponse
+ if not isinstance(v, ModalSubmitInteractionMetadataResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ModalSubmitInteractionMetadataResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in BasicMessageResponseInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in BasicMessageResponseInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: Optional[str]) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ if json_str is None:
+ return instance
+
+ error_messages = []
+ match = 0
+
+ # deserialize data into ApplicationCommandInteractionMetadataResponse
+ try:
+ instance.actual_instance = ApplicationCommandInteractionMetadataResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MessageComponentInteractionMetadataResponse
+ try:
+ instance.actual_instance = MessageComponentInteractionMetadataResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ModalSubmitInteractionMetadataResponse
+ try:
+ instance.actual_instance = ModalSubmitInteractionMetadataResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into BasicMessageResponseInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into BasicMessageResponseInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/basic_message_response_nonce.py b/dc_rest/models/basic_message_response_nonce.py
new file mode 100644
index 0000000..6fc2952
--- /dev/null
+++ b/dc_rest/models/basic_message_response_nonce.py
@@ -0,0 +1,184 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from typing_extensions import Annotated
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+BASICMESSAGERESPONSENONCE_ONE_OF_SCHEMAS = ["int", "str"]
+
+class BasicMessageResponseNonce(BaseModel):
+ """
+ BasicMessageResponseNonce
+ """
+ # data type: int
+ oneof_schema_1_validator: Optional[Annotated[int, Field(le=9223372036854775807, strict=True, ge=-9223372036854775808)]] = None
+ # data type: str
+ oneof_schema_2_validator: Optional[Annotated[str, Field(strict=True, max_length=25)]] = None
+ actual_instance: Optional[Union[int, str]] = None
+ one_of_schemas: Set[str] = { "int", "str" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ if v is None:
+ return v
+
+ instance = BasicMessageResponseNonce.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: int
+ try:
+ instance.oneof_schema_1_validator = v
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # validate data type: str
+ try:
+ instance.oneof_schema_2_validator = v
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in BasicMessageResponseNonce with oneOf schemas: int, str. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in BasicMessageResponseNonce with oneOf schemas: int, str. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: Optional[str]) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ if json_str is None:
+ return instance
+
+ error_messages = []
+ match = 0
+
+ # deserialize data into int
+ try:
+ # validation
+ instance.oneof_schema_1_validator = json.loads(json_str)
+ # assign value to actual_instance
+ instance.actual_instance = instance.oneof_schema_1_validator
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into str
+ try:
+ # validation
+ instance.oneof_schema_2_validator = json.loads(json_str)
+ # assign value to actual_instance
+ instance.actual_instance = instance.oneof_schema_2_validator
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into BasicMessageResponseNonce with oneOf schemas: int, str. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into BasicMessageResponseNonce with oneOf schemas: int, str. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/block_message_action.py b/dc_rest/models/block_message_action.py
new file mode 100644
index 0000000..631cc97
--- /dev/null
+++ b/dc_rest/models/block_message_action.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.block_message_action_metadata import BlockMessageActionMetadata
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BlockMessageAction(BaseModel):
+ """
+ BlockMessageAction
+ """ # noqa: E501
+ type: StrictInt
+ metadata: Optional[BlockMessageActionMetadata] = None
+ __properties: ClassVar[List[str]] = ["type", "metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BlockMessageAction from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of metadata
+ if self.metadata:
+ _dict['metadata'] = self.metadata.to_dict()
+ # set to None if metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.metadata is None and "metadata" in self.model_fields_set:
+ _dict['metadata'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BlockMessageAction from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BlockMessageAction) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "metadata": BlockMessageActionMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/block_message_action_metadata.py b/dc_rest/models/block_message_action_metadata.py
new file mode 100644
index 0000000..3bb72df
--- /dev/null
+++ b/dc_rest/models/block_message_action_metadata.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BlockMessageActionMetadata(BaseModel):
+ """
+ BlockMessageActionMetadata
+ """ # noqa: E501
+ custom_message: Optional[Annotated[str, Field(strict=True, max_length=150)]] = None
+ __properties: ClassVar[List[str]] = ["custom_message"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BlockMessageActionMetadata from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if custom_message (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_message is None and "custom_message" in self.model_fields_set:
+ _dict['custom_message'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BlockMessageActionMetadata from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BlockMessageActionMetadata) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "custom_message": obj.get("custom_message")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/block_message_action_metadata_response.py b/dc_rest/models/block_message_action_metadata_response.py
new file mode 100644
index 0000000..27e69ce
--- /dev/null
+++ b/dc_rest/models/block_message_action_metadata_response.py
@@ -0,0 +1,131 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BlockMessageActionMetadataResponse(BaseModel):
+ """
+ BlockMessageActionMetadataResponse
+ """ # noqa: E501
+ custom_message: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["custom_message"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BlockMessageActionMetadataResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if custom_message (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_message is None and "custom_message" in self.model_fields_set:
+ _dict['custom_message'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BlockMessageActionMetadataResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BlockMessageActionMetadataResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "custom_message": obj.get("custom_message")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/block_message_action_response.py b/dc_rest/models/block_message_action_response.py
new file mode 100644
index 0000000..401b853
--- /dev/null
+++ b/dc_rest/models/block_message_action_response.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List
+from dc_rest.models.block_message_action_metadata_response import BlockMessageActionMetadataResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BlockMessageActionResponse(BaseModel):
+ """
+ BlockMessageActionResponse
+ """ # noqa: E501
+ type: StrictInt
+ metadata: BlockMessageActionMetadataResponse
+ __properties: ClassVar[List[str]] = ["type", "metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BlockMessageActionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of metadata
+ if self.metadata:
+ _dict['metadata'] = self.metadata.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BlockMessageActionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BlockMessageActionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "metadata": BlockMessageActionMetadataResponse.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/bot_account_patch_request.py b/dc_rest/models/bot_account_patch_request.py
new file mode 100644
index 0000000..06e90ef
--- /dev/null
+++ b/dc_rest/models/bot_account_patch_request.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BotAccountPatchRequest(BaseModel):
+ """
+ BotAccountPatchRequest
+ """ # noqa: E501
+ username: Annotated[str, Field(min_length=2, strict=True, max_length=32)]
+ avatar: Optional[StrictStr] = None
+ banner: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["username", "avatar", "banner"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BotAccountPatchRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if avatar (nullable) is None
+ # and model_fields_set contains the field
+ if self.avatar is None and "avatar" in self.model_fields_set:
+ _dict['avatar'] = None
+
+ # set to None if banner (nullable) is None
+ # and model_fields_set contains the field
+ if self.banner is None and "banner" in self.model_fields_set:
+ _dict['banner'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BotAccountPatchRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BotAccountPatchRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "username": obj.get("username"),
+ "avatar": obj.get("avatar"),
+ "banner": obj.get("banner")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/bulk_ban_users_from_guild_request.py b/dc_rest/models/bulk_ban_users_from_guild_request.py
new file mode 100644
index 0000000..0660f08
--- /dev/null
+++ b/dc_rest/models/bulk_ban_users_from_guild_request.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BulkBanUsersFromGuildRequest(BaseModel):
+ """
+ BulkBanUsersFromGuildRequest
+ """ # noqa: E501
+ user_ids: Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=200)]
+ delete_message_seconds: Optional[Annotated[int, Field(le=604800, strict=True, ge=0)]] = None
+ __properties: ClassVar[List[str]] = ["user_ids", "delete_message_seconds"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BulkBanUsersFromGuildRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if delete_message_seconds (nullable) is None
+ # and model_fields_set contains the field
+ if self.delete_message_seconds is None and "delete_message_seconds" in self.model_fields_set:
+ _dict['delete_message_seconds'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BulkBanUsersFromGuildRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BulkBanUsersFromGuildRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "user_ids": obj.get("user_ids"),
+ "delete_message_seconds": obj.get("delete_message_seconds")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/bulk_ban_users_response.py b/dc_rest/models/bulk_ban_users_response.py
new file mode 100644
index 0000000..edd7f0f
--- /dev/null
+++ b/dc_rest/models/bulk_ban_users_response.py
@@ -0,0 +1,129 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BulkBanUsersResponse(BaseModel):
+ """
+ BulkBanUsersResponse
+ """ # noqa: E501
+ banned_users: List[Annotated[str, Field(strict=True)]]
+ failed_users: List[Annotated[str, Field(strict=True)]]
+ __properties: ClassVar[List[str]] = ["banned_users", "failed_users"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BulkBanUsersResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BulkBanUsersResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BulkBanUsersResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "banned_users": obj.get("banned_users"),
+ "failed_users": obj.get("failed_users")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/bulk_delete_messages_request.py b/dc_rest/models/bulk_delete_messages_request.py
new file mode 100644
index 0000000..568b6b7
--- /dev/null
+++ b/dc_rest/models/bulk_delete_messages_request.py
@@ -0,0 +1,127 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BulkDeleteMessagesRequest(BaseModel):
+ """
+ BulkDeleteMessagesRequest
+ """ # noqa: E501
+ messages: Annotated[List[Annotated[str, Field(strict=True)]], Field(min_length=2, max_length=100)]
+ __properties: ClassVar[List[str]] = ["messages"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BulkDeleteMessagesRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BulkDeleteMessagesRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BulkDeleteMessagesRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "messages": obj.get("messages")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/bulk_lobby_member_request.py b/dc_rest/models/bulk_lobby_member_request.py
new file mode 100644
index 0000000..a59e1d1
--- /dev/null
+++ b/dc_rest/models/bulk_lobby_member_request.py
@@ -0,0 +1,160 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BulkLobbyMemberRequest(BaseModel):
+ """
+ BulkLobbyMemberRequest
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None
+ flags: Optional[StrictInt] = None
+ remove_member: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["id", "metadata", "flags", "remove_member"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('flags')
+ def flags_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set([1]):
+ raise ValueError("must be one of enum values (1)")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BulkLobbyMemberRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ # set to None if remove_member (nullable) is None
+ # and model_fields_set contains the field
+ if self.remove_member is None and "remove_member" in self.model_fields_set:
+ _dict['remove_member'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BulkLobbyMemberRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BulkLobbyMemberRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "metadata": obj.get("metadata"),
+ "flags": obj.get("flags"),
+ "remove_member": obj.get("remove_member")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/bulk_update_guild_channels_request_inner.py b/dc_rest/models/bulk_update_guild_channels_request_inner.py
new file mode 100644
index 0000000..4b45e16
--- /dev/null
+++ b/dc_rest/models/bulk_update_guild_channels_request_inner.py
@@ -0,0 +1,163 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BulkUpdateGuildChannelsRequestInner(BaseModel):
+ """
+ BulkUpdateGuildChannelsRequestInner
+ """ # noqa: E501
+ id: Optional[Annotated[str, Field(strict=True)]] = None
+ position: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
+ parent_id: Optional[Annotated[str, Field(strict=True)]] = None
+ lock_permissions: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["id", "position", "parent_id", "lock_permissions"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('parent_id')
+ def parent_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BulkUpdateGuildChannelsRequestInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if position (nullable) is None
+ # and model_fields_set contains the field
+ if self.position is None and "position" in self.model_fields_set:
+ _dict['position'] = None
+
+ # set to None if lock_permissions (nullable) is None
+ # and model_fields_set contains the field
+ if self.lock_permissions is None and "lock_permissions" in self.model_fields_set:
+ _dict['lock_permissions'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BulkUpdateGuildChannelsRequestInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BulkUpdateGuildChannelsRequestInner) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "position": obj.get("position"),
+ "parent_id": obj.get("parent_id"),
+ "lock_permissions": obj.get("lock_permissions")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/bulk_update_guild_roles_request_inner.py b/dc_rest/models/bulk_update_guild_roles_request_inner.py
new file mode 100644
index 0000000..2820933
--- /dev/null
+++ b/dc_rest/models/bulk_update_guild_roles_request_inner.py
@@ -0,0 +1,144 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BulkUpdateGuildRolesRequestInner(BaseModel):
+ """
+ BulkUpdateGuildRolesRequestInner
+ """ # noqa: E501
+ id: Optional[Annotated[str, Field(strict=True)]] = None
+ position: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["id", "position"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BulkUpdateGuildRolesRequestInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if position (nullable) is None
+ # and model_fields_set contains the field
+ if self.position is None and "position" in self.model_fields_set:
+ _dict['position'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BulkUpdateGuildRolesRequestInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in BulkUpdateGuildRolesRequestInner) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "position": obj.get("position")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/button_component_for_message_request.py b/dc_rest/models/button_component_for_message_request.py
new file mode 100644
index 0000000..edaeedb
--- /dev/null
+++ b/dc_rest/models/button_component_for_message_request.py
@@ -0,0 +1,185 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.component_emoji_for_message_request import ComponentEmojiForMessageRequest
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ButtonComponentForMessageRequest(BaseModel):
+ """
+ ButtonComponentForMessageRequest
+ """ # noqa: E501
+ type: StrictInt
+ custom_id: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ style: Optional[StrictInt]
+ label: Optional[Annotated[str, Field(strict=True, max_length=80)]] = None
+ disabled: Optional[StrictBool] = None
+ url: Optional[Annotated[str, Field(strict=True, max_length=512)]] = None
+ sku_id: Optional[Annotated[str, Field(strict=True)]] = None
+ emoji: Optional[ComponentEmojiForMessageRequest] = None
+ __properties: ClassVar[List[str]] = ["type", "custom_id", "style", "label", "disabled", "url", "sku_id", "emoji"]
+
+ @field_validator('sku_id')
+ def sku_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ButtonComponentForMessageRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of emoji
+ if self.emoji:
+ _dict['emoji'] = self.emoji.to_dict()
+ # set to None if custom_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_id is None and "custom_id" in self.model_fields_set:
+ _dict['custom_id'] = None
+
+ # set to None if style (nullable) is None
+ # and model_fields_set contains the field
+ if self.style is None and "style" in self.model_fields_set:
+ _dict['style'] = None
+
+ # set to None if label (nullable) is None
+ # and model_fields_set contains the field
+ if self.label is None and "label" in self.model_fields_set:
+ _dict['label'] = None
+
+ # set to None if disabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.disabled is None and "disabled" in self.model_fields_set:
+ _dict['disabled'] = None
+
+ # set to None if url (nullable) is None
+ # and model_fields_set contains the field
+ if self.url is None and "url" in self.model_fields_set:
+ _dict['url'] = None
+
+ # set to None if emoji (nullable) is None
+ # and model_fields_set contains the field
+ if self.emoji is None and "emoji" in self.model_fields_set:
+ _dict['emoji'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ButtonComponentForMessageRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ButtonComponentForMessageRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "custom_id": obj.get("custom_id"),
+ "style": obj.get("style"),
+ "label": obj.get("label"),
+ "disabled": obj.get("disabled"),
+ "url": obj.get("url"),
+ "sku_id": obj.get("sku_id"),
+ "emoji": ComponentEmojiForMessageRequest.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/button_component_response.py b/dc_rest/models/button_component_response.py
new file mode 100644
index 0000000..d18e350
--- /dev/null
+++ b/dc_rest/models/button_component_response.py
@@ -0,0 +1,187 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.component_emoji_response import ComponentEmojiResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ButtonComponentResponse(BaseModel):
+ """
+ ButtonComponentResponse
+ """ # noqa: E501
+ type: StrictInt
+ id: StrictInt
+ custom_id: Optional[StrictStr] = None
+ style: Optional[StrictInt]
+ label: Optional[StrictStr] = None
+ disabled: Optional[StrictBool] = None
+ emoji: Optional[ComponentEmojiResponse] = None
+ url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None
+ sku_id: Optional[Annotated[str, Field(strict=True)]] = None
+ __properties: ClassVar[List[str]] = ["type", "id", "custom_id", "style", "label", "disabled", "emoji", "url", "sku_id"]
+
+ @field_validator('sku_id')
+ def sku_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ButtonComponentResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of emoji
+ if self.emoji:
+ _dict['emoji'] = self.emoji.to_dict()
+ # set to None if custom_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_id is None and "custom_id" in self.model_fields_set:
+ _dict['custom_id'] = None
+
+ # set to None if style (nullable) is None
+ # and model_fields_set contains the field
+ if self.style is None and "style" in self.model_fields_set:
+ _dict['style'] = None
+
+ # set to None if label (nullable) is None
+ # and model_fields_set contains the field
+ if self.label is None and "label" in self.model_fields_set:
+ _dict['label'] = None
+
+ # set to None if disabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.disabled is None and "disabled" in self.model_fields_set:
+ _dict['disabled'] = None
+
+ # set to None if emoji (nullable) is None
+ # and model_fields_set contains the field
+ if self.emoji is None and "emoji" in self.model_fields_set:
+ _dict['emoji'] = None
+
+ # set to None if url (nullable) is None
+ # and model_fields_set contains the field
+ if self.url is None and "url" in self.model_fields_set:
+ _dict['url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ButtonComponentResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ButtonComponentResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "id": obj.get("id"),
+ "custom_id": obj.get("custom_id"),
+ "style": obj.get("style"),
+ "label": obj.get("label"),
+ "disabled": obj.get("disabled"),
+ "emoji": ComponentEmojiResponse.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None,
+ "url": obj.get("url"),
+ "sku_id": obj.get("sku_id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/channel_follower_response.py b/dc_rest/models/channel_follower_response.py
new file mode 100644
index 0000000..d2b281f
--- /dev/null
+++ b/dc_rest/models/channel_follower_response.py
@@ -0,0 +1,143 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ChannelFollowerResponse(BaseModel):
+ """
+ ChannelFollowerResponse
+ """ # noqa: E501
+ channel_id: Annotated[str, Field(strict=True)]
+ webhook_id: Annotated[str, Field(strict=True)]
+ __properties: ClassVar[List[str]] = ["channel_id", "webhook_id"]
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('webhook_id')
+ def webhook_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ChannelFollowerResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ChannelFollowerResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ChannelFollowerResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "channel_id": obj.get("channel_id"),
+ "webhook_id": obj.get("webhook_id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/channel_follower_webhook_response.py b/dc_rest/models/channel_follower_webhook_response.py
new file mode 100644
index 0000000..2aa7576
--- /dev/null
+++ b/dc_rest/models/channel_follower_webhook_response.py
@@ -0,0 +1,214 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.user_response import UserResponse
+from dc_rest.models.webhook_source_channel_response import WebhookSourceChannelResponse
+from dc_rest.models.webhook_source_guild_response import WebhookSourceGuildResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ChannelFollowerWebhookResponse(BaseModel):
+ """
+ ChannelFollowerWebhookResponse
+ """ # noqa: E501
+ application_id: Optional[Annotated[str, Field(strict=True)]] = None
+ avatar: Optional[StrictStr] = None
+ channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ type: StrictInt
+ user: Optional[UserResponse] = None
+ source_guild: Optional[WebhookSourceGuildResponse] = None
+ source_channel: Optional[WebhookSourceChannelResponse] = None
+ __properties: ClassVar[List[str]] = ["application_id", "avatar", "channel_id", "guild_id", "id", "name", "type", "user", "source_guild", "source_channel"]
+
+ @field_validator('application_id')
+ def application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ChannelFollowerWebhookResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of source_guild
+ if self.source_guild:
+ _dict['source_guild'] = self.source_guild.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of source_channel
+ if self.source_channel:
+ _dict['source_channel'] = self.source_channel.to_dict()
+ # set to None if avatar (nullable) is None
+ # and model_fields_set contains the field
+ if self.avatar is None and "avatar" in self.model_fields_set:
+ _dict['avatar'] = None
+
+ # set to None if user (nullable) is None
+ # and model_fields_set contains the field
+ if self.user is None and "user" in self.model_fields_set:
+ _dict['user'] = None
+
+ # set to None if source_guild (nullable) is None
+ # and model_fields_set contains the field
+ if self.source_guild is None and "source_guild" in self.model_fields_set:
+ _dict['source_guild'] = None
+
+ # set to None if source_channel (nullable) is None
+ # and model_fields_set contains the field
+ if self.source_channel is None and "source_channel" in self.model_fields_set:
+ _dict['source_channel'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ChannelFollowerWebhookResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ChannelFollowerWebhookResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "application_id": obj.get("application_id"),
+ "avatar": obj.get("avatar"),
+ "channel_id": obj.get("channel_id"),
+ "guild_id": obj.get("guild_id"),
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "type": obj.get("type"),
+ "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None,
+ "source_guild": WebhookSourceGuildResponse.from_dict(obj["source_guild"]) if obj.get("source_guild") is not None else None,
+ "source_channel": WebhookSourceChannelResponse.from_dict(obj["source_channel"]) if obj.get("source_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/channel_permission_overwrite_request.py b/dc_rest/models/channel_permission_overwrite_request.py
new file mode 100644
index 0000000..1e6dc2f
--- /dev/null
+++ b/dc_rest/models/channel_permission_overwrite_request.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ChannelPermissionOverwriteRequest(BaseModel):
+ """
+ ChannelPermissionOverwriteRequest
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ type: Optional[StrictInt] = None
+ allow: Optional[StrictInt] = None
+ deny: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["id", "type", "allow", "deny"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ChannelPermissionOverwriteRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if allow (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow is None and "allow" in self.model_fields_set:
+ _dict['allow'] = None
+
+ # set to None if deny (nullable) is None
+ # and model_fields_set contains the field
+ if self.deny is None and "deny" in self.model_fields_set:
+ _dict['deny'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ChannelPermissionOverwriteRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ChannelPermissionOverwriteRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "allow": obj.get("allow"),
+ "deny": obj.get("deny")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/channel_permission_overwrite_response.py b/dc_rest/models/channel_permission_overwrite_response.py
new file mode 100644
index 0000000..876bec0
--- /dev/null
+++ b/dc_rest/models/channel_permission_overwrite_response.py
@@ -0,0 +1,145 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ChannelPermissionOverwriteResponse(BaseModel):
+ """
+ ChannelPermissionOverwriteResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ type: Optional[StrictInt]
+ allow: StrictStr
+ deny: StrictStr
+ __properties: ClassVar[List[str]] = ["id", "type", "allow", "deny"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ChannelPermissionOverwriteResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ChannelPermissionOverwriteResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ChannelPermissionOverwriteResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "allow": obj.get("allow"),
+ "deny": obj.get("deny")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/channel_select_component_for_message_request.py b/dc_rest/models/channel_select_component_for_message_request.py
new file mode 100644
index 0000000..84aae56
--- /dev/null
+++ b/dc_rest/models/channel_select_component_for_message_request.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.channel_select_default_value import ChannelSelectDefaultValue
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ChannelSelectComponentForMessageRequest(BaseModel):
+ """
+ ChannelSelectComponentForMessageRequest
+ """ # noqa: E501
+ type: StrictInt
+ custom_id: Annotated[str, Field(strict=True, max_length=100)]
+ placeholder: Optional[Annotated[str, Field(strict=True, max_length=150)]] = None
+ min_values: Optional[Annotated[int, Field(le=25, strict=True, ge=0)]] = None
+ max_values: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None
+ disabled: Optional[StrictBool] = None
+ default_values: Optional[Annotated[List[ChannelSelectDefaultValue], Field(max_length=25)]] = None
+ channel_types: Optional[List[StrictInt]] = None
+ __properties: ClassVar[List[str]] = ["type", "custom_id", "placeholder", "min_values", "max_values", "disabled", "default_values", "channel_types"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ChannelSelectComponentForMessageRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in default_values (list)
+ _items = []
+ if self.default_values:
+ for _item_default_values in self.default_values:
+ if _item_default_values:
+ _items.append(_item_default_values.to_dict())
+ _dict['default_values'] = _items
+ # set to None if placeholder (nullable) is None
+ # and model_fields_set contains the field
+ if self.placeholder is None and "placeholder" in self.model_fields_set:
+ _dict['placeholder'] = None
+
+ # set to None if min_values (nullable) is None
+ # and model_fields_set contains the field
+ if self.min_values is None and "min_values" in self.model_fields_set:
+ _dict['min_values'] = None
+
+ # set to None if max_values (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_values is None and "max_values" in self.model_fields_set:
+ _dict['max_values'] = None
+
+ # set to None if disabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.disabled is None and "disabled" in self.model_fields_set:
+ _dict['disabled'] = None
+
+ # set to None if default_values (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_values is None and "default_values" in self.model_fields_set:
+ _dict['default_values'] = None
+
+ # set to None if channel_types (nullable) is None
+ # and model_fields_set contains the field
+ if self.channel_types is None and "channel_types" in self.model_fields_set:
+ _dict['channel_types'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ChannelSelectComponentForMessageRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ChannelSelectComponentForMessageRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "custom_id": obj.get("custom_id"),
+ "placeholder": obj.get("placeholder"),
+ "min_values": obj.get("min_values"),
+ "max_values": obj.get("max_values"),
+ "disabled": obj.get("disabled"),
+ "default_values": [ChannelSelectDefaultValue.from_dict(_item) for _item in obj["default_values"]] if obj.get("default_values") is not None else None,
+ "channel_types": obj.get("channel_types")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/channel_select_component_response.py b/dc_rest/models/channel_select_component_response.py
new file mode 100644
index 0000000..7d072db
--- /dev/null
+++ b/dc_rest/models/channel_select_component_response.py
@@ -0,0 +1,180 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.channel_select_default_value_response import ChannelSelectDefaultValueResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ChannelSelectComponentResponse(BaseModel):
+ """
+ ChannelSelectComponentResponse
+ """ # noqa: E501
+ type: StrictInt
+ id: StrictInt
+ custom_id: StrictStr
+ placeholder: Optional[StrictStr] = None
+ min_values: Optional[StrictInt] = None
+ max_values: Optional[StrictInt] = None
+ disabled: Optional[StrictBool] = None
+ channel_types: Optional[List[StrictInt]] = None
+ default_values: Optional[List[ChannelSelectDefaultValueResponse]] = None
+ __properties: ClassVar[List[str]] = ["type", "id", "custom_id", "placeholder", "min_values", "max_values", "disabled", "channel_types", "default_values"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ChannelSelectComponentResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in default_values (list)
+ _items = []
+ if self.default_values:
+ for _item_default_values in self.default_values:
+ if _item_default_values:
+ _items.append(_item_default_values.to_dict())
+ _dict['default_values'] = _items
+ # set to None if placeholder (nullable) is None
+ # and model_fields_set contains the field
+ if self.placeholder is None and "placeholder" in self.model_fields_set:
+ _dict['placeholder'] = None
+
+ # set to None if min_values (nullable) is None
+ # and model_fields_set contains the field
+ if self.min_values is None and "min_values" in self.model_fields_set:
+ _dict['min_values'] = None
+
+ # set to None if max_values (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_values is None and "max_values" in self.model_fields_set:
+ _dict['max_values'] = None
+
+ # set to None if disabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.disabled is None and "disabled" in self.model_fields_set:
+ _dict['disabled'] = None
+
+ # set to None if channel_types (nullable) is None
+ # and model_fields_set contains the field
+ if self.channel_types is None and "channel_types" in self.model_fields_set:
+ _dict['channel_types'] = None
+
+ # set to None if default_values (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_values is None and "default_values" in self.model_fields_set:
+ _dict['default_values'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ChannelSelectComponentResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ChannelSelectComponentResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "id": obj.get("id"),
+ "custom_id": obj.get("custom_id"),
+ "placeholder": obj.get("placeholder"),
+ "min_values": obj.get("min_values"),
+ "max_values": obj.get("max_values"),
+ "disabled": obj.get("disabled"),
+ "channel_types": obj.get("channel_types"),
+ "default_values": [ChannelSelectDefaultValueResponse.from_dict(_item) for _item in obj["default_values"]] if obj.get("default_values") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/channel_select_default_value.py b/dc_rest/models/channel_select_default_value.py
new file mode 100644
index 0000000..a8f43fb
--- /dev/null
+++ b/dc_rest/models/channel_select_default_value.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ChannelSelectDefaultValue(BaseModel):
+ """
+ ChannelSelectDefaultValue
+ """ # noqa: E501
+ type: Optional[StrictStr]
+ id: Annotated[str, Field(strict=True)]
+ __properties: ClassVar[List[str]] = ["type", "id"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ChannelSelectDefaultValue from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ChannelSelectDefaultValue from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ChannelSelectDefaultValue) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "id": obj.get("id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/channel_select_default_value_response.py b/dc_rest/models/channel_select_default_value_response.py
new file mode 100644
index 0000000..20c3c80
--- /dev/null
+++ b/dc_rest/models/channel_select_default_value_response.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ChannelSelectDefaultValueResponse(BaseModel):
+ """
+ ChannelSelectDefaultValueResponse
+ """ # noqa: E501
+ type: Optional[StrictStr]
+ id: Annotated[str, Field(strict=True)]
+ __properties: ClassVar[List[str]] = ["type", "id"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ChannelSelectDefaultValueResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ChannelSelectDefaultValueResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ChannelSelectDefaultValueResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "id": obj.get("id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/command_permission_response.py b/dc_rest/models/command_permission_response.py
new file mode 100644
index 0000000..af206c2
--- /dev/null
+++ b/dc_rest/models/command_permission_response.py
@@ -0,0 +1,138 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CommandPermissionResponse(BaseModel):
+ """
+ CommandPermissionResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ type: StrictInt
+ permission: StrictBool
+ __properties: ClassVar[List[str]] = ["id", "type", "permission"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CommandPermissionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CommandPermissionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CommandPermissionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "permission": obj.get("permission")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/command_permissions_response.py b/dc_rest/models/command_permissions_response.py
new file mode 100644
index 0000000..72f27cb
--- /dev/null
+++ b/dc_rest/models/command_permissions_response.py
@@ -0,0 +1,162 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from dc_rest.models.command_permission_response import CommandPermissionResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CommandPermissionsResponse(BaseModel):
+ """
+ CommandPermissionsResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ application_id: Annotated[str, Field(strict=True)]
+ guild_id: Annotated[str, Field(strict=True)]
+ permissions: List[CommandPermissionResponse]
+ __properties: ClassVar[List[str]] = ["id", "application_id", "guild_id", "permissions"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('application_id')
+ def application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CommandPermissionsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in permissions (list)
+ _items = []
+ if self.permissions:
+ for _item_permissions in self.permissions:
+ if _item_permissions:
+ _items.append(_item_permissions.to_dict())
+ _dict['permissions'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CommandPermissionsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CommandPermissionsResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "application_id": obj.get("application_id"),
+ "guild_id": obj.get("guild_id"),
+ "permissions": [CommandPermissionResponse.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/component_emoji_for_message_request.py b/dc_rest/models/component_emoji_for_message_request.py
new file mode 100644
index 0000000..ba88565
--- /dev/null
+++ b/dc_rest/models/component_emoji_for_message_request.py
@@ -0,0 +1,139 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ComponentEmojiForMessageRequest(BaseModel):
+ """
+ ComponentEmojiForMessageRequest
+ """ # noqa: E501
+ id: Optional[Annotated[str, Field(strict=True)]] = None
+ name: Annotated[str, Field(strict=True, max_length=32)]
+ __properties: ClassVar[List[str]] = ["id", "name"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ComponentEmojiForMessageRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ComponentEmojiForMessageRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ComponentEmojiForMessageRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/component_emoji_response.py b/dc_rest/models/component_emoji_response.py
new file mode 100644
index 0000000..8433327
--- /dev/null
+++ b/dc_rest/models/component_emoji_response.py
@@ -0,0 +1,146 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ComponentEmojiResponse(BaseModel):
+ """
+ ComponentEmojiResponse
+ """ # noqa: E501
+ id: Optional[Annotated[str, Field(strict=True)]] = None
+ name: StrictStr
+ animated: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "animated"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ComponentEmojiResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if animated (nullable) is None
+ # and model_fields_set contains the field
+ if self.animated is None and "animated" in self.model_fields_set:
+ _dict['animated'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ComponentEmojiResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ComponentEmojiResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "animated": obj.get("animated")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/connected_account_guild_response.py b/dc_rest/models/connected_account_guild_response.py
new file mode 100644
index 0000000..705aadb
--- /dev/null
+++ b/dc_rest/models/connected_account_guild_response.py
@@ -0,0 +1,143 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ConnectedAccountGuildResponse(BaseModel):
+ """
+ ConnectedAccountGuildResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ icon: Optional[StrictStr] = None
+ name: StrictStr
+ __properties: ClassVar[List[str]] = ["id", "icon", "name"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ConnectedAccountGuildResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ConnectedAccountGuildResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ConnectedAccountGuildResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "icon": obj.get("icon"),
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/connected_account_integration_response.py b/dc_rest/models/connected_account_integration_response.py
new file mode 100644
index 0000000..03b1884
--- /dev/null
+++ b/dc_rest/models/connected_account_integration_response.py
@@ -0,0 +1,145 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.account_response import AccountResponse
+from dc_rest.models.connected_account_guild_response import ConnectedAccountGuildResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ConnectedAccountIntegrationResponse(BaseModel):
+ """
+ ConnectedAccountIntegrationResponse
+ """ # noqa: E501
+ id: StrictStr
+ type: Optional[StrictStr]
+ account: AccountResponse
+ guild: ConnectedAccountGuildResponse
+ __properties: ClassVar[List[str]] = ["id", "type", "account", "guild"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ConnectedAccountIntegrationResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of account
+ if self.account:
+ _dict['account'] = self.account.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of guild
+ if self.guild:
+ _dict['guild'] = self.guild.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ConnectedAccountIntegrationResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ConnectedAccountIntegrationResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None,
+ "guild": ConnectedAccountGuildResponse.from_dict(obj["guild"]) if obj.get("guild") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/connected_account_response.py b/dc_rest/models/connected_account_response.py
new file mode 100644
index 0000000..751c281
--- /dev/null
+++ b/dc_rest/models/connected_account_response.py
@@ -0,0 +1,177 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.connected_account_integration_response import ConnectedAccountIntegrationResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ConnectedAccountResponse(BaseModel):
+ """
+ ConnectedAccountResponse
+ """ # noqa: E501
+ id: StrictStr
+ name: Optional[StrictStr] = None
+ type: Optional[StrictStr]
+ friend_sync: StrictBool
+ integrations: Optional[List[ConnectedAccountIntegrationResponse]] = None
+ show_activity: StrictBool
+ two_way_link: StrictBool
+ verified: StrictBool
+ visibility: Optional[StrictInt]
+ revoked: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "type", "friend_sync", "integrations", "show_activity", "two_way_link", "verified", "visibility", "revoked"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ConnectedAccountResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in integrations (list)
+ _items = []
+ if self.integrations:
+ for _item_integrations in self.integrations:
+ if _item_integrations:
+ _items.append(_item_integrations.to_dict())
+ _dict['integrations'] = _items
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if integrations (nullable) is None
+ # and model_fields_set contains the field
+ if self.integrations is None and "integrations" in self.model_fields_set:
+ _dict['integrations'] = None
+
+ # set to None if visibility (nullable) is None
+ # and model_fields_set contains the field
+ if self.visibility is None and "visibility" in self.model_fields_set:
+ _dict['visibility'] = None
+
+ # set to None if revoked (nullable) is None
+ # and model_fields_set contains the field
+ if self.revoked is None and "revoked" in self.model_fields_set:
+ _dict['revoked'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ConnectedAccountResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ConnectedAccountResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "type": obj.get("type"),
+ "friend_sync": obj.get("friend_sync"),
+ "integrations": [ConnectedAccountIntegrationResponse.from_dict(_item) for _item in obj["integrations"]] if obj.get("integrations") is not None else None,
+ "show_activity": obj.get("show_activity"),
+ "two_way_link": obj.get("two_way_link"),
+ "verified": obj.get("verified"),
+ "visibility": obj.get("visibility"),
+ "revoked": obj.get("revoked")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/container_component_for_message_request.py b/dc_rest/models/container_component_for_message_request.py
new file mode 100644
index 0000000..a55f2ad
--- /dev/null
+++ b/dc_rest/models/container_component_for_message_request.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.container_component_for_message_request_components_inner import ContainerComponentForMessageRequestComponentsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ContainerComponentForMessageRequest(BaseModel):
+ """
+ ContainerComponentForMessageRequest
+ """ # noqa: E501
+ type: StrictInt
+ accent_color: Optional[Annotated[int, Field(le=16777215, strict=True, ge=0)]] = None
+ components: Annotated[List[ContainerComponentForMessageRequestComponentsInner], Field(min_length=1, max_length=40)]
+ spoiler: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "accent_color", "components", "spoiler"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ContainerComponentForMessageRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ # set to None if accent_color (nullable) is None
+ # and model_fields_set contains the field
+ if self.accent_color is None and "accent_color" in self.model_fields_set:
+ _dict['accent_color'] = None
+
+ # set to None if spoiler (nullable) is None
+ # and model_fields_set contains the field
+ if self.spoiler is None and "spoiler" in self.model_fields_set:
+ _dict['spoiler'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ContainerComponentForMessageRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ContainerComponentForMessageRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "accent_color": obj.get("accent_color"),
+ "components": [ContainerComponentForMessageRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None,
+ "spoiler": obj.get("spoiler")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/container_component_for_message_request_components_inner.py b/dc_rest/models/container_component_for_message_request_components_inner.py
new file mode 100644
index 0000000..1a87ab5
--- /dev/null
+++ b/dc_rest/models/container_component_for_message_request_components_inner.py
@@ -0,0 +1,227 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.action_row_component_for_message_request import ActionRowComponentForMessageRequest
+from dc_rest.models.file_component_for_message_request import FileComponentForMessageRequest
+from dc_rest.models.media_gallery_component_for_message_request import MediaGalleryComponentForMessageRequest
+from dc_rest.models.section_component_for_message_request import SectionComponentForMessageRequest
+from dc_rest.models.separator_component_for_message_request import SeparatorComponentForMessageRequest
+from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+CONTAINERCOMPONENTFORMESSAGEREQUESTCOMPONENTSINNER_ONE_OF_SCHEMAS = ["ActionRowComponentForMessageRequest", "FileComponentForMessageRequest", "MediaGalleryComponentForMessageRequest", "SectionComponentForMessageRequest", "SeparatorComponentForMessageRequest", "TextDisplayComponentForMessageRequest"]
+
+class ContainerComponentForMessageRequestComponentsInner(BaseModel):
+ """
+ ContainerComponentForMessageRequestComponentsInner
+ """
+ # data type: ActionRowComponentForMessageRequest
+ oneof_schema_1_validator: Optional[ActionRowComponentForMessageRequest] = None
+ # data type: FileComponentForMessageRequest
+ oneof_schema_2_validator: Optional[FileComponentForMessageRequest] = None
+ # data type: MediaGalleryComponentForMessageRequest
+ oneof_schema_3_validator: Optional[MediaGalleryComponentForMessageRequest] = None
+ # data type: SectionComponentForMessageRequest
+ oneof_schema_4_validator: Optional[SectionComponentForMessageRequest] = None
+ # data type: SeparatorComponentForMessageRequest
+ oneof_schema_5_validator: Optional[SeparatorComponentForMessageRequest] = None
+ # data type: TextDisplayComponentForMessageRequest
+ oneof_schema_6_validator: Optional[TextDisplayComponentForMessageRequest] = None
+ actual_instance: Optional[Union[ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest]] = None
+ one_of_schemas: Set[str] = { "ActionRowComponentForMessageRequest", "FileComponentForMessageRequest", "MediaGalleryComponentForMessageRequest", "SectionComponentForMessageRequest", "SeparatorComponentForMessageRequest", "TextDisplayComponentForMessageRequest" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = ContainerComponentForMessageRequestComponentsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ActionRowComponentForMessageRequest
+ if not isinstance(v, ActionRowComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ActionRowComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: FileComponentForMessageRequest
+ if not isinstance(v, FileComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `FileComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: MediaGalleryComponentForMessageRequest
+ if not isinstance(v, MediaGalleryComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MediaGalleryComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: SectionComponentForMessageRequest
+ if not isinstance(v, SectionComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SectionComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: SeparatorComponentForMessageRequest
+ if not isinstance(v, SeparatorComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SeparatorComponentForMessageRequest`")
+ else:
+ match += 1
+ # validate data type: TextDisplayComponentForMessageRequest
+ if not isinstance(v, TextDisplayComponentForMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `TextDisplayComponentForMessageRequest`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ContainerComponentForMessageRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ContainerComponentForMessageRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ActionRowComponentForMessageRequest
+ try:
+ instance.actual_instance = ActionRowComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into FileComponentForMessageRequest
+ try:
+ instance.actual_instance = FileComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MediaGalleryComponentForMessageRequest
+ try:
+ instance.actual_instance = MediaGalleryComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SectionComponentForMessageRequest
+ try:
+ instance.actual_instance = SectionComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SeparatorComponentForMessageRequest
+ try:
+ instance.actual_instance = SeparatorComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into TextDisplayComponentForMessageRequest
+ try:
+ instance.actual_instance = TextDisplayComponentForMessageRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ContainerComponentForMessageRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ContainerComponentForMessageRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/container_component_response.py b/dc_rest/models/container_component_response.py
new file mode 100644
index 0000000..6f61dc0
--- /dev/null
+++ b/dc_rest/models/container_component_response.py
@@ -0,0 +1,147 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.container_component_response_components_inner import ContainerComponentResponseComponentsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ContainerComponentResponse(BaseModel):
+ """
+ ContainerComponentResponse
+ """ # noqa: E501
+ type: StrictInt
+ id: StrictInt
+ accent_color: Optional[StrictInt] = None
+ components: List[ContainerComponentResponseComponentsInner]
+ spoiler: StrictBool
+ __properties: ClassVar[List[str]] = ["type", "id", "accent_color", "components", "spoiler"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ContainerComponentResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ # set to None if accent_color (nullable) is None
+ # and model_fields_set contains the field
+ if self.accent_color is None and "accent_color" in self.model_fields_set:
+ _dict['accent_color'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ContainerComponentResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ContainerComponentResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "id": obj.get("id"),
+ "accent_color": obj.get("accent_color"),
+ "components": [ContainerComponentResponseComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None,
+ "spoiler": obj.get("spoiler")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/container_component_response_components_inner.py b/dc_rest/models/container_component_response_components_inner.py
new file mode 100644
index 0000000..5a36b45
--- /dev/null
+++ b/dc_rest/models/container_component_response_components_inner.py
@@ -0,0 +1,227 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.action_row_component_response import ActionRowComponentResponse
+from dc_rest.models.file_component_response import FileComponentResponse
+from dc_rest.models.media_gallery_component_response import MediaGalleryComponentResponse
+from dc_rest.models.section_component_response import SectionComponentResponse
+from dc_rest.models.separator_component_response import SeparatorComponentResponse
+from dc_rest.models.text_display_component_response import TextDisplayComponentResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+CONTAINERCOMPONENTRESPONSECOMPONENTSINNER_ONE_OF_SCHEMAS = ["ActionRowComponentResponse", "FileComponentResponse", "MediaGalleryComponentResponse", "SectionComponentResponse", "SeparatorComponentResponse", "TextDisplayComponentResponse"]
+
+class ContainerComponentResponseComponentsInner(BaseModel):
+ """
+ ContainerComponentResponseComponentsInner
+ """
+ # data type: ActionRowComponentResponse
+ oneof_schema_1_validator: Optional[ActionRowComponentResponse] = None
+ # data type: FileComponentResponse
+ oneof_schema_2_validator: Optional[FileComponentResponse] = None
+ # data type: MediaGalleryComponentResponse
+ oneof_schema_3_validator: Optional[MediaGalleryComponentResponse] = None
+ # data type: SectionComponentResponse
+ oneof_schema_4_validator: Optional[SectionComponentResponse] = None
+ # data type: SeparatorComponentResponse
+ oneof_schema_5_validator: Optional[SeparatorComponentResponse] = None
+ # data type: TextDisplayComponentResponse
+ oneof_schema_6_validator: Optional[TextDisplayComponentResponse] = None
+ actual_instance: Optional[Union[ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse]] = None
+ one_of_schemas: Set[str] = { "ActionRowComponentResponse", "FileComponentResponse", "MediaGalleryComponentResponse", "SectionComponentResponse", "SeparatorComponentResponse", "TextDisplayComponentResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = ContainerComponentResponseComponentsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ActionRowComponentResponse
+ if not isinstance(v, ActionRowComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ActionRowComponentResponse`")
+ else:
+ match += 1
+ # validate data type: FileComponentResponse
+ if not isinstance(v, FileComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `FileComponentResponse`")
+ else:
+ match += 1
+ # validate data type: MediaGalleryComponentResponse
+ if not isinstance(v, MediaGalleryComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MediaGalleryComponentResponse`")
+ else:
+ match += 1
+ # validate data type: SectionComponentResponse
+ if not isinstance(v, SectionComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SectionComponentResponse`")
+ else:
+ match += 1
+ # validate data type: SeparatorComponentResponse
+ if not isinstance(v, SeparatorComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SeparatorComponentResponse`")
+ else:
+ match += 1
+ # validate data type: TextDisplayComponentResponse
+ if not isinstance(v, TextDisplayComponentResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `TextDisplayComponentResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ContainerComponentResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ContainerComponentResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ActionRowComponentResponse
+ try:
+ instance.actual_instance = ActionRowComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into FileComponentResponse
+ try:
+ instance.actual_instance = FileComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MediaGalleryComponentResponse
+ try:
+ instance.actual_instance = MediaGalleryComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SectionComponentResponse
+ try:
+ instance.actual_instance = SectionComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SeparatorComponentResponse
+ try:
+ instance.actual_instance = SeparatorComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into TextDisplayComponentResponse
+ try:
+ instance.actual_instance = TextDisplayComponentResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ContainerComponentResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ContainerComponentResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/create_application_emoji_request.py b/dc_rest/models/create_application_emoji_request.py
new file mode 100644
index 0000000..443d1fe
--- /dev/null
+++ b/dc_rest/models/create_application_emoji_request.py
@@ -0,0 +1,129 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateApplicationEmojiRequest(BaseModel):
+ """
+ CreateApplicationEmojiRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=2, strict=True, max_length=32)]
+ image: StrictStr
+ __properties: ClassVar[List[str]] = ["name", "image"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateApplicationEmojiRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateApplicationEmojiRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateApplicationEmojiRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "image": obj.get("image")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_auto_moderation_rule200_response.py b/dc_rest/models/create_auto_moderation_rule200_response.py
new file mode 100644
index 0000000..10b3ef3
--- /dev/null
+++ b/dc_rest/models/create_auto_moderation_rule200_response.py
@@ -0,0 +1,213 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.default_keyword_rule_response import DefaultKeywordRuleResponse
+from dc_rest.models.keyword_rule_response import KeywordRuleResponse
+from dc_rest.models.mention_spam_rule_response import MentionSpamRuleResponse
+from dc_rest.models.ml_spam_rule_response import MLSpamRuleResponse
+from dc_rest.models.spam_link_rule_response import SpamLinkRuleResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+CREATEAUTOMODERATIONRULE200RESPONSE_ONE_OF_SCHEMAS = ["DefaultKeywordRuleResponse", "KeywordRuleResponse", "MLSpamRuleResponse", "MentionSpamRuleResponse", "SpamLinkRuleResponse"]
+
+class CreateAutoModerationRule200Response(BaseModel):
+ """
+ CreateAutoModerationRule200Response
+ """
+ # data type: DefaultKeywordRuleResponse
+ oneof_schema_1_validator: Optional[DefaultKeywordRuleResponse] = None
+ # data type: KeywordRuleResponse
+ oneof_schema_2_validator: Optional[KeywordRuleResponse] = None
+ # data type: MLSpamRuleResponse
+ oneof_schema_3_validator: Optional[MLSpamRuleResponse] = None
+ # data type: MentionSpamRuleResponse
+ oneof_schema_4_validator: Optional[MentionSpamRuleResponse] = None
+ # data type: SpamLinkRuleResponse
+ oneof_schema_5_validator: Optional[SpamLinkRuleResponse] = None
+ actual_instance: Optional[Union[DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse]] = None
+ one_of_schemas: Set[str] = { "DefaultKeywordRuleResponse", "KeywordRuleResponse", "MLSpamRuleResponse", "MentionSpamRuleResponse", "SpamLinkRuleResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = CreateAutoModerationRule200Response.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: DefaultKeywordRuleResponse
+ if not isinstance(v, DefaultKeywordRuleResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultKeywordRuleResponse`")
+ else:
+ match += 1
+ # validate data type: KeywordRuleResponse
+ if not isinstance(v, KeywordRuleResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `KeywordRuleResponse`")
+ else:
+ match += 1
+ # validate data type: MLSpamRuleResponse
+ if not isinstance(v, MLSpamRuleResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MLSpamRuleResponse`")
+ else:
+ match += 1
+ # validate data type: MentionSpamRuleResponse
+ if not isinstance(v, MentionSpamRuleResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MentionSpamRuleResponse`")
+ else:
+ match += 1
+ # validate data type: SpamLinkRuleResponse
+ if not isinstance(v, SpamLinkRuleResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SpamLinkRuleResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in CreateAutoModerationRule200Response with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in CreateAutoModerationRule200Response with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into DefaultKeywordRuleResponse
+ try:
+ instance.actual_instance = DefaultKeywordRuleResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into KeywordRuleResponse
+ try:
+ instance.actual_instance = KeywordRuleResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MLSpamRuleResponse
+ try:
+ instance.actual_instance = MLSpamRuleResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MentionSpamRuleResponse
+ try:
+ instance.actual_instance = MentionSpamRuleResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SpamLinkRuleResponse
+ try:
+ instance.actual_instance = SpamLinkRuleResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into CreateAutoModerationRule200Response with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into CreateAutoModerationRule200Response with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/create_auto_moderation_rule_request.py b/dc_rest/models/create_auto_moderation_rule_request.py
new file mode 100644
index 0000000..b70fbfe
--- /dev/null
+++ b/dc_rest/models/create_auto_moderation_rule_request.py
@@ -0,0 +1,199 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.default_keyword_list_upsert_request import DefaultKeywordListUpsertRequest
+from dc_rest.models.keyword_upsert_request import KeywordUpsertRequest
+from dc_rest.models.mention_spam_upsert_request import MentionSpamUpsertRequest
+from dc_rest.models.ml_spam_upsert_request import MLSpamUpsertRequest
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+CREATEAUTOMODERATIONRULEREQUEST_ONE_OF_SCHEMAS = ["DefaultKeywordListUpsertRequest", "KeywordUpsertRequest", "MLSpamUpsertRequest", "MentionSpamUpsertRequest"]
+
+class CreateAutoModerationRuleRequest(BaseModel):
+ """
+ CreateAutoModerationRuleRequest
+ """
+ # data type: DefaultKeywordListUpsertRequest
+ oneof_schema_1_validator: Optional[DefaultKeywordListUpsertRequest] = None
+ # data type: KeywordUpsertRequest
+ oneof_schema_2_validator: Optional[KeywordUpsertRequest] = None
+ # data type: MLSpamUpsertRequest
+ oneof_schema_3_validator: Optional[MLSpamUpsertRequest] = None
+ # data type: MentionSpamUpsertRequest
+ oneof_schema_4_validator: Optional[MentionSpamUpsertRequest] = None
+ actual_instance: Optional[Union[DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest]] = None
+ one_of_schemas: Set[str] = { "DefaultKeywordListUpsertRequest", "KeywordUpsertRequest", "MLSpamUpsertRequest", "MentionSpamUpsertRequest" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = CreateAutoModerationRuleRequest.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: DefaultKeywordListUpsertRequest
+ if not isinstance(v, DefaultKeywordListUpsertRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultKeywordListUpsertRequest`")
+ else:
+ match += 1
+ # validate data type: KeywordUpsertRequest
+ if not isinstance(v, KeywordUpsertRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `KeywordUpsertRequest`")
+ else:
+ match += 1
+ # validate data type: MLSpamUpsertRequest
+ if not isinstance(v, MLSpamUpsertRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MLSpamUpsertRequest`")
+ else:
+ match += 1
+ # validate data type: MentionSpamUpsertRequest
+ if not isinstance(v, MentionSpamUpsertRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MentionSpamUpsertRequest`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in CreateAutoModerationRuleRequest with oneOf schemas: DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in CreateAutoModerationRuleRequest with oneOf schemas: DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into DefaultKeywordListUpsertRequest
+ try:
+ instance.actual_instance = DefaultKeywordListUpsertRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into KeywordUpsertRequest
+ try:
+ instance.actual_instance = KeywordUpsertRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MLSpamUpsertRequest
+ try:
+ instance.actual_instance = MLSpamUpsertRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MentionSpamUpsertRequest
+ try:
+ instance.actual_instance = MentionSpamUpsertRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into CreateAutoModerationRuleRequest with oneOf schemas: DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into CreateAutoModerationRuleRequest with oneOf schemas: DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/create_channel_invite_request.py b/dc_rest/models/create_channel_invite_request.py
new file mode 100644
index 0000000..13d3db5
--- /dev/null
+++ b/dc_rest/models/create_channel_invite_request.py
@@ -0,0 +1,168 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+from inspect import getfullargspec
+import json
+import pprint
+import re # noqa: F401
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Optional
+from dc_rest.models.create_group_dm_invite_request import CreateGroupDMInviteRequest
+from dc_rest.models.create_guild_invite_request import CreateGuildInviteRequest
+from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
+from typing_extensions import Literal, Self
+from pydantic import Field
+
+CREATECHANNELINVITEREQUEST_ANY_OF_SCHEMAS = ["CreateGroupDMInviteRequest", "CreateGuildInviteRequest"]
+
+class CreateChannelInviteRequest(BaseModel):
+ """
+ CreateChannelInviteRequest
+ """
+
+ # data type: CreateGroupDMInviteRequest
+ anyof_schema_1_validator: Optional[CreateGroupDMInviteRequest] = None
+ # data type: CreateGuildInviteRequest
+ anyof_schema_2_validator: Optional[CreateGuildInviteRequest] = None
+ if TYPE_CHECKING:
+ actual_instance: Optional[Union[CreateGroupDMInviteRequest, CreateGuildInviteRequest]] = None
+ else:
+ actual_instance: Any = None
+ any_of_schemas: Set[str] = { "CreateGroupDMInviteRequest", "CreateGuildInviteRequest" }
+
+ model_config = {
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_anyof(cls, v):
+ instance = CreateChannelInviteRequest.model_construct()
+ error_messages = []
+ # validate data type: CreateGroupDMInviteRequest
+ if not isinstance(v, CreateGroupDMInviteRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CreateGroupDMInviteRequest`")
+ else:
+ return v
+
+ # validate data type: CreateGuildInviteRequest
+ if not isinstance(v, CreateGuildInviteRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CreateGuildInviteRequest`")
+ else:
+ return v
+
+ if error_messages:
+ # no match
+ raise ValueError("No match found when setting the actual_instance in CreateChannelInviteRequest with anyOf schemas: CreateGroupDMInviteRequest, CreateGuildInviteRequest. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Dict[str, Any]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ # anyof_schema_1_validator: Optional[CreateGroupDMInviteRequest] = None
+ try:
+ instance.actual_instance = CreateGroupDMInviteRequest.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # anyof_schema_2_validator: Optional[CreateGuildInviteRequest] = None
+ try:
+ instance.actual_instance = CreateGuildInviteRequest.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if error_messages:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into CreateChannelInviteRequest with anyOf schemas: CreateGroupDMInviteRequest, CreateGuildInviteRequest. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], CreateGroupDMInviteRequest, CreateGuildInviteRequest]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/create_entitlement_request_data.py b/dc_rest/models/create_entitlement_request_data.py
new file mode 100644
index 0000000..58df64a
--- /dev/null
+++ b/dc_rest/models/create_entitlement_request_data.py
@@ -0,0 +1,145 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateEntitlementRequestData(BaseModel):
+ """
+ CreateEntitlementRequestData
+ """ # noqa: E501
+ sku_id: Annotated[str, Field(strict=True)]
+ owner_id: Annotated[str, Field(strict=True)]
+ owner_type: StrictInt
+ __properties: ClassVar[List[str]] = ["sku_id", "owner_id", "owner_type"]
+
+ @field_validator('sku_id')
+ def sku_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('owner_id')
+ def owner_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateEntitlementRequestData from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateEntitlementRequestData from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateEntitlementRequestData) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "sku_id": obj.get("sku_id"),
+ "owner_id": obj.get("owner_id"),
+ "owner_type": obj.get("owner_type")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_forum_thread_request.py b/dc_rest/models/create_forum_thread_request.py
new file mode 100644
index 0000000..b43eb24
--- /dev/null
+++ b/dc_rest/models/create_forum_thread_request.py
@@ -0,0 +1,149 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.base_create_message_create_request import BaseCreateMessageCreateRequest
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateForumThreadRequest(BaseModel):
+ """
+ CreateForumThreadRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ auto_archive_duration: Optional[StrictInt] = None
+ rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None
+ applied_tags: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=5)]] = None
+ message: BaseCreateMessageCreateRequest
+ __properties: ClassVar[List[str]] = ["name", "auto_archive_duration", "rate_limit_per_user", "applied_tags", "message"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateForumThreadRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of message
+ if self.message:
+ _dict['message'] = self.message.to_dict()
+ # set to None if rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set:
+ _dict['rate_limit_per_user'] = None
+
+ # set to None if applied_tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.applied_tags is None and "applied_tags" in self.model_fields_set:
+ _dict['applied_tags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateForumThreadRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateForumThreadRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "auto_archive_duration": obj.get("auto_archive_duration"),
+ "rate_limit_per_user": obj.get("rate_limit_per_user"),
+ "applied_tags": obj.get("applied_tags"),
+ "message": BaseCreateMessageCreateRequest.from_dict(obj["message"]) if obj.get("message") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_group_dm_invite_request.py b/dc_rest/models/create_group_dm_invite_request.py
new file mode 100644
index 0000000..4a8948b
--- /dev/null
+++ b/dc_rest/models/create_group_dm_invite_request.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGroupDMInviteRequest(BaseModel):
+ """
+ CreateGroupDMInviteRequest
+ """ # noqa: E501
+ max_age: Optional[Annotated[int, Field(le=604800, strict=True, ge=1)]] = None
+ __properties: ClassVar[List[str]] = ["max_age"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateGroupDMInviteRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if max_age (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_age is None and "max_age" in self.model_fields_set:
+ _dict['max_age'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateGroupDMInviteRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateGroupDMInviteRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "max_age": obj.get("max_age")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_guild_channel_request.py b/dc_rest/models/create_guild_channel_request.py
new file mode 100644
index 0000000..82a88aa
--- /dev/null
+++ b/dc_rest/models/create_guild_channel_request.py
@@ -0,0 +1,253 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest
+from dc_rest.models.create_or_update_thread_tag_request import CreateOrUpdateThreadTagRequest
+from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGuildChannelRequest(BaseModel):
+ """
+ CreateGuildChannelRequest
+ """ # noqa: E501
+ type: Optional[StrictInt] = None
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ position: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
+ topic: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=4096)]] = None
+ bitrate: Optional[Annotated[int, Field(strict=True, ge=8000)]] = None
+ user_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
+ nsfw: Optional[StrictBool] = None
+ rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None
+ parent_id: Optional[Annotated[str, Field(strict=True)]] = None
+ permission_overwrites: Optional[Annotated[List[ChannelPermissionOverwriteRequest], Field(max_length=100)]] = None
+ rtc_region: Optional[StrictStr] = None
+ video_quality_mode: Optional[StrictInt] = None
+ default_auto_archive_duration: Optional[StrictInt] = None
+ default_reaction_emoji: Optional[UpdateDefaultReactionEmojiRequest] = None
+ default_thread_rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None
+ default_sort_order: Optional[StrictInt] = None
+ default_forum_layout: Optional[StrictInt] = None
+ default_tag_setting: Optional[StrictStr] = None
+ available_tags: Optional[Annotated[List[Optional[CreateOrUpdateThreadTagRequest]], Field(max_length=20)]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "position", "topic", "bitrate", "user_limit", "nsfw", "rate_limit_per_user", "parent_id", "permission_overwrites", "rtc_region", "video_quality_mode", "default_auto_archive_duration", "default_reaction_emoji", "default_thread_rate_limit_per_user", "default_sort_order", "default_forum_layout", "default_tag_setting", "available_tags"]
+
+ @field_validator('parent_id')
+ def parent_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateGuildChannelRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in permission_overwrites (list)
+ _items = []
+ if self.permission_overwrites:
+ for _item_permission_overwrites in self.permission_overwrites:
+ if _item_permission_overwrites:
+ _items.append(_item_permission_overwrites.to_dict())
+ _dict['permission_overwrites'] = _items
+ # override the default output from pydantic by calling `to_dict()` of default_reaction_emoji
+ if self.default_reaction_emoji:
+ _dict['default_reaction_emoji'] = self.default_reaction_emoji.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in available_tags (list)
+ _items = []
+ if self.available_tags:
+ for _item_available_tags in self.available_tags:
+ if _item_available_tags:
+ _items.append(_item_available_tags.to_dict())
+ _dict['available_tags'] = _items
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if position (nullable) is None
+ # and model_fields_set contains the field
+ if self.position is None and "position" in self.model_fields_set:
+ _dict['position'] = None
+
+ # set to None if topic (nullable) is None
+ # and model_fields_set contains the field
+ if self.topic is None and "topic" in self.model_fields_set:
+ _dict['topic'] = None
+
+ # set to None if bitrate (nullable) is None
+ # and model_fields_set contains the field
+ if self.bitrate is None and "bitrate" in self.model_fields_set:
+ _dict['bitrate'] = None
+
+ # set to None if user_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.user_limit is None and "user_limit" in self.model_fields_set:
+ _dict['user_limit'] = None
+
+ # set to None if nsfw (nullable) is None
+ # and model_fields_set contains the field
+ if self.nsfw is None and "nsfw" in self.model_fields_set:
+ _dict['nsfw'] = None
+
+ # set to None if rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set:
+ _dict['rate_limit_per_user'] = None
+
+ # set to None if permission_overwrites (nullable) is None
+ # and model_fields_set contains the field
+ if self.permission_overwrites is None and "permission_overwrites" in self.model_fields_set:
+ _dict['permission_overwrites'] = None
+
+ # set to None if rtc_region (nullable) is None
+ # and model_fields_set contains the field
+ if self.rtc_region is None and "rtc_region" in self.model_fields_set:
+ _dict['rtc_region'] = None
+
+ # set to None if default_reaction_emoji (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_reaction_emoji is None and "default_reaction_emoji" in self.model_fields_set:
+ _dict['default_reaction_emoji'] = None
+
+ # set to None if default_thread_rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_thread_rate_limit_per_user is None and "default_thread_rate_limit_per_user" in self.model_fields_set:
+ _dict['default_thread_rate_limit_per_user'] = None
+
+ # set to None if available_tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.available_tags is None and "available_tags" in self.model_fields_set:
+ _dict['available_tags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateGuildChannelRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateGuildChannelRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "position": obj.get("position"),
+ "topic": obj.get("topic"),
+ "bitrate": obj.get("bitrate"),
+ "user_limit": obj.get("user_limit"),
+ "nsfw": obj.get("nsfw"),
+ "rate_limit_per_user": obj.get("rate_limit_per_user"),
+ "parent_id": obj.get("parent_id"),
+ "permission_overwrites": [ChannelPermissionOverwriteRequest.from_dict(_item) for _item in obj["permission_overwrites"]] if obj.get("permission_overwrites") is not None else None,
+ "rtc_region": obj.get("rtc_region"),
+ "video_quality_mode": obj.get("video_quality_mode"),
+ "default_auto_archive_duration": obj.get("default_auto_archive_duration"),
+ "default_reaction_emoji": UpdateDefaultReactionEmojiRequest.from_dict(obj["default_reaction_emoji"]) if obj.get("default_reaction_emoji") is not None else None,
+ "default_thread_rate_limit_per_user": obj.get("default_thread_rate_limit_per_user"),
+ "default_sort_order": obj.get("default_sort_order"),
+ "default_forum_layout": obj.get("default_forum_layout"),
+ "default_tag_setting": obj.get("default_tag_setting"),
+ "available_tags": [CreateOrUpdateThreadTagRequest.from_dict(_item) for _item in obj["available_tags"]] if obj.get("available_tags") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_guild_emoji_request.py b/dc_rest/models/create_guild_emoji_request.py
new file mode 100644
index 0000000..d55e6e5
--- /dev/null
+++ b/dc_rest/models/create_guild_emoji_request.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGuildEmojiRequest(BaseModel):
+ """
+ CreateGuildEmojiRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=2, strict=True, max_length=32)]
+ image: StrictStr
+ roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=1521)]] = None
+ __properties: ClassVar[List[str]] = ["name", "image", "roles"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateGuildEmojiRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if roles (nullable) is None
+ # and model_fields_set contains the field
+ if self.roles is None and "roles" in self.model_fields_set:
+ _dict['roles'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateGuildEmojiRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateGuildEmojiRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "image": obj.get("image"),
+ "roles": obj.get("roles")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_guild_from_template_request.py b/dc_rest/models/create_guild_from_template_request.py
new file mode 100644
index 0000000..c9bf8a9
--- /dev/null
+++ b/dc_rest/models/create_guild_from_template_request.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGuildFromTemplateRequest(BaseModel):
+ """
+ CreateGuildFromTemplateRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=2, strict=True, max_length=100)]
+ icon: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["name", "icon"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateGuildFromTemplateRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateGuildFromTemplateRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateGuildFromTemplateRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "icon": obj.get("icon")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_guild_invite_request.py b/dc_rest/models/create_guild_invite_request.py
new file mode 100644
index 0000000..134a303
--- /dev/null
+++ b/dc_rest/models/create_guild_invite_request.py
@@ -0,0 +1,184 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGuildInviteRequest(BaseModel):
+ """
+ CreateGuildInviteRequest
+ """ # noqa: E501
+ max_age: Optional[Annotated[int, Field(le=604800, strict=True, ge=0)]] = None
+ temporary: Optional[StrictBool] = None
+ max_uses: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = None
+ unique: Optional[StrictBool] = None
+ target_user_id: Optional[Annotated[str, Field(strict=True)]] = None
+ target_application_id: Optional[Annotated[str, Field(strict=True)]] = None
+ target_type: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["max_age", "temporary", "max_uses", "unique", "target_user_id", "target_application_id", "target_type"]
+
+ @field_validator('target_user_id')
+ def target_user_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('target_application_id')
+ def target_application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateGuildInviteRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if max_age (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_age is None and "max_age" in self.model_fields_set:
+ _dict['max_age'] = None
+
+ # set to None if temporary (nullable) is None
+ # and model_fields_set contains the field
+ if self.temporary is None and "temporary" in self.model_fields_set:
+ _dict['temporary'] = None
+
+ # set to None if max_uses (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_uses is None and "max_uses" in self.model_fields_set:
+ _dict['max_uses'] = None
+
+ # set to None if unique (nullable) is None
+ # and model_fields_set contains the field
+ if self.unique is None and "unique" in self.model_fields_set:
+ _dict['unique'] = None
+
+ # set to None if target_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_type is None and "target_type" in self.model_fields_set:
+ _dict['target_type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateGuildInviteRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateGuildInviteRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "max_age": obj.get("max_age"),
+ "temporary": obj.get("temporary"),
+ "max_uses": obj.get("max_uses"),
+ "unique": obj.get("unique"),
+ "target_user_id": obj.get("target_user_id"),
+ "target_application_id": obj.get("target_application_id"),
+ "target_type": obj.get("target_type")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_guild_request_channel_item.py b/dc_rest/models/create_guild_request_channel_item.py
new file mode 100644
index 0000000..b08bff9
--- /dev/null
+++ b/dc_rest/models/create_guild_request_channel_item.py
@@ -0,0 +1,265 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest
+from dc_rest.models.create_or_update_thread_tag_request import CreateOrUpdateThreadTagRequest
+from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGuildRequestChannelItem(BaseModel):
+ """
+ CreateGuildRequestChannelItem
+ """ # noqa: E501
+ type: Optional[StrictInt] = None
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ position: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
+ topic: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=4096)]] = None
+ bitrate: Optional[Annotated[int, Field(strict=True, ge=8000)]] = None
+ user_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
+ nsfw: Optional[StrictBool] = None
+ rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None
+ parent_id: Optional[Annotated[str, Field(strict=True)]] = None
+ permission_overwrites: Optional[Annotated[List[ChannelPermissionOverwriteRequest], Field(max_length=100)]] = None
+ rtc_region: Optional[StrictStr] = None
+ video_quality_mode: Optional[StrictInt] = None
+ default_auto_archive_duration: Optional[StrictInt] = None
+ default_reaction_emoji: Optional[UpdateDefaultReactionEmojiRequest] = None
+ default_thread_rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None
+ default_sort_order: Optional[StrictInt] = None
+ default_forum_layout: Optional[StrictInt] = None
+ default_tag_setting: Optional[StrictStr] = None
+ id: Optional[Annotated[str, Field(strict=True)]] = None
+ available_tags: Optional[Annotated[List[CreateOrUpdateThreadTagRequest], Field(max_length=20)]] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "position", "topic", "bitrate", "user_limit", "nsfw", "rate_limit_per_user", "parent_id", "permission_overwrites", "rtc_region", "video_quality_mode", "default_auto_archive_duration", "default_reaction_emoji", "default_thread_rate_limit_per_user", "default_sort_order", "default_forum_layout", "default_tag_setting", "id", "available_tags"]
+
+ @field_validator('parent_id')
+ def parent_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateGuildRequestChannelItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in permission_overwrites (list)
+ _items = []
+ if self.permission_overwrites:
+ for _item_permission_overwrites in self.permission_overwrites:
+ if _item_permission_overwrites:
+ _items.append(_item_permission_overwrites.to_dict())
+ _dict['permission_overwrites'] = _items
+ # override the default output from pydantic by calling `to_dict()` of default_reaction_emoji
+ if self.default_reaction_emoji:
+ _dict['default_reaction_emoji'] = self.default_reaction_emoji.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in available_tags (list)
+ _items = []
+ if self.available_tags:
+ for _item_available_tags in self.available_tags:
+ if _item_available_tags:
+ _items.append(_item_available_tags.to_dict())
+ _dict['available_tags'] = _items
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if position (nullable) is None
+ # and model_fields_set contains the field
+ if self.position is None and "position" in self.model_fields_set:
+ _dict['position'] = None
+
+ # set to None if topic (nullable) is None
+ # and model_fields_set contains the field
+ if self.topic is None and "topic" in self.model_fields_set:
+ _dict['topic'] = None
+
+ # set to None if bitrate (nullable) is None
+ # and model_fields_set contains the field
+ if self.bitrate is None and "bitrate" in self.model_fields_set:
+ _dict['bitrate'] = None
+
+ # set to None if user_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.user_limit is None and "user_limit" in self.model_fields_set:
+ _dict['user_limit'] = None
+
+ # set to None if nsfw (nullable) is None
+ # and model_fields_set contains the field
+ if self.nsfw is None and "nsfw" in self.model_fields_set:
+ _dict['nsfw'] = None
+
+ # set to None if rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set:
+ _dict['rate_limit_per_user'] = None
+
+ # set to None if permission_overwrites (nullable) is None
+ # and model_fields_set contains the field
+ if self.permission_overwrites is None and "permission_overwrites" in self.model_fields_set:
+ _dict['permission_overwrites'] = None
+
+ # set to None if rtc_region (nullable) is None
+ # and model_fields_set contains the field
+ if self.rtc_region is None and "rtc_region" in self.model_fields_set:
+ _dict['rtc_region'] = None
+
+ # set to None if default_reaction_emoji (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_reaction_emoji is None and "default_reaction_emoji" in self.model_fields_set:
+ _dict['default_reaction_emoji'] = None
+
+ # set to None if default_thread_rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_thread_rate_limit_per_user is None and "default_thread_rate_limit_per_user" in self.model_fields_set:
+ _dict['default_thread_rate_limit_per_user'] = None
+
+ # set to None if available_tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.available_tags is None and "available_tags" in self.model_fields_set:
+ _dict['available_tags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateGuildRequestChannelItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateGuildRequestChannelItem) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "position": obj.get("position"),
+ "topic": obj.get("topic"),
+ "bitrate": obj.get("bitrate"),
+ "user_limit": obj.get("user_limit"),
+ "nsfw": obj.get("nsfw"),
+ "rate_limit_per_user": obj.get("rate_limit_per_user"),
+ "parent_id": obj.get("parent_id"),
+ "permission_overwrites": [ChannelPermissionOverwriteRequest.from_dict(_item) for _item in obj["permission_overwrites"]] if obj.get("permission_overwrites") is not None else None,
+ "rtc_region": obj.get("rtc_region"),
+ "video_quality_mode": obj.get("video_quality_mode"),
+ "default_auto_archive_duration": obj.get("default_auto_archive_duration"),
+ "default_reaction_emoji": UpdateDefaultReactionEmojiRequest.from_dict(obj["default_reaction_emoji"]) if obj.get("default_reaction_emoji") is not None else None,
+ "default_thread_rate_limit_per_user": obj.get("default_thread_rate_limit_per_user"),
+ "default_sort_order": obj.get("default_sort_order"),
+ "default_forum_layout": obj.get("default_forum_layout"),
+ "default_tag_setting": obj.get("default_tag_setting"),
+ "id": obj.get("id"),
+ "available_tags": [CreateOrUpdateThreadTagRequest.from_dict(_item) for _item in obj["available_tags"]] if obj.get("available_tags") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_guild_request_role_item.py b/dc_rest/models/create_guild_request_role_item.py
new file mode 100644
index 0000000..ea737ce
--- /dev/null
+++ b/dc_rest/models/create_guild_request_role_item.py
@@ -0,0 +1,169 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGuildRequestRoleItem(BaseModel):
+ """
+ CreateGuildRequestRoleItem
+ """ # noqa: E501
+ id: StrictInt
+ name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ permissions: Optional[StrictInt] = None
+ color: Optional[Annotated[int, Field(le=16777215, strict=True, ge=0)]] = None
+ hoist: Optional[StrictBool] = None
+ mentionable: Optional[StrictBool] = None
+ unicode_emoji: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "permissions", "color", "hoist", "mentionable", "unicode_emoji"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateGuildRequestRoleItem from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if permissions (nullable) is None
+ # and model_fields_set contains the field
+ if self.permissions is None and "permissions" in self.model_fields_set:
+ _dict['permissions'] = None
+
+ # set to None if color (nullable) is None
+ # and model_fields_set contains the field
+ if self.color is None and "color" in self.model_fields_set:
+ _dict['color'] = None
+
+ # set to None if hoist (nullable) is None
+ # and model_fields_set contains the field
+ if self.hoist is None and "hoist" in self.model_fields_set:
+ _dict['hoist'] = None
+
+ # set to None if mentionable (nullable) is None
+ # and model_fields_set contains the field
+ if self.mentionable is None and "mentionable" in self.model_fields_set:
+ _dict['mentionable'] = None
+
+ # set to None if unicode_emoji (nullable) is None
+ # and model_fields_set contains the field
+ if self.unicode_emoji is None and "unicode_emoji" in self.model_fields_set:
+ _dict['unicode_emoji'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateGuildRequestRoleItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateGuildRequestRoleItem) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "permissions": obj.get("permissions"),
+ "color": obj.get("color"),
+ "hoist": obj.get("hoist"),
+ "mentionable": obj.get("mentionable"),
+ "unicode_emoji": obj.get("unicode_emoji")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_guild_role_request.py b/dc_rest/models/create_guild_role_request.py
new file mode 100644
index 0000000..346a6ea
--- /dev/null
+++ b/dc_rest/models/create_guild_role_request.py
@@ -0,0 +1,174 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGuildRoleRequest(BaseModel):
+ """
+ CreateGuildRoleRequest
+ """ # noqa: E501
+ name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ permissions: Optional[StrictInt] = None
+ color: Optional[Annotated[int, Field(le=16777215, strict=True, ge=0)]] = None
+ hoist: Optional[StrictBool] = None
+ mentionable: Optional[StrictBool] = None
+ icon: Optional[StrictStr] = None
+ unicode_emoji: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ __properties: ClassVar[List[str]] = ["name", "permissions", "color", "hoist", "mentionable", "icon", "unicode_emoji"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateGuildRoleRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if permissions (nullable) is None
+ # and model_fields_set contains the field
+ if self.permissions is None and "permissions" in self.model_fields_set:
+ _dict['permissions'] = None
+
+ # set to None if color (nullable) is None
+ # and model_fields_set contains the field
+ if self.color is None and "color" in self.model_fields_set:
+ _dict['color'] = None
+
+ # set to None if hoist (nullable) is None
+ # and model_fields_set contains the field
+ if self.hoist is None and "hoist" in self.model_fields_set:
+ _dict['hoist'] = None
+
+ # set to None if mentionable (nullable) is None
+ # and model_fields_set contains the field
+ if self.mentionable is None and "mentionable" in self.model_fields_set:
+ _dict['mentionable'] = None
+
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if unicode_emoji (nullable) is None
+ # and model_fields_set contains the field
+ if self.unicode_emoji is None and "unicode_emoji" in self.model_fields_set:
+ _dict['unicode_emoji'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateGuildRoleRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateGuildRoleRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "permissions": obj.get("permissions"),
+ "color": obj.get("color"),
+ "hoist": obj.get("hoist"),
+ "mentionable": obj.get("mentionable"),
+ "icon": obj.get("icon"),
+ "unicode_emoji": obj.get("unicode_emoji")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_guild_scheduled_event_request.py b/dc_rest/models/create_guild_scheduled_event_request.py
new file mode 100644
index 0000000..299ae90
--- /dev/null
+++ b/dc_rest/models/create_guild_scheduled_event_request.py
@@ -0,0 +1,185 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.external_scheduled_event_create_request import ExternalScheduledEventCreateRequest
+from dc_rest.models.stage_scheduled_event_create_request import StageScheduledEventCreateRequest
+from dc_rest.models.voice_scheduled_event_create_request import VoiceScheduledEventCreateRequest
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+CREATEGUILDSCHEDULEDEVENTREQUEST_ONE_OF_SCHEMAS = ["ExternalScheduledEventCreateRequest", "StageScheduledEventCreateRequest", "VoiceScheduledEventCreateRequest"]
+
+class CreateGuildScheduledEventRequest(BaseModel):
+ """
+ CreateGuildScheduledEventRequest
+ """
+ # data type: ExternalScheduledEventCreateRequest
+ oneof_schema_1_validator: Optional[ExternalScheduledEventCreateRequest] = None
+ # data type: StageScheduledEventCreateRequest
+ oneof_schema_2_validator: Optional[StageScheduledEventCreateRequest] = None
+ # data type: VoiceScheduledEventCreateRequest
+ oneof_schema_3_validator: Optional[VoiceScheduledEventCreateRequest] = None
+ actual_instance: Optional[Union[ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest]] = None
+ one_of_schemas: Set[str] = { "ExternalScheduledEventCreateRequest", "StageScheduledEventCreateRequest", "VoiceScheduledEventCreateRequest" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = CreateGuildScheduledEventRequest.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: ExternalScheduledEventCreateRequest
+ if not isinstance(v, ExternalScheduledEventCreateRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ExternalScheduledEventCreateRequest`")
+ else:
+ match += 1
+ # validate data type: StageScheduledEventCreateRequest
+ if not isinstance(v, StageScheduledEventCreateRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `StageScheduledEventCreateRequest`")
+ else:
+ match += 1
+ # validate data type: VoiceScheduledEventCreateRequest
+ if not isinstance(v, VoiceScheduledEventCreateRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `VoiceScheduledEventCreateRequest`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in CreateGuildScheduledEventRequest with oneOf schemas: ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in CreateGuildScheduledEventRequest with oneOf schemas: ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into ExternalScheduledEventCreateRequest
+ try:
+ instance.actual_instance = ExternalScheduledEventCreateRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into StageScheduledEventCreateRequest
+ try:
+ instance.actual_instance = StageScheduledEventCreateRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into VoiceScheduledEventCreateRequest
+ try:
+ instance.actual_instance = VoiceScheduledEventCreateRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into CreateGuildScheduledEventRequest with oneOf schemas: ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into CreateGuildScheduledEventRequest with oneOf schemas: ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/create_guild_template_request.py b/dc_rest/models/create_guild_template_request.py
new file mode 100644
index 0000000..625288d
--- /dev/null
+++ b/dc_rest/models/create_guild_template_request.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGuildTemplateRequest(BaseModel):
+ """
+ CreateGuildTemplateRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ description: Optional[Annotated[str, Field(strict=True, max_length=120)]] = None
+ __properties: ClassVar[List[str]] = ["name", "description"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateGuildTemplateRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateGuildTemplateRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateGuildTemplateRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "description": obj.get("description")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_interaction_response_request.py b/dc_rest/models/create_interaction_response_request.py
new file mode 100644
index 0000000..596e342
--- /dev/null
+++ b/dc_rest/models/create_interaction_response_request.py
@@ -0,0 +1,228 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+from inspect import getfullargspec
+import json
+import pprint
+import re # noqa: F401
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Optional
+from dc_rest.models.application_command_autocomplete_callback_request import ApplicationCommandAutocompleteCallbackRequest
+from dc_rest.models.create_message_interaction_callback_request import CreateMessageInteractionCallbackRequest
+from dc_rest.models.launch_activity_interaction_callback_request import LaunchActivityInteractionCallbackRequest
+from dc_rest.models.modal_interaction_callback_request import ModalInteractionCallbackRequest
+from dc_rest.models.pong_interaction_callback_request import PongInteractionCallbackRequest
+from dc_rest.models.update_message_interaction_callback_request import UpdateMessageInteractionCallbackRequest
+from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
+from typing_extensions import Literal, Self
+from pydantic import Field
+
+CREATEINTERACTIONRESPONSEREQUEST_ANY_OF_SCHEMAS = ["ApplicationCommandAutocompleteCallbackRequest", "CreateMessageInteractionCallbackRequest", "LaunchActivityInteractionCallbackRequest", "ModalInteractionCallbackRequest", "PongInteractionCallbackRequest", "UpdateMessageInteractionCallbackRequest"]
+
+class CreateInteractionResponseRequest(BaseModel):
+ """
+ CreateInteractionResponseRequest
+ """
+
+ # data type: ApplicationCommandAutocompleteCallbackRequest
+ anyof_schema_1_validator: Optional[ApplicationCommandAutocompleteCallbackRequest] = None
+ # data type: CreateMessageInteractionCallbackRequest
+ anyof_schema_2_validator: Optional[CreateMessageInteractionCallbackRequest] = None
+ # data type: LaunchActivityInteractionCallbackRequest
+ anyof_schema_3_validator: Optional[LaunchActivityInteractionCallbackRequest] = None
+ # data type: ModalInteractionCallbackRequest
+ anyof_schema_4_validator: Optional[ModalInteractionCallbackRequest] = None
+ # data type: PongInteractionCallbackRequest
+ anyof_schema_5_validator: Optional[PongInteractionCallbackRequest] = None
+ # data type: UpdateMessageInteractionCallbackRequest
+ anyof_schema_6_validator: Optional[UpdateMessageInteractionCallbackRequest] = None
+ if TYPE_CHECKING:
+ actual_instance: Optional[Union[ApplicationCommandAutocompleteCallbackRequest, CreateMessageInteractionCallbackRequest, LaunchActivityInteractionCallbackRequest, ModalInteractionCallbackRequest, PongInteractionCallbackRequest, UpdateMessageInteractionCallbackRequest]] = None
+ else:
+ actual_instance: Any = None
+ any_of_schemas: Set[str] = { "ApplicationCommandAutocompleteCallbackRequest", "CreateMessageInteractionCallbackRequest", "LaunchActivityInteractionCallbackRequest", "ModalInteractionCallbackRequest", "PongInteractionCallbackRequest", "UpdateMessageInteractionCallbackRequest" }
+
+ model_config = {
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_anyof(cls, v):
+ instance = CreateInteractionResponseRequest.model_construct()
+ error_messages = []
+ # validate data type: ApplicationCommandAutocompleteCallbackRequest
+ if not isinstance(v, ApplicationCommandAutocompleteCallbackRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandAutocompleteCallbackRequest`")
+ else:
+ return v
+
+ # validate data type: CreateMessageInteractionCallbackRequest
+ if not isinstance(v, CreateMessageInteractionCallbackRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CreateMessageInteractionCallbackRequest`")
+ else:
+ return v
+
+ # validate data type: LaunchActivityInteractionCallbackRequest
+ if not isinstance(v, LaunchActivityInteractionCallbackRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `LaunchActivityInteractionCallbackRequest`")
+ else:
+ return v
+
+ # validate data type: ModalInteractionCallbackRequest
+ if not isinstance(v, ModalInteractionCallbackRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ModalInteractionCallbackRequest`")
+ else:
+ return v
+
+ # validate data type: PongInteractionCallbackRequest
+ if not isinstance(v, PongInteractionCallbackRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PongInteractionCallbackRequest`")
+ else:
+ return v
+
+ # validate data type: UpdateMessageInteractionCallbackRequest
+ if not isinstance(v, UpdateMessageInteractionCallbackRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `UpdateMessageInteractionCallbackRequest`")
+ else:
+ return v
+
+ if error_messages:
+ # no match
+ raise ValueError("No match found when setting the actual_instance in CreateInteractionResponseRequest with anyOf schemas: ApplicationCommandAutocompleteCallbackRequest, CreateMessageInteractionCallbackRequest, LaunchActivityInteractionCallbackRequest, ModalInteractionCallbackRequest, PongInteractionCallbackRequest, UpdateMessageInteractionCallbackRequest. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Dict[str, Any]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ # anyof_schema_1_validator: Optional[ApplicationCommandAutocompleteCallbackRequest] = None
+ try:
+ instance.actual_instance = ApplicationCommandAutocompleteCallbackRequest.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # anyof_schema_2_validator: Optional[CreateMessageInteractionCallbackRequest] = None
+ try:
+ instance.actual_instance = CreateMessageInteractionCallbackRequest.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # anyof_schema_3_validator: Optional[LaunchActivityInteractionCallbackRequest] = None
+ try:
+ instance.actual_instance = LaunchActivityInteractionCallbackRequest.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # anyof_schema_4_validator: Optional[ModalInteractionCallbackRequest] = None
+ try:
+ instance.actual_instance = ModalInteractionCallbackRequest.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # anyof_schema_5_validator: Optional[PongInteractionCallbackRequest] = None
+ try:
+ instance.actual_instance = PongInteractionCallbackRequest.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # anyof_schema_6_validator: Optional[UpdateMessageInteractionCallbackRequest] = None
+ try:
+ instance.actual_instance = UpdateMessageInteractionCallbackRequest.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if error_messages:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into CreateInteractionResponseRequest with anyOf schemas: ApplicationCommandAutocompleteCallbackRequest, CreateMessageInteractionCallbackRequest, LaunchActivityInteractionCallbackRequest, ModalInteractionCallbackRequest, PongInteractionCallbackRequest, UpdateMessageInteractionCallbackRequest. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandAutocompleteCallbackRequest, CreateMessageInteractionCallbackRequest, LaunchActivityInteractionCallbackRequest, ModalInteractionCallbackRequest, PongInteractionCallbackRequest, UpdateMessageInteractionCallbackRequest]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/create_lobby_request.py b/dc_rest/models/create_lobby_request.py
new file mode 100644
index 0000000..ea04f3d
--- /dev/null
+++ b/dc_rest/models/create_lobby_request.py
@@ -0,0 +1,149 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.lobby_member_request import LobbyMemberRequest
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateLobbyRequest(BaseModel):
+ """
+ CreateLobbyRequest
+ """ # noqa: E501
+ idle_timeout_seconds: Optional[Annotated[int, Field(le=604800, strict=True, ge=5)]] = None
+ members: Optional[Annotated[List[LobbyMemberRequest], Field(max_length=25)]] = None
+ metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None
+ __properties: ClassVar[List[str]] = ["idle_timeout_seconds", "members", "metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateLobbyRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in members (list)
+ _items = []
+ if self.members:
+ for _item_members in self.members:
+ if _item_members:
+ _items.append(_item_members.to_dict())
+ _dict['members'] = _items
+ # set to None if idle_timeout_seconds (nullable) is None
+ # and model_fields_set contains the field
+ if self.idle_timeout_seconds is None and "idle_timeout_seconds" in self.model_fields_set:
+ _dict['idle_timeout_seconds'] = None
+
+ # set to None if members (nullable) is None
+ # and model_fields_set contains the field
+ if self.members is None and "members" in self.model_fields_set:
+ _dict['members'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateLobbyRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateLobbyRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "idle_timeout_seconds": obj.get("idle_timeout_seconds"),
+ "members": [LobbyMemberRequest.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None,
+ "metadata": obj.get("metadata")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_message_interaction_callback_request.py b/dc_rest/models/create_message_interaction_callback_request.py
new file mode 100644
index 0000000..b0bec7a
--- /dev/null
+++ b/dc_rest/models/create_message_interaction_callback_request.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.incoming_webhook_interaction_request import IncomingWebhookInteractionRequest
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateMessageInteractionCallbackRequest(BaseModel):
+ """
+ CreateMessageInteractionCallbackRequest
+ """ # noqa: E501
+ type: Optional[StrictInt]
+ data: Optional[IncomingWebhookInteractionRequest] = None
+ __properties: ClassVar[List[str]] = ["type", "data"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateMessageInteractionCallbackRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of data
+ if self.data:
+ _dict['data'] = self.data.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if data (nullable) is None
+ # and model_fields_set contains the field
+ if self.data is None and "data" in self.model_fields_set:
+ _dict['data'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateMessageInteractionCallbackRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateMessageInteractionCallbackRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "data": IncomingWebhookInteractionRequest.from_dict(obj["data"]) if obj.get("data") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_message_interaction_callback_response.py b/dc_rest/models/create_message_interaction_callback_response.py
new file mode 100644
index 0000000..579def5
--- /dev/null
+++ b/dc_rest/models/create_message_interaction_callback_response.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.message_response import MessageResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateMessageInteractionCallbackResponse(BaseModel):
+ """
+ CreateMessageInteractionCallbackResponse
+ """ # noqa: E501
+ type: Optional[StrictInt]
+ message: MessageResponse
+ __properties: ClassVar[List[str]] = ["type", "message"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateMessageInteractionCallbackResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of message
+ if self.message:
+ _dict['message'] = self.message.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateMessageInteractionCallbackResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateMessageInteractionCallbackResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "message": MessageResponse.from_dict(obj["message"]) if obj.get("message") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_or_join_lobby_request.py b/dc_rest/models/create_or_join_lobby_request.py
new file mode 100644
index 0000000..1820944
--- /dev/null
+++ b/dc_rest/models/create_or_join_lobby_request.py
@@ -0,0 +1,138 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateOrJoinLobbyRequest(BaseModel):
+ """
+ CreateOrJoinLobbyRequest
+ """ # noqa: E501
+ idle_timeout_seconds: Optional[Annotated[int, Field(le=604800, strict=True, ge=5)]] = None
+ lobby_metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None
+ member_metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None
+ secret: Annotated[str, Field(strict=True, max_length=250)]
+ __properties: ClassVar[List[str]] = ["idle_timeout_seconds", "lobby_metadata", "member_metadata", "secret"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateOrJoinLobbyRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if idle_timeout_seconds (nullable) is None
+ # and model_fields_set contains the field
+ if self.idle_timeout_seconds is None and "idle_timeout_seconds" in self.model_fields_set:
+ _dict['idle_timeout_seconds'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateOrJoinLobbyRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateOrJoinLobbyRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "idle_timeout_seconds": obj.get("idle_timeout_seconds"),
+ "lobby_metadata": obj.get("lobby_metadata"),
+ "member_metadata": obj.get("member_metadata"),
+ "secret": obj.get("secret")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_or_update_thread_tag_request.py b/dc_rest/models/create_or_update_thread_tag_request.py
new file mode 100644
index 0000000..8b075dd
--- /dev/null
+++ b/dc_rest/models/create_or_update_thread_tag_request.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateOrUpdateThreadTagRequest(BaseModel):
+ """
+ CreateOrUpdateThreadTagRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=0, strict=True, max_length=20)]
+ emoji_id: Optional[Annotated[str, Field(strict=True)]] = None
+ emoji_name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ moderated: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["name", "emoji_id", "emoji_name", "moderated"]
+
+ @field_validator('emoji_id')
+ def emoji_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateOrUpdateThreadTagRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if emoji_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.emoji_name is None and "emoji_name" in self.model_fields_set:
+ _dict['emoji_name'] = None
+
+ # set to None if moderated (nullable) is None
+ # and model_fields_set contains the field
+ if self.moderated is None and "moderated" in self.model_fields_set:
+ _dict['moderated'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateOrUpdateThreadTagRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateOrUpdateThreadTagRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "emoji_id": obj.get("emoji_id"),
+ "emoji_name": obj.get("emoji_name"),
+ "moderated": obj.get("moderated")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_private_channel_request.py b/dc_rest/models/create_private_channel_request.py
new file mode 100644
index 0000000..cdd77cb
--- /dev/null
+++ b/dc_rest/models/create_private_channel_request.py
@@ -0,0 +1,146 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreatePrivateChannelRequest(BaseModel):
+ """
+ CreatePrivateChannelRequest
+ """ # noqa: E501
+ recipient_id: Optional[Annotated[str, Field(strict=True)]] = None
+ access_tokens: Optional[Annotated[List[Annotated[str, Field(strict=True, max_length=152133)]], Field(max_length=1521)]] = None
+ nicks: Optional[Dict[str, Optional[Annotated[str, Field(strict=True, max_length=152133)]]]] = None
+ __properties: ClassVar[List[str]] = ["recipient_id", "access_tokens", "nicks"]
+
+ @field_validator('recipient_id')
+ def recipient_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreatePrivateChannelRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if access_tokens (nullable) is None
+ # and model_fields_set contains the field
+ if self.access_tokens is None and "access_tokens" in self.model_fields_set:
+ _dict['access_tokens'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreatePrivateChannelRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreatePrivateChannelRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "recipient_id": obj.get("recipient_id"),
+ "access_tokens": obj.get("access_tokens"),
+ "nicks": obj.get("nicks")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_stage_instance_request.py b/dc_rest/models/create_stage_instance_request.py
new file mode 100644
index 0000000..9e4984e
--- /dev/null
+++ b/dc_rest/models/create_stage_instance_request.py
@@ -0,0 +1,157 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateStageInstanceRequest(BaseModel):
+ """
+ CreateStageInstanceRequest
+ """ # noqa: E501
+ topic: Annotated[str, Field(min_length=1, strict=True, max_length=120)]
+ channel_id: Annotated[str, Field(strict=True)]
+ privacy_level: Optional[StrictInt] = None
+ guild_scheduled_event_id: Optional[Annotated[str, Field(strict=True)]] = None
+ send_start_notification: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["topic", "channel_id", "privacy_level", "guild_scheduled_event_id", "send_start_notification"]
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_scheduled_event_id')
+ def guild_scheduled_event_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateStageInstanceRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if send_start_notification (nullable) is None
+ # and model_fields_set contains the field
+ if self.send_start_notification is None and "send_start_notification" in self.model_fields_set:
+ _dict['send_start_notification'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateStageInstanceRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateStageInstanceRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "topic": obj.get("topic"),
+ "channel_id": obj.get("channel_id"),
+ "privacy_level": obj.get("privacy_level"),
+ "guild_scheduled_event_id": obj.get("guild_scheduled_event_id"),
+ "send_start_notification": obj.get("send_start_notification")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_text_thread_with_message_request.py b/dc_rest/models/create_text_thread_with_message_request.py
new file mode 100644
index 0000000..3128c33
--- /dev/null
+++ b/dc_rest/models/create_text_thread_with_message_request.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateTextThreadWithMessageRequest(BaseModel):
+ """
+ CreateTextThreadWithMessageRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ auto_archive_duration: Optional[StrictInt] = None
+ rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None
+ __properties: ClassVar[List[str]] = ["name", "auto_archive_duration", "rate_limit_per_user"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateTextThreadWithMessageRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set:
+ _dict['rate_limit_per_user'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateTextThreadWithMessageRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateTextThreadWithMessageRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "auto_archive_duration": obj.get("auto_archive_duration"),
+ "rate_limit_per_user": obj.get("rate_limit_per_user")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_text_thread_without_message_request.py b/dc_rest/models/create_text_thread_without_message_request.py
new file mode 100644
index 0000000..aa93e66
--- /dev/null
+++ b/dc_rest/models/create_text_thread_without_message_request.py
@@ -0,0 +1,150 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateTextThreadWithoutMessageRequest(BaseModel):
+ """
+ CreateTextThreadWithoutMessageRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ auto_archive_duration: Optional[StrictInt] = None
+ rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None
+ type: Optional[StrictInt] = None
+ invitable: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["name", "auto_archive_duration", "rate_limit_per_user", "type", "invitable"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateTextThreadWithoutMessageRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set:
+ _dict['rate_limit_per_user'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if invitable (nullable) is None
+ # and model_fields_set contains the field
+ if self.invitable is None and "invitable" in self.model_fields_set:
+ _dict['invitable'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateTextThreadWithoutMessageRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateTextThreadWithoutMessageRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "auto_archive_duration": obj.get("auto_archive_duration"),
+ "rate_limit_per_user": obj.get("rate_limit_per_user"),
+ "type": obj.get("type"),
+ "invitable": obj.get("invitable")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/create_thread_request.py b/dc_rest/models/create_thread_request.py
new file mode 100644
index 0000000..3491398
--- /dev/null
+++ b/dc_rest/models/create_thread_request.py
@@ -0,0 +1,168 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+from inspect import getfullargspec
+import json
+import pprint
+import re # noqa: F401
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Optional
+from dc_rest.models.create_forum_thread_request import CreateForumThreadRequest
+from dc_rest.models.create_text_thread_without_message_request import CreateTextThreadWithoutMessageRequest
+from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
+from typing_extensions import Literal, Self
+from pydantic import Field
+
+CREATETHREADREQUEST_ANY_OF_SCHEMAS = ["CreateForumThreadRequest", "CreateTextThreadWithoutMessageRequest"]
+
+class CreateThreadRequest(BaseModel):
+ """
+ CreateThreadRequest
+ """
+
+ # data type: CreateForumThreadRequest
+ anyof_schema_1_validator: Optional[CreateForumThreadRequest] = None
+ # data type: CreateTextThreadWithoutMessageRequest
+ anyof_schema_2_validator: Optional[CreateTextThreadWithoutMessageRequest] = None
+ if TYPE_CHECKING:
+ actual_instance: Optional[Union[CreateForumThreadRequest, CreateTextThreadWithoutMessageRequest]] = None
+ else:
+ actual_instance: Any = None
+ any_of_schemas: Set[str] = { "CreateForumThreadRequest", "CreateTextThreadWithoutMessageRequest" }
+
+ model_config = {
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_anyof(cls, v):
+ instance = CreateThreadRequest.model_construct()
+ error_messages = []
+ # validate data type: CreateForumThreadRequest
+ if not isinstance(v, CreateForumThreadRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CreateForumThreadRequest`")
+ else:
+ return v
+
+ # validate data type: CreateTextThreadWithoutMessageRequest
+ if not isinstance(v, CreateTextThreadWithoutMessageRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CreateTextThreadWithoutMessageRequest`")
+ else:
+ return v
+
+ if error_messages:
+ # no match
+ raise ValueError("No match found when setting the actual_instance in CreateThreadRequest with anyOf schemas: CreateForumThreadRequest, CreateTextThreadWithoutMessageRequest. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Dict[str, Any]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ # anyof_schema_1_validator: Optional[CreateForumThreadRequest] = None
+ try:
+ instance.actual_instance = CreateForumThreadRequest.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # anyof_schema_2_validator: Optional[CreateTextThreadWithoutMessageRequest] = None
+ try:
+ instance.actual_instance = CreateTextThreadWithoutMessageRequest.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if error_messages:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into CreateThreadRequest with anyOf schemas: CreateForumThreadRequest, CreateTextThreadWithoutMessageRequest. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], CreateForumThreadRequest, CreateTextThreadWithoutMessageRequest]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/create_webhook_request.py b/dc_rest/models/create_webhook_request.py
new file mode 100644
index 0000000..4f2b04a
--- /dev/null
+++ b/dc_rest/models/create_webhook_request.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateWebhookRequest(BaseModel):
+ """
+ CreateWebhookRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=80)]
+ avatar: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["name", "avatar"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateWebhookRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if avatar (nullable) is None
+ # and model_fields_set contains the field
+ if self.avatar is None and "avatar" in self.model_fields_set:
+ _dict['avatar'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateWebhookRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreateWebhookRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "avatar": obj.get("avatar")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/created_thread_response.py b/dc_rest/models/created_thread_response.py
new file mode 100644
index 0000000..9440c58
--- /dev/null
+++ b/dc_rest/models/created_thread_response.py
@@ -0,0 +1,262 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.thread_member_response import ThreadMemberResponse
+from dc_rest.models.thread_metadata_response import ThreadMetadataResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreatedThreadResponse(BaseModel):
+ """
+ CreatedThreadResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ type: StrictInt
+ last_message_id: Optional[Annotated[str, Field(strict=True)]] = None
+ flags: StrictInt
+ last_pin_timestamp: Optional[datetime] = None
+ guild_id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ parent_id: Optional[Annotated[str, Field(strict=True)]] = None
+ rate_limit_per_user: Optional[StrictInt] = None
+ bitrate: Optional[StrictInt] = None
+ user_limit: Optional[StrictInt] = None
+ rtc_region: Optional[StrictStr] = None
+ video_quality_mode: Optional[StrictInt] = None
+ permissions: Optional[StrictStr] = None
+ owner_id: Annotated[str, Field(strict=True)]
+ thread_metadata: Optional[ThreadMetadataResponse] = None
+ message_count: StrictInt
+ member_count: StrictInt
+ total_message_sent: StrictInt
+ applied_tags: Optional[List[Annotated[str, Field(strict=True)]]] = None
+ member: Optional[ThreadMemberResponse] = None
+ __properties: ClassVar[List[str]] = ["id", "type", "last_message_id", "flags", "last_pin_timestamp", "guild_id", "name", "parent_id", "rate_limit_per_user", "bitrate", "user_limit", "rtc_region", "video_quality_mode", "permissions", "owner_id", "thread_metadata", "message_count", "member_count", "total_message_sent", "applied_tags", "member"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('last_message_id')
+ def last_message_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('parent_id')
+ def parent_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('owner_id')
+ def owner_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreatedThreadResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of thread_metadata
+ if self.thread_metadata:
+ _dict['thread_metadata'] = self.thread_metadata.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of member
+ if self.member:
+ _dict['member'] = self.member.to_dict()
+ # set to None if last_pin_timestamp (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_pin_timestamp is None and "last_pin_timestamp" in self.model_fields_set:
+ _dict['last_pin_timestamp'] = None
+
+ # set to None if rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set:
+ _dict['rate_limit_per_user'] = None
+
+ # set to None if bitrate (nullable) is None
+ # and model_fields_set contains the field
+ if self.bitrate is None and "bitrate" in self.model_fields_set:
+ _dict['bitrate'] = None
+
+ # set to None if user_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.user_limit is None and "user_limit" in self.model_fields_set:
+ _dict['user_limit'] = None
+
+ # set to None if rtc_region (nullable) is None
+ # and model_fields_set contains the field
+ if self.rtc_region is None and "rtc_region" in self.model_fields_set:
+ _dict['rtc_region'] = None
+
+ # set to None if permissions (nullable) is None
+ # and model_fields_set contains the field
+ if self.permissions is None and "permissions" in self.model_fields_set:
+ _dict['permissions'] = None
+
+ # set to None if thread_metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.thread_metadata is None and "thread_metadata" in self.model_fields_set:
+ _dict['thread_metadata'] = None
+
+ # set to None if applied_tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.applied_tags is None and "applied_tags" in self.model_fields_set:
+ _dict['applied_tags'] = None
+
+ # set to None if member (nullable) is None
+ # and model_fields_set contains the field
+ if self.member is None and "member" in self.model_fields_set:
+ _dict['member'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreatedThreadResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in CreatedThreadResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "last_message_id": obj.get("last_message_id"),
+ "flags": obj.get("flags"),
+ "last_pin_timestamp": obj.get("last_pin_timestamp"),
+ "guild_id": obj.get("guild_id"),
+ "name": obj.get("name"),
+ "parent_id": obj.get("parent_id"),
+ "rate_limit_per_user": obj.get("rate_limit_per_user"),
+ "bitrate": obj.get("bitrate"),
+ "user_limit": obj.get("user_limit"),
+ "rtc_region": obj.get("rtc_region"),
+ "video_quality_mode": obj.get("video_quality_mode"),
+ "permissions": obj.get("permissions"),
+ "owner_id": obj.get("owner_id"),
+ "thread_metadata": ThreadMetadataResponse.from_dict(obj["thread_metadata"]) if obj.get("thread_metadata") is not None else None,
+ "message_count": obj.get("message_count"),
+ "member_count": obj.get("member_count"),
+ "total_message_sent": obj.get("total_message_sent"),
+ "applied_tags": obj.get("applied_tags"),
+ "member": ThreadMemberResponse.from_dict(obj["member"]) if obj.get("member") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/default_keyword_list_trigger_metadata.py b/dc_rest/models/default_keyword_list_trigger_metadata.py
new file mode 100644
index 0000000..611ae34
--- /dev/null
+++ b/dc_rest/models/default_keyword_list_trigger_metadata.py
@@ -0,0 +1,139 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class DefaultKeywordListTriggerMetadata(BaseModel):
+ """
+ DefaultKeywordListTriggerMetadata
+ """ # noqa: E501
+ allow_list: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=60)]], Field(max_length=1000)]] = None
+ presets: Optional[List[StrictInt]] = None
+ __properties: ClassVar[List[str]] = ["allow_list", "presets"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of DefaultKeywordListTriggerMetadata from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if allow_list (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_list is None and "allow_list" in self.model_fields_set:
+ _dict['allow_list'] = None
+
+ # set to None if presets (nullable) is None
+ # and model_fields_set contains the field
+ if self.presets is None and "presets" in self.model_fields_set:
+ _dict['presets'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of DefaultKeywordListTriggerMetadata from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in DefaultKeywordListTriggerMetadata) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "allow_list": obj.get("allow_list"),
+ "presets": obj.get("presets")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/default_keyword_list_trigger_metadata_response.py b/dc_rest/models/default_keyword_list_trigger_metadata_response.py
new file mode 100644
index 0000000..5a8bd62
--- /dev/null
+++ b/dc_rest/models/default_keyword_list_trigger_metadata_response.py
@@ -0,0 +1,128 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class DefaultKeywordListTriggerMetadataResponse(BaseModel):
+ """
+ DefaultKeywordListTriggerMetadataResponse
+ """ # noqa: E501
+ allow_list: List[StrictStr]
+ presets: List[StrictInt]
+ __properties: ClassVar[List[str]] = ["allow_list", "presets"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of DefaultKeywordListTriggerMetadataResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of DefaultKeywordListTriggerMetadataResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in DefaultKeywordListTriggerMetadataResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "allow_list": obj.get("allow_list"),
+ "presets": obj.get("presets")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/default_keyword_list_upsert_request.py b/dc_rest/models/default_keyword_list_upsert_request.py
new file mode 100644
index 0000000..95bb679
--- /dev/null
+++ b/dc_rest/models/default_keyword_list_upsert_request.py
@@ -0,0 +1,173 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.default_keyword_list_trigger_metadata import DefaultKeywordListTriggerMetadata
+from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class DefaultKeywordListUpsertRequest(BaseModel):
+ """
+ DefaultKeywordListUpsertRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(strict=True, max_length=100)]
+ event_type: StrictInt
+ actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None
+ enabled: Optional[StrictBool] = None
+ exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None
+ exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None
+ trigger_type: StrictInt
+ trigger_metadata: DefaultKeywordListTriggerMetadata
+ __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of DefaultKeywordListUpsertRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in actions (list)
+ _items = []
+ if self.actions:
+ for _item_actions in self.actions:
+ if _item_actions:
+ _items.append(_item_actions.to_dict())
+ _dict['actions'] = _items
+ # override the default output from pydantic by calling `to_dict()` of trigger_metadata
+ if self.trigger_metadata:
+ _dict['trigger_metadata'] = self.trigger_metadata.to_dict()
+ # set to None if actions (nullable) is None
+ # and model_fields_set contains the field
+ if self.actions is None and "actions" in self.model_fields_set:
+ _dict['actions'] = None
+
+ # set to None if enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.enabled is None and "enabled" in self.model_fields_set:
+ _dict['enabled'] = None
+
+ # set to None if exempt_roles (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_roles is None and "exempt_roles" in self.model_fields_set:
+ _dict['exempt_roles'] = None
+
+ # set to None if exempt_channels (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_channels is None and "exempt_channels" in self.model_fields_set:
+ _dict['exempt_channels'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of DefaultKeywordListUpsertRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in DefaultKeywordListUpsertRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "event_type": obj.get("event_type"),
+ "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None,
+ "enabled": obj.get("enabled"),
+ "exempt_roles": obj.get("exempt_roles"),
+ "exempt_channels": obj.get("exempt_channels"),
+ "trigger_type": obj.get("trigger_type"),
+ "trigger_metadata": DefaultKeywordListTriggerMetadata.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/default_keyword_list_upsert_request_actions_inner.py b/dc_rest/models/default_keyword_list_upsert_request_actions_inner.py
new file mode 100644
index 0000000..d9196a4
--- /dev/null
+++ b/dc_rest/models/default_keyword_list_upsert_request_actions_inner.py
@@ -0,0 +1,199 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.block_message_action import BlockMessageAction
+from dc_rest.models.flag_to_channel_action import FlagToChannelAction
+from dc_rest.models.quarantine_user_action import QuarantineUserAction
+from dc_rest.models.user_communication_disabled_action import UserCommunicationDisabledAction
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+DEFAULTKEYWORDLISTUPSERTREQUESTACTIONSINNER_ONE_OF_SCHEMAS = ["BlockMessageAction", "FlagToChannelAction", "QuarantineUserAction", "UserCommunicationDisabledAction"]
+
+class DefaultKeywordListUpsertRequestActionsInner(BaseModel):
+ """
+ DefaultKeywordListUpsertRequestActionsInner
+ """
+ # data type: BlockMessageAction
+ oneof_schema_1_validator: Optional[BlockMessageAction] = None
+ # data type: FlagToChannelAction
+ oneof_schema_2_validator: Optional[FlagToChannelAction] = None
+ # data type: QuarantineUserAction
+ oneof_schema_3_validator: Optional[QuarantineUserAction] = None
+ # data type: UserCommunicationDisabledAction
+ oneof_schema_4_validator: Optional[UserCommunicationDisabledAction] = None
+ actual_instance: Optional[Union[BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction]] = None
+ one_of_schemas: Set[str] = { "BlockMessageAction", "FlagToChannelAction", "QuarantineUserAction", "UserCommunicationDisabledAction" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = DefaultKeywordListUpsertRequestActionsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: BlockMessageAction
+ if not isinstance(v, BlockMessageAction):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `BlockMessageAction`")
+ else:
+ match += 1
+ # validate data type: FlagToChannelAction
+ if not isinstance(v, FlagToChannelAction):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `FlagToChannelAction`")
+ else:
+ match += 1
+ # validate data type: QuarantineUserAction
+ if not isinstance(v, QuarantineUserAction):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `QuarantineUserAction`")
+ else:
+ match += 1
+ # validate data type: UserCommunicationDisabledAction
+ if not isinstance(v, UserCommunicationDisabledAction):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `UserCommunicationDisabledAction`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in DefaultKeywordListUpsertRequestActionsInner with oneOf schemas: BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in DefaultKeywordListUpsertRequestActionsInner with oneOf schemas: BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into BlockMessageAction
+ try:
+ instance.actual_instance = BlockMessageAction.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into FlagToChannelAction
+ try:
+ instance.actual_instance = FlagToChannelAction.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into QuarantineUserAction
+ try:
+ instance.actual_instance = QuarantineUserAction.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into UserCommunicationDisabledAction
+ try:
+ instance.actual_instance = UserCommunicationDisabledAction.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into DefaultKeywordListUpsertRequestActionsInner with oneOf schemas: BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into DefaultKeywordListUpsertRequestActionsInner with oneOf schemas: BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/default_keyword_list_upsert_request_partial.py b/dc_rest/models/default_keyword_list_upsert_request_partial.py
new file mode 100644
index 0000000..8f700ab
--- /dev/null
+++ b/dc_rest/models/default_keyword_list_upsert_request_partial.py
@@ -0,0 +1,173 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.default_keyword_list_trigger_metadata import DefaultKeywordListTriggerMetadata
+from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class DefaultKeywordListUpsertRequestPartial(BaseModel):
+ """
+ DefaultKeywordListUpsertRequestPartial
+ """ # noqa: E501
+ name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ event_type: Optional[StrictInt] = None
+ actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None
+ enabled: Optional[StrictBool] = None
+ exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None
+ exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None
+ trigger_type: Optional[StrictInt] = None
+ trigger_metadata: Optional[DefaultKeywordListTriggerMetadata] = None
+ __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of DefaultKeywordListUpsertRequestPartial from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in actions (list)
+ _items = []
+ if self.actions:
+ for _item_actions in self.actions:
+ if _item_actions:
+ _items.append(_item_actions.to_dict())
+ _dict['actions'] = _items
+ # override the default output from pydantic by calling `to_dict()` of trigger_metadata
+ if self.trigger_metadata:
+ _dict['trigger_metadata'] = self.trigger_metadata.to_dict()
+ # set to None if actions (nullable) is None
+ # and model_fields_set contains the field
+ if self.actions is None and "actions" in self.model_fields_set:
+ _dict['actions'] = None
+
+ # set to None if enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.enabled is None and "enabled" in self.model_fields_set:
+ _dict['enabled'] = None
+
+ # set to None if exempt_roles (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_roles is None and "exempt_roles" in self.model_fields_set:
+ _dict['exempt_roles'] = None
+
+ # set to None if exempt_channels (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_channels is None and "exempt_channels" in self.model_fields_set:
+ _dict['exempt_channels'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of DefaultKeywordListUpsertRequestPartial from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in DefaultKeywordListUpsertRequestPartial) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "event_type": obj.get("event_type"),
+ "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None,
+ "enabled": obj.get("enabled"),
+ "exempt_roles": obj.get("exempt_roles"),
+ "exempt_channels": obj.get("exempt_channels"),
+ "trigger_type": obj.get("trigger_type"),
+ "trigger_metadata": DefaultKeywordListTriggerMetadata.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/default_keyword_rule_response.py b/dc_rest/models/default_keyword_rule_response.py
new file mode 100644
index 0000000..7d2fe02
--- /dev/null
+++ b/dc_rest/models/default_keyword_rule_response.py
@@ -0,0 +1,195 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.default_keyword_list_trigger_metadata_response import DefaultKeywordListTriggerMetadataResponse
+from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class DefaultKeywordRuleResponse(BaseModel):
+ """
+ DefaultKeywordRuleResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ guild_id: Annotated[str, Field(strict=True)]
+ creator_id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ event_type: StrictInt
+ actions: List[DefaultKeywordRuleResponseActionsInner]
+ trigger_type: StrictInt
+ enabled: Optional[StrictBool] = None
+ exempt_roles: Optional[List[Annotated[str, Field(strict=True)]]] = None
+ exempt_channels: Optional[List[Annotated[str, Field(strict=True)]]] = None
+ trigger_metadata: DefaultKeywordListTriggerMetadataResponse
+ __properties: ClassVar[List[str]] = ["id", "guild_id", "creator_id", "name", "event_type", "actions", "trigger_type", "enabled", "exempt_roles", "exempt_channels", "trigger_metadata"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('creator_id')
+ def creator_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of DefaultKeywordRuleResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in actions (list)
+ _items = []
+ if self.actions:
+ for _item_actions in self.actions:
+ if _item_actions:
+ _items.append(_item_actions.to_dict())
+ _dict['actions'] = _items
+ # override the default output from pydantic by calling `to_dict()` of trigger_metadata
+ if self.trigger_metadata:
+ _dict['trigger_metadata'] = self.trigger_metadata.to_dict()
+ # set to None if enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.enabled is None and "enabled" in self.model_fields_set:
+ _dict['enabled'] = None
+
+ # set to None if exempt_roles (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_roles is None and "exempt_roles" in self.model_fields_set:
+ _dict['exempt_roles'] = None
+
+ # set to None if exempt_channels (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_channels is None and "exempt_channels" in self.model_fields_set:
+ _dict['exempt_channels'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of DefaultKeywordRuleResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in DefaultKeywordRuleResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "guild_id": obj.get("guild_id"),
+ "creator_id": obj.get("creator_id"),
+ "name": obj.get("name"),
+ "event_type": obj.get("event_type"),
+ "actions": [DefaultKeywordRuleResponseActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None,
+ "trigger_type": obj.get("trigger_type"),
+ "enabled": obj.get("enabled"),
+ "exempt_roles": obj.get("exempt_roles"),
+ "exempt_channels": obj.get("exempt_channels"),
+ "trigger_metadata": DefaultKeywordListTriggerMetadataResponse.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/default_keyword_rule_response_actions_inner.py b/dc_rest/models/default_keyword_rule_response_actions_inner.py
new file mode 100644
index 0000000..1390578
--- /dev/null
+++ b/dc_rest/models/default_keyword_rule_response_actions_inner.py
@@ -0,0 +1,199 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.block_message_action_response import BlockMessageActionResponse
+from dc_rest.models.flag_to_channel_action_response import FlagToChannelActionResponse
+from dc_rest.models.quarantine_user_action_response import QuarantineUserActionResponse
+from dc_rest.models.user_communication_disabled_action_response import UserCommunicationDisabledActionResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+DEFAULTKEYWORDRULERESPONSEACTIONSINNER_ONE_OF_SCHEMAS = ["BlockMessageActionResponse", "FlagToChannelActionResponse", "QuarantineUserActionResponse", "UserCommunicationDisabledActionResponse"]
+
+class DefaultKeywordRuleResponseActionsInner(BaseModel):
+ """
+ DefaultKeywordRuleResponseActionsInner
+ """
+ # data type: BlockMessageActionResponse
+ oneof_schema_1_validator: Optional[BlockMessageActionResponse] = None
+ # data type: FlagToChannelActionResponse
+ oneof_schema_2_validator: Optional[FlagToChannelActionResponse] = None
+ # data type: QuarantineUserActionResponse
+ oneof_schema_3_validator: Optional[QuarantineUserActionResponse] = None
+ # data type: UserCommunicationDisabledActionResponse
+ oneof_schema_4_validator: Optional[UserCommunicationDisabledActionResponse] = None
+ actual_instance: Optional[Union[BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse]] = None
+ one_of_schemas: Set[str] = { "BlockMessageActionResponse", "FlagToChannelActionResponse", "QuarantineUserActionResponse", "UserCommunicationDisabledActionResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = DefaultKeywordRuleResponseActionsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: BlockMessageActionResponse
+ if not isinstance(v, BlockMessageActionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `BlockMessageActionResponse`")
+ else:
+ match += 1
+ # validate data type: FlagToChannelActionResponse
+ if not isinstance(v, FlagToChannelActionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `FlagToChannelActionResponse`")
+ else:
+ match += 1
+ # validate data type: QuarantineUserActionResponse
+ if not isinstance(v, QuarantineUserActionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `QuarantineUserActionResponse`")
+ else:
+ match += 1
+ # validate data type: UserCommunicationDisabledActionResponse
+ if not isinstance(v, UserCommunicationDisabledActionResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `UserCommunicationDisabledActionResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in DefaultKeywordRuleResponseActionsInner with oneOf schemas: BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in DefaultKeywordRuleResponseActionsInner with oneOf schemas: BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into BlockMessageActionResponse
+ try:
+ instance.actual_instance = BlockMessageActionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into FlagToChannelActionResponse
+ try:
+ instance.actual_instance = FlagToChannelActionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into QuarantineUserActionResponse
+ try:
+ instance.actual_instance = QuarantineUserActionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into UserCommunicationDisabledActionResponse
+ try:
+ instance.actual_instance = UserCommunicationDisabledActionResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into DefaultKeywordRuleResponseActionsInner with oneOf schemas: BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into DefaultKeywordRuleResponseActionsInner with oneOf schemas: BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/default_reaction_emoji_response.py b/dc_rest/models/default_reaction_emoji_response.py
new file mode 100644
index 0000000..a9bf9ef
--- /dev/null
+++ b/dc_rest/models/default_reaction_emoji_response.py
@@ -0,0 +1,144 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class DefaultReactionEmojiResponse(BaseModel):
+ """
+ DefaultReactionEmojiResponse
+ """ # noqa: E501
+ emoji_id: Optional[Annotated[str, Field(strict=True)]] = None
+ emoji_name: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["emoji_id", "emoji_name"]
+
+ @field_validator('emoji_id')
+ def emoji_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of DefaultReactionEmojiResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if emoji_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.emoji_name is None and "emoji_name" in self.model_fields_set:
+ _dict['emoji_name'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of DefaultReactionEmojiResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in DefaultReactionEmojiResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "emoji_id": obj.get("emoji_id"),
+ "emoji_name": obj.get("emoji_name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/discord_integration_response.py b/dc_rest/models/discord_integration_response.py
new file mode 100644
index 0000000..f76fcb1
--- /dev/null
+++ b/dc_rest/models/discord_integration_response.py
@@ -0,0 +1,185 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.account_response import AccountResponse
+from dc_rest.models.integration_application_response import IntegrationApplicationResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class DiscordIntegrationResponse(BaseModel):
+ """
+ DiscordIntegrationResponse
+ """ # noqa: E501
+ type: Optional[StrictStr]
+ name: Optional[StrictStr] = None
+ account: Optional[AccountResponse] = None
+ enabled: Optional[StrictBool] = None
+ id: Annotated[str, Field(strict=True)]
+ application: IntegrationApplicationResponse
+ scopes: List[StrictStr]
+ user: Optional[UserResponse] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "account", "enabled", "id", "application", "scopes", "user"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of DiscordIntegrationResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of account
+ if self.account:
+ _dict['account'] = self.account.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of application
+ if self.application:
+ _dict['application'] = self.application.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if account (nullable) is None
+ # and model_fields_set contains the field
+ if self.account is None and "account" in self.model_fields_set:
+ _dict['account'] = None
+
+ # set to None if enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.enabled is None and "enabled" in self.model_fields_set:
+ _dict['enabled'] = None
+
+ # set to None if user (nullable) is None
+ # and model_fields_set contains the field
+ if self.user is None and "user" in self.model_fields_set:
+ _dict['user'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of DiscordIntegrationResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in DiscordIntegrationResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None,
+ "enabled": obj.get("enabled"),
+ "id": obj.get("id"),
+ "application": IntegrationApplicationResponse.from_dict(obj["application"]) if obj.get("application") is not None else None,
+ "scopes": obj.get("scopes"),
+ "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/edit_lobby_channel_link_request.py b/dc_rest/models/edit_lobby_channel_link_request.py
new file mode 100644
index 0000000..d5ca162
--- /dev/null
+++ b/dc_rest/models/edit_lobby_channel_link_request.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class EditLobbyChannelLinkRequest(BaseModel):
+ """
+ EditLobbyChannelLinkRequest
+ """ # noqa: E501
+ channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ __properties: ClassVar[List[str]] = ["channel_id"]
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EditLobbyChannelLinkRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EditLobbyChannelLinkRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in EditLobbyChannelLinkRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "channel_id": obj.get("channel_id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/embedded_activity_instance.py b/dc_rest/models/embedded_activity_instance.py
new file mode 100644
index 0000000..4113a35
--- /dev/null
+++ b/dc_rest/models/embedded_activity_instance.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.embedded_activity_instance_location import EmbeddedActivityInstanceLocation
+from typing import Optional, Set
+from typing_extensions import Self
+
+class EmbeddedActivityInstance(BaseModel):
+ """
+ EmbeddedActivityInstance
+ """ # noqa: E501
+ application_id: Annotated[str, Field(strict=True)]
+ instance_id: StrictStr
+ launch_id: StrictStr
+ location: Optional[EmbeddedActivityInstanceLocation] = None
+ users: List[Annotated[str, Field(strict=True)]]
+ __properties: ClassVar[List[str]] = ["application_id", "instance_id", "launch_id", "location", "users"]
+
+ @field_validator('application_id')
+ def application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmbeddedActivityInstance from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of location
+ if self.location:
+ _dict['location'] = self.location.to_dict()
+ # set to None if location (nullable) is None
+ # and model_fields_set contains the field
+ if self.location is None and "location" in self.model_fields_set:
+ _dict['location'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmbeddedActivityInstance from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in EmbeddedActivityInstance) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "application_id": obj.get("application_id"),
+ "instance_id": obj.get("instance_id"),
+ "launch_id": obj.get("launch_id"),
+ "location": EmbeddedActivityInstanceLocation.from_dict(obj["location"]) if obj.get("location") is not None else None,
+ "users": obj.get("users")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/embedded_activity_instance_location.py b/dc_rest/models/embedded_activity_instance_location.py
new file mode 100644
index 0000000..863aa6a
--- /dev/null
+++ b/dc_rest/models/embedded_activity_instance_location.py
@@ -0,0 +1,177 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.guild_channel_location import GuildChannelLocation
+from dc_rest.models.private_channel_location import PrivateChannelLocation
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+EMBEDDEDACTIVITYINSTANCELOCATION_ONE_OF_SCHEMAS = ["GuildChannelLocation", "PrivateChannelLocation"]
+
+class EmbeddedActivityInstanceLocation(BaseModel):
+ """
+ EmbeddedActivityInstanceLocation
+ """
+ # data type: GuildChannelLocation
+ oneof_schema_1_validator: Optional[GuildChannelLocation] = None
+ # data type: PrivateChannelLocation
+ oneof_schema_2_validator: Optional[PrivateChannelLocation] = None
+ actual_instance: Optional[Union[GuildChannelLocation, PrivateChannelLocation]] = None
+ one_of_schemas: Set[str] = { "GuildChannelLocation", "PrivateChannelLocation" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ if v is None:
+ return v
+
+ instance = EmbeddedActivityInstanceLocation.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: GuildChannelLocation
+ if not isinstance(v, GuildChannelLocation):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `GuildChannelLocation`")
+ else:
+ match += 1
+ # validate data type: PrivateChannelLocation
+ if not isinstance(v, PrivateChannelLocation):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PrivateChannelLocation`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in EmbeddedActivityInstanceLocation with oneOf schemas: GuildChannelLocation, PrivateChannelLocation. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in EmbeddedActivityInstanceLocation with oneOf schemas: GuildChannelLocation, PrivateChannelLocation. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: Optional[str]) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ if json_str is None:
+ return instance
+
+ error_messages = []
+ match = 0
+
+ # deserialize data into GuildChannelLocation
+ try:
+ instance.actual_instance = GuildChannelLocation.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into PrivateChannelLocation
+ try:
+ instance.actual_instance = PrivateChannelLocation.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into EmbeddedActivityInstanceLocation with oneOf schemas: GuildChannelLocation, PrivateChannelLocation. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into EmbeddedActivityInstanceLocation with oneOf schemas: GuildChannelLocation, PrivateChannelLocation. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], GuildChannelLocation, PrivateChannelLocation]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/emoji_response.py b/dc_rest/models/emoji_response.py
new file mode 100644
index 0000000..ba3e125
--- /dev/null
+++ b/dc_rest/models/emoji_response.py
@@ -0,0 +1,157 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class EmojiResponse(BaseModel):
+ """
+ EmojiResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ user: Optional[UserResponse] = None
+ roles: List[Annotated[str, Field(strict=True)]]
+ require_colons: StrictBool
+ managed: StrictBool
+ animated: StrictBool
+ available: StrictBool
+ __properties: ClassVar[List[str]] = ["id", "name", "user", "roles", "require_colons", "managed", "animated", "available"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmojiResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if user (nullable) is None
+ # and model_fields_set contains the field
+ if self.user is None and "user" in self.model_fields_set:
+ _dict['user'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmojiResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in EmojiResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None,
+ "roles": obj.get("roles"),
+ "require_colons": obj.get("require_colons"),
+ "managed": obj.get("managed"),
+ "animated": obj.get("animated"),
+ "available": obj.get("available")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/entitlement_response.py b/dc_rest/models/entitlement_response.py
new file mode 100644
index 0000000..c830673
--- /dev/null
+++ b/dc_rest/models/entitlement_response.py
@@ -0,0 +1,218 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class EntitlementResponse(BaseModel):
+ """
+ EntitlementResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ sku_id: Annotated[str, Field(strict=True)]
+ application_id: Annotated[str, Field(strict=True)]
+ user_id: Annotated[str, Field(strict=True)]
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None
+ deleted: StrictBool
+ starts_at: Optional[datetime] = None
+ ends_at: Optional[datetime] = None
+ type: Optional[StrictInt]
+ fulfilled_at: Optional[datetime] = None
+ fulfillment_status: Optional[StrictInt] = None
+ consumed: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["id", "sku_id", "application_id", "user_id", "guild_id", "deleted", "starts_at", "ends_at", "type", "fulfilled_at", "fulfillment_status", "consumed"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('sku_id')
+ def sku_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('application_id')
+ def application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('user_id')
+ def user_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EntitlementResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if starts_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.starts_at is None and "starts_at" in self.model_fields_set:
+ _dict['starts_at'] = None
+
+ # set to None if ends_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.ends_at is None and "ends_at" in self.model_fields_set:
+ _dict['ends_at'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if fulfilled_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.fulfilled_at is None and "fulfilled_at" in self.model_fields_set:
+ _dict['fulfilled_at'] = None
+
+ # set to None if fulfillment_status (nullable) is None
+ # and model_fields_set contains the field
+ if self.fulfillment_status is None and "fulfillment_status" in self.model_fields_set:
+ _dict['fulfillment_status'] = None
+
+ # set to None if consumed (nullable) is None
+ # and model_fields_set contains the field
+ if self.consumed is None and "consumed" in self.model_fields_set:
+ _dict['consumed'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EntitlementResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in EntitlementResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "sku_id": obj.get("sku_id"),
+ "application_id": obj.get("application_id"),
+ "user_id": obj.get("user_id"),
+ "guild_id": obj.get("guild_id"),
+ "deleted": obj.get("deleted"),
+ "starts_at": obj.get("starts_at"),
+ "ends_at": obj.get("ends_at"),
+ "type": obj.get("type"),
+ "fulfilled_at": obj.get("fulfilled_at"),
+ "fulfillment_status": obj.get("fulfillment_status"),
+ "consumed": obj.get("consumed")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/entity_metadata_external.py b/dc_rest/models/entity_metadata_external.py
new file mode 100644
index 0000000..d9e7176
--- /dev/null
+++ b/dc_rest/models/entity_metadata_external.py
@@ -0,0 +1,127 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class EntityMetadataExternal(BaseModel):
+ """
+ EntityMetadataExternal
+ """ # noqa: E501
+ location: Annotated[str, Field(strict=True, max_length=100)]
+ __properties: ClassVar[List[str]] = ["location"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EntityMetadataExternal from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EntityMetadataExternal from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in EntityMetadataExternal) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "location": obj.get("location")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/entity_metadata_external_response.py b/dc_rest/models/entity_metadata_external_response.py
new file mode 100644
index 0000000..8279610
--- /dev/null
+++ b/dc_rest/models/entity_metadata_external_response.py
@@ -0,0 +1,126 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class EntityMetadataExternalResponse(BaseModel):
+ """
+ EntityMetadataExternalResponse
+ """ # noqa: E501
+ location: StrictStr
+ __properties: ClassVar[List[str]] = ["location"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EntityMetadataExternalResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EntityMetadataExternalResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in EntityMetadataExternalResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "location": obj.get("location")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/error.py b/dc_rest/models/error.py
new file mode 100644
index 0000000..19a1510
--- /dev/null
+++ b/dc_rest/models/error.py
@@ -0,0 +1,128 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Error(BaseModel):
+ """
+ A single error, either for an API response or a specific field.
+ """ # noqa: E501
+ code: StrictInt = Field(description="Discord internal error code. See error code reference")
+ message: StrictStr = Field(description="Human-readable error message")
+ __properties: ClassVar[List[str]] = ["code", "message"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Error from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Error from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in Error) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "code": obj.get("code"),
+ "message": obj.get("message")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/error_details.py b/dc_rest/models/error_details.py
new file mode 100644
index 0000000..ddd8a7a
--- /dev/null
+++ b/dc_rest/models/error_details.py
@@ -0,0 +1,176 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, Dict, List, Optional
+from dc_rest.models.inner_errors import InnerErrors
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+ERRORDETAILS_ONE_OF_SCHEMAS = ["Dict[str, ErrorDetails]", "InnerErrors"]
+
+class ErrorDetails(BaseModel):
+ """
+ ErrorDetails
+ """
+ # data type: Dict[str, ErrorDetails]
+ oneof_schema_1_validator: Optional[Dict[str, ErrorDetails]] = None
+ # data type: InnerErrors
+ oneof_schema_2_validator: Optional[InnerErrors] = None
+ actual_instance: Optional[Union[Dict[str, ErrorDetails], InnerErrors]] = None
+ one_of_schemas: Set[str] = { "Dict[str, ErrorDetails]", "InnerErrors" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = ErrorDetails.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: Dict[str, ErrorDetails]
+ try:
+ instance.oneof_schema_1_validator = v
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # validate data type: InnerErrors
+ if not isinstance(v, InnerErrors):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `InnerErrors`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ErrorDetails with oneOf schemas: Dict[str, ErrorDetails], InnerErrors. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ErrorDetails with oneOf schemas: Dict[str, ErrorDetails], InnerErrors. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into Dict[str, ErrorDetails]
+ try:
+ # validation
+ instance.oneof_schema_1_validator = json.loads(json_str)
+ # assign value to actual_instance
+ instance.actual_instance = instance.oneof_schema_1_validator
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into InnerErrors
+ try:
+ instance.actual_instance = InnerErrors.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ErrorDetails with oneOf schemas: Dict[str, ErrorDetails], InnerErrors. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ErrorDetails with oneOf schemas: Dict[str, ErrorDetails], InnerErrors. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, ErrorDetails], InnerErrors]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+# TODO: Rewrite to not use raise_errors
+ErrorDetails.model_rebuild(raise_errors=False)
+
diff --git a/dc_rest/models/error_response.py b/dc_rest/models/error_response.py
new file mode 100644
index 0000000..e51005a
--- /dev/null
+++ b/dc_rest/models/error_response.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.error_details import ErrorDetails
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ErrorResponse(BaseModel):
+ """
+ Errors object returned by the Discord API
+ """ # noqa: E501
+ code: StrictInt = Field(description="Discord internal error code. See error code reference")
+ message: StrictStr = Field(description="Human-readable error message")
+ errors: Optional[ErrorDetails] = None
+ __properties: ClassVar[List[str]] = ["code", "message", "errors"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ErrorResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of errors
+ if self.errors:
+ _dict['errors'] = self.errors.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ErrorResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ErrorResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "code": obj.get("code"),
+ "message": obj.get("message"),
+ "errors": ErrorDetails.from_dict(obj["errors"]) if obj.get("errors") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/execute_webhook_request.py b/dc_rest/models/execute_webhook_request.py
new file mode 100644
index 0000000..9297dd5
--- /dev/null
+++ b/dc_rest/models/execute_webhook_request.py
@@ -0,0 +1,168 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+from inspect import getfullargspec
+import json
+import pprint
+import re # noqa: F401
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Optional
+from dc_rest.models.incoming_webhook_request_partial import IncomingWebhookRequestPartial
+from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial
+from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
+from typing_extensions import Literal, Self
+from pydantic import Field
+
+EXECUTEWEBHOOKREQUEST_ANY_OF_SCHEMAS = ["IncomingWebhookRequestPartial", "IncomingWebhookUpdateRequestPartial"]
+
+class ExecuteWebhookRequest(BaseModel):
+ """
+ ExecuteWebhookRequest
+ """
+
+ # data type: IncomingWebhookRequestPartial
+ anyof_schema_1_validator: Optional[IncomingWebhookRequestPartial] = None
+ # data type: IncomingWebhookUpdateRequestPartial
+ anyof_schema_2_validator: Optional[IncomingWebhookUpdateRequestPartial] = None
+ if TYPE_CHECKING:
+ actual_instance: Optional[Union[IncomingWebhookRequestPartial, IncomingWebhookUpdateRequestPartial]] = None
+ else:
+ actual_instance: Any = None
+ any_of_schemas: Set[str] = { "IncomingWebhookRequestPartial", "IncomingWebhookUpdateRequestPartial" }
+
+ model_config = {
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_anyof(cls, v):
+ instance = ExecuteWebhookRequest.model_construct()
+ error_messages = []
+ # validate data type: IncomingWebhookRequestPartial
+ if not isinstance(v, IncomingWebhookRequestPartial):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `IncomingWebhookRequestPartial`")
+ else:
+ return v
+
+ # validate data type: IncomingWebhookUpdateRequestPartial
+ if not isinstance(v, IncomingWebhookUpdateRequestPartial):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `IncomingWebhookUpdateRequestPartial`")
+ else:
+ return v
+
+ if error_messages:
+ # no match
+ raise ValueError("No match found when setting the actual_instance in ExecuteWebhookRequest with anyOf schemas: IncomingWebhookRequestPartial, IncomingWebhookUpdateRequestPartial. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Dict[str, Any]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ # anyof_schema_1_validator: Optional[IncomingWebhookRequestPartial] = None
+ try:
+ instance.actual_instance = IncomingWebhookRequestPartial.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # anyof_schema_2_validator: Optional[IncomingWebhookUpdateRequestPartial] = None
+ try:
+ instance.actual_instance = IncomingWebhookUpdateRequestPartial.from_json(json_str)
+ return instance
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if error_messages:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ExecuteWebhookRequest with anyOf schemas: IncomingWebhookRequestPartial, IncomingWebhookUpdateRequestPartial. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], IncomingWebhookRequestPartial, IncomingWebhookUpdateRequestPartial]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/external_connection_integration_response.py b/dc_rest/models/external_connection_integration_response.py
new file mode 100644
index 0000000..21db8f3
--- /dev/null
+++ b/dc_rest/models/external_connection_integration_response.py
@@ -0,0 +1,217 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.account_response import AccountResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ExternalConnectionIntegrationResponse(BaseModel):
+ """
+ ExternalConnectionIntegrationResponse
+ """ # noqa: E501
+ type: Optional[StrictStr]
+ name: Optional[StrictStr] = None
+ account: Optional[AccountResponse] = None
+ enabled: Optional[StrictBool] = None
+ id: StrictStr
+ user: UserResponse
+ revoked: Optional[StrictBool] = None
+ expire_behavior: Optional[StrictInt] = None
+ expire_grace_period: Optional[StrictInt] = None
+ subscriber_count: Optional[StrictInt] = None
+ synced_at: Optional[datetime] = None
+ role_id: Optional[Annotated[str, Field(strict=True)]] = None
+ syncing: Optional[StrictBool] = None
+ enable_emoticons: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "name", "account", "enabled", "id", "user", "revoked", "expire_behavior", "expire_grace_period", "subscriber_count", "synced_at", "role_id", "syncing", "enable_emoticons"]
+
+ @field_validator('role_id')
+ def role_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ExternalConnectionIntegrationResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of account
+ if self.account:
+ _dict['account'] = self.account.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if account (nullable) is None
+ # and model_fields_set contains the field
+ if self.account is None and "account" in self.model_fields_set:
+ _dict['account'] = None
+
+ # set to None if enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.enabled is None and "enabled" in self.model_fields_set:
+ _dict['enabled'] = None
+
+ # set to None if revoked (nullable) is None
+ # and model_fields_set contains the field
+ if self.revoked is None and "revoked" in self.model_fields_set:
+ _dict['revoked'] = None
+
+ # set to None if subscriber_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.subscriber_count is None and "subscriber_count" in self.model_fields_set:
+ _dict['subscriber_count'] = None
+
+ # set to None if synced_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.synced_at is None and "synced_at" in self.model_fields_set:
+ _dict['synced_at'] = None
+
+ # set to None if syncing (nullable) is None
+ # and model_fields_set contains the field
+ if self.syncing is None and "syncing" in self.model_fields_set:
+ _dict['syncing'] = None
+
+ # set to None if enable_emoticons (nullable) is None
+ # and model_fields_set contains the field
+ if self.enable_emoticons is None and "enable_emoticons" in self.model_fields_set:
+ _dict['enable_emoticons'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ExternalConnectionIntegrationResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ExternalConnectionIntegrationResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None,
+ "enabled": obj.get("enabled"),
+ "id": obj.get("id"),
+ "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None,
+ "revoked": obj.get("revoked"),
+ "expire_behavior": obj.get("expire_behavior"),
+ "expire_grace_period": obj.get("expire_grace_period"),
+ "subscriber_count": obj.get("subscriber_count"),
+ "synced_at": obj.get("synced_at"),
+ "role_id": obj.get("role_id"),
+ "syncing": obj.get("syncing"),
+ "enable_emoticons": obj.get("enable_emoticons")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/external_scheduled_event_create_request.py b/dc_rest/models/external_scheduled_event_create_request.py
new file mode 100644
index 0000000..d6b7139
--- /dev/null
+++ b/dc_rest/models/external_scheduled_event_create_request.py
@@ -0,0 +1,183 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.entity_metadata_external import EntityMetadataExternal
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ExternalScheduledEventCreateRequest(BaseModel):
+ """
+ ExternalScheduledEventCreateRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(strict=True, max_length=100)]
+ description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None
+ image: Optional[StrictStr] = None
+ scheduled_start_time: datetime
+ scheduled_end_time: Optional[datetime] = None
+ privacy_level: Optional[Any]
+ entity_type: Optional[StrictInt]
+ channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ entity_metadata: EntityMetadataExternal
+ __properties: ClassVar[List[str]] = ["name", "description", "image", "scheduled_start_time", "scheduled_end_time", "privacy_level", "entity_type", "channel_id", "entity_metadata"]
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ExternalScheduledEventCreateRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of entity_metadata
+ if self.entity_metadata:
+ _dict['entity_metadata'] = self.entity_metadata.to_dict()
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if image (nullable) is None
+ # and model_fields_set contains the field
+ if self.image is None and "image" in self.model_fields_set:
+ _dict['image'] = None
+
+ # set to None if scheduled_end_time (nullable) is None
+ # and model_fields_set contains the field
+ if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set:
+ _dict['scheduled_end_time'] = None
+
+ # set to None if privacy_level (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_level is None and "privacy_level" in self.model_fields_set:
+ _dict['privacy_level'] = None
+
+ # set to None if entity_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.entity_type is None and "entity_type" in self.model_fields_set:
+ _dict['entity_type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ExternalScheduledEventCreateRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ExternalScheduledEventCreateRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "image": obj.get("image"),
+ "scheduled_start_time": obj.get("scheduled_start_time"),
+ "scheduled_end_time": obj.get("scheduled_end_time"),
+ "privacy_level": obj.get("privacy_level"),
+ "entity_type": obj.get("entity_type"),
+ "channel_id": obj.get("channel_id"),
+ "entity_metadata": EntityMetadataExternal.from_dict(obj["entity_metadata"]) if obj.get("entity_metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/external_scheduled_event_patch_request_partial.py b/dc_rest/models/external_scheduled_event_patch_request_partial.py
new file mode 100644
index 0000000..7dc6f58
--- /dev/null
+++ b/dc_rest/models/external_scheduled_event_patch_request_partial.py
@@ -0,0 +1,190 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.entity_metadata_external import EntityMetadataExternal
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ExternalScheduledEventPatchRequestPartial(BaseModel):
+ """
+ ExternalScheduledEventPatchRequestPartial
+ """ # noqa: E501
+ status: Optional[StrictInt] = None
+ name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None
+ image: Optional[StrictStr] = None
+ scheduled_start_time: Optional[datetime] = None
+ scheduled_end_time: Optional[datetime] = None
+ entity_type: Optional[StrictInt] = None
+ privacy_level: Optional[Any] = None
+ channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ entity_metadata: Optional[EntityMetadataExternal] = None
+ __properties: ClassVar[List[str]] = ["status", "name", "description", "image", "scheduled_start_time", "scheduled_end_time", "entity_type", "privacy_level", "channel_id", "entity_metadata"]
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ExternalScheduledEventPatchRequestPartial from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of entity_metadata
+ if self.entity_metadata:
+ _dict['entity_metadata'] = self.entity_metadata.to_dict()
+ # set to None if status (nullable) is None
+ # and model_fields_set contains the field
+ if self.status is None and "status" in self.model_fields_set:
+ _dict['status'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if image (nullable) is None
+ # and model_fields_set contains the field
+ if self.image is None and "image" in self.model_fields_set:
+ _dict['image'] = None
+
+ # set to None if scheduled_end_time (nullable) is None
+ # and model_fields_set contains the field
+ if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set:
+ _dict['scheduled_end_time'] = None
+
+ # set to None if entity_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.entity_type is None and "entity_type" in self.model_fields_set:
+ _dict['entity_type'] = None
+
+ # set to None if privacy_level (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_level is None and "privacy_level" in self.model_fields_set:
+ _dict['privacy_level'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ExternalScheduledEventPatchRequestPartial from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ExternalScheduledEventPatchRequestPartial) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "status": obj.get("status"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "image": obj.get("image"),
+ "scheduled_start_time": obj.get("scheduled_start_time"),
+ "scheduled_end_time": obj.get("scheduled_end_time"),
+ "entity_type": obj.get("entity_type"),
+ "privacy_level": obj.get("privacy_level"),
+ "channel_id": obj.get("channel_id"),
+ "entity_metadata": EntityMetadataExternal.from_dict(obj["entity_metadata"]) if obj.get("entity_metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/external_scheduled_event_response.py b/dc_rest/models/external_scheduled_event_response.py
new file mode 100644
index 0000000..ca118a1
--- /dev/null
+++ b/dc_rest/models/external_scheduled_event_response.py
@@ -0,0 +1,261 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.entity_metadata_external_response import EntityMetadataExternalResponse
+from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ExternalScheduledEventResponse(BaseModel):
+ """
+ ExternalScheduledEventResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ guild_id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ description: Optional[StrictStr] = None
+ channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ creator_id: Optional[Annotated[str, Field(strict=True)]] = None
+ creator: Optional[UserResponse] = None
+ image: Optional[StrictStr] = None
+ scheduled_start_time: datetime
+ scheduled_end_time: Optional[datetime] = None
+ status: Optional[StrictInt]
+ entity_type: Optional[StrictInt]
+ entity_id: Optional[Annotated[str, Field(strict=True)]] = None
+ user_count: Optional[StrictInt] = None
+ privacy_level: Optional[Any]
+ user_rsvp: Optional[ScheduledEventUserResponse] = None
+ entity_metadata: EntityMetadataExternalResponse
+ __properties: ClassVar[List[str]] = ["id", "guild_id", "name", "description", "channel_id", "creator_id", "creator", "image", "scheduled_start_time", "scheduled_end_time", "status", "entity_type", "entity_id", "user_count", "privacy_level", "user_rsvp", "entity_metadata"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('creator_id')
+ def creator_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('entity_id')
+ def entity_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ExternalScheduledEventResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of creator
+ if self.creator:
+ _dict['creator'] = self.creator.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of user_rsvp
+ if self.user_rsvp:
+ _dict['user_rsvp'] = self.user_rsvp.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of entity_metadata
+ if self.entity_metadata:
+ _dict['entity_metadata'] = self.entity_metadata.to_dict()
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if creator (nullable) is None
+ # and model_fields_set contains the field
+ if self.creator is None and "creator" in self.model_fields_set:
+ _dict['creator'] = None
+
+ # set to None if image (nullable) is None
+ # and model_fields_set contains the field
+ if self.image is None and "image" in self.model_fields_set:
+ _dict['image'] = None
+
+ # set to None if scheduled_end_time (nullable) is None
+ # and model_fields_set contains the field
+ if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set:
+ _dict['scheduled_end_time'] = None
+
+ # set to None if status (nullable) is None
+ # and model_fields_set contains the field
+ if self.status is None and "status" in self.model_fields_set:
+ _dict['status'] = None
+
+ # set to None if entity_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.entity_type is None and "entity_type" in self.model_fields_set:
+ _dict['entity_type'] = None
+
+ # set to None if user_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.user_count is None and "user_count" in self.model_fields_set:
+ _dict['user_count'] = None
+
+ # set to None if privacy_level (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_level is None and "privacy_level" in self.model_fields_set:
+ _dict['privacy_level'] = None
+
+ # set to None if user_rsvp (nullable) is None
+ # and model_fields_set contains the field
+ if self.user_rsvp is None and "user_rsvp" in self.model_fields_set:
+ _dict['user_rsvp'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ExternalScheduledEventResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ExternalScheduledEventResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "guild_id": obj.get("guild_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "channel_id": obj.get("channel_id"),
+ "creator_id": obj.get("creator_id"),
+ "creator": UserResponse.from_dict(obj["creator"]) if obj.get("creator") is not None else None,
+ "image": obj.get("image"),
+ "scheduled_start_time": obj.get("scheduled_start_time"),
+ "scheduled_end_time": obj.get("scheduled_end_time"),
+ "status": obj.get("status"),
+ "entity_type": obj.get("entity_type"),
+ "entity_id": obj.get("entity_id"),
+ "user_count": obj.get("user_count"),
+ "privacy_level": obj.get("privacy_level"),
+ "user_rsvp": ScheduledEventUserResponse.from_dict(obj["user_rsvp"]) if obj.get("user_rsvp") is not None else None,
+ "entity_metadata": EntityMetadataExternalResponse.from_dict(obj["entity_metadata"]) if obj.get("entity_metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/file_component_for_message_request.py b/dc_rest/models/file_component_for_message_request.py
new file mode 100644
index 0000000..6f23e4e
--- /dev/null
+++ b/dc_rest/models/file_component_for_message_request.py
@@ -0,0 +1,139 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.unfurled_media_request_with_attachment_reference_required import UnfurledMediaRequestWithAttachmentReferenceRequired
+from typing import Optional, Set
+from typing_extensions import Self
+
+class FileComponentForMessageRequest(BaseModel):
+ """
+ FileComponentForMessageRequest
+ """ # noqa: E501
+ type: StrictInt
+ spoiler: Optional[StrictBool] = None
+ file: UnfurledMediaRequestWithAttachmentReferenceRequired
+ __properties: ClassVar[List[str]] = ["type", "spoiler", "file"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FileComponentForMessageRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of file
+ if self.file:
+ _dict['file'] = self.file.to_dict()
+ # set to None if spoiler (nullable) is None
+ # and model_fields_set contains the field
+ if self.spoiler is None and "spoiler" in self.model_fields_set:
+ _dict['spoiler'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FileComponentForMessageRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in FileComponentForMessageRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "spoiler": obj.get("spoiler"),
+ "file": UnfurledMediaRequestWithAttachmentReferenceRequired.from_dict(obj["file"]) if obj.get("file") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/file_component_response.py b/dc_rest/models/file_component_response.py
new file mode 100644
index 0000000..2c9e0a3
--- /dev/null
+++ b/dc_rest/models/file_component_response.py
@@ -0,0 +1,150 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.unfurled_media_response import UnfurledMediaResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class FileComponentResponse(BaseModel):
+ """
+ FileComponentResponse
+ """ # noqa: E501
+ type: StrictInt
+ id: StrictInt
+ file: UnfurledMediaResponse
+ name: Optional[StrictStr] = None
+ size: Optional[StrictInt] = None
+ spoiler: StrictBool
+ __properties: ClassVar[List[str]] = ["type", "id", "file", "name", "size", "spoiler"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FileComponentResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of file
+ if self.file:
+ _dict['file'] = self.file.to_dict()
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if size (nullable) is None
+ # and model_fields_set contains the field
+ if self.size is None and "size" in self.model_fields_set:
+ _dict['size'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FileComponentResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in FileComponentResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "id": obj.get("id"),
+ "file": UnfurledMediaResponse.from_dict(obj["file"]) if obj.get("file") is not None else None,
+ "name": obj.get("name"),
+ "size": obj.get("size"),
+ "spoiler": obj.get("spoiler")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/flag_to_channel_action.py b/dc_rest/models/flag_to_channel_action.py
new file mode 100644
index 0000000..5f09584
--- /dev/null
+++ b/dc_rest/models/flag_to_channel_action.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List
+from dc_rest.models.flag_to_channel_action_metadata import FlagToChannelActionMetadata
+from typing import Optional, Set
+from typing_extensions import Self
+
+class FlagToChannelAction(BaseModel):
+ """
+ FlagToChannelAction
+ """ # noqa: E501
+ type: StrictInt
+ metadata: FlagToChannelActionMetadata
+ __properties: ClassVar[List[str]] = ["type", "metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlagToChannelAction from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of metadata
+ if self.metadata:
+ _dict['metadata'] = self.metadata.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlagToChannelAction from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in FlagToChannelAction) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "metadata": FlagToChannelActionMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/flag_to_channel_action_metadata.py b/dc_rest/models/flag_to_channel_action_metadata.py
new file mode 100644
index 0000000..dd7abbd
--- /dev/null
+++ b/dc_rest/models/flag_to_channel_action_metadata.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class FlagToChannelActionMetadata(BaseModel):
+ """
+ FlagToChannelActionMetadata
+ """ # noqa: E501
+ channel_id: Annotated[str, Field(strict=True)]
+ __properties: ClassVar[List[str]] = ["channel_id"]
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlagToChannelActionMetadata from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlagToChannelActionMetadata from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in FlagToChannelActionMetadata) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "channel_id": obj.get("channel_id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/flag_to_channel_action_metadata_response.py b/dc_rest/models/flag_to_channel_action_metadata_response.py
new file mode 100644
index 0000000..8baffd9
--- /dev/null
+++ b/dc_rest/models/flag_to_channel_action_metadata_response.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class FlagToChannelActionMetadataResponse(BaseModel):
+ """
+ FlagToChannelActionMetadataResponse
+ """ # noqa: E501
+ channel_id: Annotated[str, Field(strict=True)]
+ __properties: ClassVar[List[str]] = ["channel_id"]
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlagToChannelActionMetadataResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlagToChannelActionMetadataResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in FlagToChannelActionMetadataResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "channel_id": obj.get("channel_id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/flag_to_channel_action_response.py b/dc_rest/models/flag_to_channel_action_response.py
new file mode 100644
index 0000000..4735259
--- /dev/null
+++ b/dc_rest/models/flag_to_channel_action_response.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List
+from dc_rest.models.flag_to_channel_action_metadata_response import FlagToChannelActionMetadataResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class FlagToChannelActionResponse(BaseModel):
+ """
+ FlagToChannelActionResponse
+ """ # noqa: E501
+ type: StrictInt
+ metadata: FlagToChannelActionMetadataResponse
+ __properties: ClassVar[List[str]] = ["type", "metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlagToChannelActionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of metadata
+ if self.metadata:
+ _dict['metadata'] = self.metadata.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlagToChannelActionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in FlagToChannelActionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "metadata": FlagToChannelActionMetadataResponse.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/follow_channel_request.py b/dc_rest/models/follow_channel_request.py
new file mode 100644
index 0000000..d812202
--- /dev/null
+++ b/dc_rest/models/follow_channel_request.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class FollowChannelRequest(BaseModel):
+ """
+ FollowChannelRequest
+ """ # noqa: E501
+ webhook_channel_id: Annotated[str, Field(strict=True)]
+ __properties: ClassVar[List[str]] = ["webhook_channel_id"]
+
+ @field_validator('webhook_channel_id')
+ def webhook_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FollowChannelRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FollowChannelRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in FollowChannelRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "webhook_channel_id": obj.get("webhook_channel_id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/forum_tag_response.py b/dc_rest/models/forum_tag_response.py
new file mode 100644
index 0000000..a68ac18
--- /dev/null
+++ b/dc_rest/models/forum_tag_response.py
@@ -0,0 +1,157 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ForumTagResponse(BaseModel):
+ """
+ ForumTagResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ moderated: StrictBool
+ emoji_id: Optional[Annotated[str, Field(strict=True)]] = None
+ emoji_name: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "moderated", "emoji_id", "emoji_name"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('emoji_id')
+ def emoji_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ForumTagResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if emoji_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.emoji_name is None and "emoji_name" in self.model_fields_set:
+ _dict['emoji_name'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ForumTagResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ForumTagResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "moderated": obj.get("moderated"),
+ "emoji_id": obj.get("emoji_id"),
+ "emoji_name": obj.get("emoji_name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/friend_invite_response.py b/dc_rest/models/friend_invite_response.py
new file mode 100644
index 0000000..475d627
--- /dev/null
+++ b/dc_rest/models/friend_invite_response.py
@@ -0,0 +1,212 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.invite_channel_response import InviteChannelResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class FriendInviteResponse(BaseModel):
+ """
+ FriendInviteResponse
+ """ # noqa: E501
+ type: Optional[StrictInt] = None
+ code: StrictStr
+ inviter: Optional[UserResponse] = None
+ max_age: Optional[StrictInt] = None
+ created_at: Optional[datetime] = None
+ expires_at: Optional[datetime] = None
+ friends_count: Optional[StrictInt] = None
+ channel: Optional[InviteChannelResponse] = None
+ is_contact: Optional[StrictBool] = None
+ uses: Optional[StrictInt] = None
+ max_uses: Optional[StrictInt] = None
+ flags: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["type", "code", "inviter", "max_age", "created_at", "expires_at", "friends_count", "channel", "is_contact", "uses", "max_uses", "flags"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FriendInviteResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of inviter
+ if self.inviter:
+ _dict['inviter'] = self.inviter.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of channel
+ if self.channel:
+ _dict['channel'] = self.channel.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if inviter (nullable) is None
+ # and model_fields_set contains the field
+ if self.inviter is None and "inviter" in self.model_fields_set:
+ _dict['inviter'] = None
+
+ # set to None if max_age (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_age is None and "max_age" in self.model_fields_set:
+ _dict['max_age'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if expires_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.expires_at is None and "expires_at" in self.model_fields_set:
+ _dict['expires_at'] = None
+
+ # set to None if friends_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.friends_count is None and "friends_count" in self.model_fields_set:
+ _dict['friends_count'] = None
+
+ # set to None if channel (nullable) is None
+ # and model_fields_set contains the field
+ if self.channel is None and "channel" in self.model_fields_set:
+ _dict['channel'] = None
+
+ # set to None if is_contact (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_contact is None and "is_contact" in self.model_fields_set:
+ _dict['is_contact'] = None
+
+ # set to None if uses (nullable) is None
+ # and model_fields_set contains the field
+ if self.uses is None and "uses" in self.model_fields_set:
+ _dict['uses'] = None
+
+ # set to None if max_uses (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_uses is None and "max_uses" in self.model_fields_set:
+ _dict['max_uses'] = None
+
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FriendInviteResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in FriendInviteResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "code": obj.get("code"),
+ "inviter": UserResponse.from_dict(obj["inviter"]) if obj.get("inviter") is not None else None,
+ "max_age": obj.get("max_age"),
+ "created_at": obj.get("created_at"),
+ "expires_at": obj.get("expires_at"),
+ "friends_count": obj.get("friends_count"),
+ "channel": InviteChannelResponse.from_dict(obj["channel"]) if obj.get("channel") is not None else None,
+ "is_contact": obj.get("is_contact"),
+ "uses": obj.get("uses"),
+ "max_uses": obj.get("max_uses"),
+ "flags": obj.get("flags")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/gateway_bot_response.py b/dc_rest/models/gateway_bot_response.py
new file mode 100644
index 0000000..f3a26d1
--- /dev/null
+++ b/dc_rest/models/gateway_bot_response.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List
+from dc_rest.models.gateway_bot_session_start_limit_response import GatewayBotSessionStartLimitResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GatewayBotResponse(BaseModel):
+ """
+ GatewayBotResponse
+ """ # noqa: E501
+ url: StrictStr
+ session_start_limit: GatewayBotSessionStartLimitResponse
+ shards: StrictInt
+ __properties: ClassVar[List[str]] = ["url", "session_start_limit", "shards"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GatewayBotResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of session_start_limit
+ if self.session_start_limit:
+ _dict['session_start_limit'] = self.session_start_limit.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GatewayBotResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GatewayBotResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "url": obj.get("url"),
+ "session_start_limit": GatewayBotSessionStartLimitResponse.from_dict(obj["session_start_limit"]) if obj.get("session_start_limit") is not None else None,
+ "shards": obj.get("shards")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/gateway_bot_session_start_limit_response.py b/dc_rest/models/gateway_bot_session_start_limit_response.py
new file mode 100644
index 0000000..6bde2b9
--- /dev/null
+++ b/dc_rest/models/gateway_bot_session_start_limit_response.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GatewayBotSessionStartLimitResponse(BaseModel):
+ """
+ GatewayBotSessionStartLimitResponse
+ """ # noqa: E501
+ max_concurrency: StrictInt
+ remaining: StrictInt
+ reset_after: StrictInt
+ total: StrictInt
+ __properties: ClassVar[List[str]] = ["max_concurrency", "remaining", "reset_after", "total"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GatewayBotSessionStartLimitResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GatewayBotSessionStartLimitResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GatewayBotSessionStartLimitResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "max_concurrency": obj.get("max_concurrency"),
+ "remaining": obj.get("remaining"),
+ "reset_after": obj.get("reset_after"),
+ "total": obj.get("total")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/gateway_response.py b/dc_rest/models/gateway_response.py
new file mode 100644
index 0000000..b8263c2
--- /dev/null
+++ b/dc_rest/models/gateway_response.py
@@ -0,0 +1,126 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GatewayResponse(BaseModel):
+ """
+ GatewayResponse
+ """ # noqa: E501
+ url: StrictStr
+ __properties: ClassVar[List[str]] = ["url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GatewayResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GatewayResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GatewayResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "url": obj.get("url")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/get_channel200_response.py b/dc_rest/models/get_channel200_response.py
new file mode 100644
index 0000000..1283b28
--- /dev/null
+++ b/dc_rest/models/get_channel200_response.py
@@ -0,0 +1,199 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.guild_channel_response import GuildChannelResponse
+from dc_rest.models.private_channel_response import PrivateChannelResponse
+from dc_rest.models.private_group_channel_response import PrivateGroupChannelResponse
+from dc_rest.models.thread_response import ThreadResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+GETCHANNEL200RESPONSE_ONE_OF_SCHEMAS = ["GuildChannelResponse", "PrivateChannelResponse", "PrivateGroupChannelResponse", "ThreadResponse"]
+
+class GetChannel200Response(BaseModel):
+ """
+ GetChannel200Response
+ """
+ # data type: GuildChannelResponse
+ oneof_schema_1_validator: Optional[GuildChannelResponse] = None
+ # data type: PrivateChannelResponse
+ oneof_schema_2_validator: Optional[PrivateChannelResponse] = None
+ # data type: PrivateGroupChannelResponse
+ oneof_schema_3_validator: Optional[PrivateGroupChannelResponse] = None
+ # data type: ThreadResponse
+ oneof_schema_4_validator: Optional[ThreadResponse] = None
+ actual_instance: Optional[Union[GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse]] = None
+ one_of_schemas: Set[str] = { "GuildChannelResponse", "PrivateChannelResponse", "PrivateGroupChannelResponse", "ThreadResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = GetChannel200Response.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: GuildChannelResponse
+ if not isinstance(v, GuildChannelResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `GuildChannelResponse`")
+ else:
+ match += 1
+ # validate data type: PrivateChannelResponse
+ if not isinstance(v, PrivateChannelResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PrivateChannelResponse`")
+ else:
+ match += 1
+ # validate data type: PrivateGroupChannelResponse
+ if not isinstance(v, PrivateGroupChannelResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PrivateGroupChannelResponse`")
+ else:
+ match += 1
+ # validate data type: ThreadResponse
+ if not isinstance(v, ThreadResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ThreadResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in GetChannel200Response with oneOf schemas: GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in GetChannel200Response with oneOf schemas: GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into GuildChannelResponse
+ try:
+ instance.actual_instance = GuildChannelResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into PrivateChannelResponse
+ try:
+ instance.actual_instance = PrivateChannelResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into PrivateGroupChannelResponse
+ try:
+ instance.actual_instance = PrivateGroupChannelResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into ThreadResponse
+ try:
+ instance.actual_instance = ThreadResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into GetChannel200Response with oneOf schemas: GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into GetChannel200Response with oneOf schemas: GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/get_entitlements_sku_ids_parameter.py b/dc_rest/models/get_entitlements_sku_ids_parameter.py
new file mode 100644
index 0000000..0505b03
--- /dev/null
+++ b/dc_rest/models/get_entitlements_sku_ids_parameter.py
@@ -0,0 +1,178 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from typing_extensions import Annotated
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+GETENTITLEMENTSSKUIDSPARAMETER_ONE_OF_SCHEMAS = ["List[Optional[str]]", "str"]
+
+class GetEntitlementsSkuIdsParameter(BaseModel):
+ """
+ GetEntitlementsSkuIdsParameter
+ """
+ # data type: str
+ oneof_schema_1_validator: Optional[StrictStr] = None
+ # data type: List[Optional[str]]
+ oneof_schema_2_validator: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=100)]] = None
+ actual_instance: Optional[Union[List[Optional[str]], str]] = None
+ one_of_schemas: Set[str] = { "List[Optional[str]]", "str" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = GetEntitlementsSkuIdsParameter.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: str
+ try:
+ instance.oneof_schema_1_validator = v
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # validate data type: List[Optional[str]]
+ try:
+ instance.oneof_schema_2_validator = v
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in GetEntitlementsSkuIdsParameter with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in GetEntitlementsSkuIdsParameter with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into str
+ try:
+ # validation
+ instance.oneof_schema_1_validator = json.loads(json_str)
+ # assign value to actual_instance
+ instance.actual_instance = instance.oneof_schema_1_validator
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into List[Optional[str]]
+ try:
+ # validation
+ instance.oneof_schema_2_validator = json.loads(json_str)
+ # assign value to actual_instance
+ instance.actual_instance = instance.oneof_schema_2_validator
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into GetEntitlementsSkuIdsParameter with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into GetEntitlementsSkuIdsParameter with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], List[Optional[str]], str]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/get_sticker200_response.py b/dc_rest/models/get_sticker200_response.py
new file mode 100644
index 0000000..2c74448
--- /dev/null
+++ b/dc_rest/models/get_sticker200_response.py
@@ -0,0 +1,171 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.guild_sticker_response import GuildStickerResponse
+from dc_rest.models.standard_sticker_response import StandardStickerResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+GETSTICKER200RESPONSE_ONE_OF_SCHEMAS = ["GuildStickerResponse", "StandardStickerResponse"]
+
+class GetSticker200Response(BaseModel):
+ """
+ GetSticker200Response
+ """
+ # data type: GuildStickerResponse
+ oneof_schema_1_validator: Optional[GuildStickerResponse] = None
+ # data type: StandardStickerResponse
+ oneof_schema_2_validator: Optional[StandardStickerResponse] = None
+ actual_instance: Optional[Union[GuildStickerResponse, StandardStickerResponse]] = None
+ one_of_schemas: Set[str] = { "GuildStickerResponse", "StandardStickerResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = GetSticker200Response.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: GuildStickerResponse
+ if not isinstance(v, GuildStickerResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `GuildStickerResponse`")
+ else:
+ match += 1
+ # validate data type: StandardStickerResponse
+ if not isinstance(v, StandardStickerResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `StandardStickerResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in GetSticker200Response with oneOf schemas: GuildStickerResponse, StandardStickerResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in GetSticker200Response with oneOf schemas: GuildStickerResponse, StandardStickerResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into GuildStickerResponse
+ try:
+ instance.actual_instance = GuildStickerResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into StandardStickerResponse
+ try:
+ instance.actual_instance = StandardStickerResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into GetSticker200Response with oneOf schemas: GuildStickerResponse, StandardStickerResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into GetSticker200Response with oneOf schemas: GuildStickerResponse, StandardStickerResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], GuildStickerResponse, StandardStickerResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/github_author.py b/dc_rest/models/github_author.py
new file mode 100644
index 0000000..584f297
--- /dev/null
+++ b/dc_rest/models/github_author.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubAuthor(BaseModel):
+ """
+ GithubAuthor
+ """ # noqa: E501
+ username: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ name: Annotated[str, Field(strict=True, max_length=152133)]
+ __properties: ClassVar[List[str]] = ["username", "name"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubAuthor from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if username (nullable) is None
+ # and model_fields_set contains the field
+ if self.username is None and "username" in self.model_fields_set:
+ _dict['username'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubAuthor from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubAuthor) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "username": obj.get("username"),
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_check_app.py b/dc_rest/models/github_check_app.py
new file mode 100644
index 0000000..2fc7188
--- /dev/null
+++ b/dc_rest/models/github_check_app.py
@@ -0,0 +1,127 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubCheckApp(BaseModel):
+ """
+ GithubCheckApp
+ """ # noqa: E501
+ name: Annotated[str, Field(strict=True, max_length=152133)]
+ __properties: ClassVar[List[str]] = ["name"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubCheckApp from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubCheckApp from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubCheckApp) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_check_pull_request.py b/dc_rest/models/github_check_pull_request.py
new file mode 100644
index 0000000..7f7af33
--- /dev/null
+++ b/dc_rest/models/github_check_pull_request.py
@@ -0,0 +1,126 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubCheckPullRequest(BaseModel):
+ """
+ GithubCheckPullRequest
+ """ # noqa: E501
+ number: StrictInt
+ __properties: ClassVar[List[str]] = ["number"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubCheckPullRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubCheckPullRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubCheckPullRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "number": obj.get("number")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_check_run.py b/dc_rest/models/github_check_run.py
new file mode 100644
index 0000000..396deb1
--- /dev/null
+++ b/dc_rest/models/github_check_run.py
@@ -0,0 +1,175 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.github_check_pull_request import GithubCheckPullRequest
+from dc_rest.models.github_check_run_output import GithubCheckRunOutput
+from dc_rest.models.github_check_suite import GithubCheckSuite
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubCheckRun(BaseModel):
+ """
+ GithubCheckRun
+ """ # noqa: E501
+ conclusion: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ name: Annotated[str, Field(strict=True, max_length=152133)]
+ html_url: Annotated[str, Field(strict=True, max_length=2048)]
+ check_suite: GithubCheckSuite
+ details_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None
+ output: Optional[GithubCheckRunOutput] = None
+ pull_requests: Optional[Annotated[List[GithubCheckPullRequest], Field(max_length=1521)]] = None
+ __properties: ClassVar[List[str]] = ["conclusion", "name", "html_url", "check_suite", "details_url", "output", "pull_requests"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubCheckRun from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of check_suite
+ if self.check_suite:
+ _dict['check_suite'] = self.check_suite.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of output
+ if self.output:
+ _dict['output'] = self.output.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in pull_requests (list)
+ _items = []
+ if self.pull_requests:
+ for _item_pull_requests in self.pull_requests:
+ if _item_pull_requests:
+ _items.append(_item_pull_requests.to_dict())
+ _dict['pull_requests'] = _items
+ # set to None if conclusion (nullable) is None
+ # and model_fields_set contains the field
+ if self.conclusion is None and "conclusion" in self.model_fields_set:
+ _dict['conclusion'] = None
+
+ # set to None if details_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.details_url is None and "details_url" in self.model_fields_set:
+ _dict['details_url'] = None
+
+ # set to None if output (nullable) is None
+ # and model_fields_set contains the field
+ if self.output is None and "output" in self.model_fields_set:
+ _dict['output'] = None
+
+ # set to None if pull_requests (nullable) is None
+ # and model_fields_set contains the field
+ if self.pull_requests is None and "pull_requests" in self.model_fields_set:
+ _dict['pull_requests'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubCheckRun from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubCheckRun) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "conclusion": obj.get("conclusion"),
+ "name": obj.get("name"),
+ "html_url": obj.get("html_url"),
+ "check_suite": GithubCheckSuite.from_dict(obj["check_suite"]) if obj.get("check_suite") is not None else None,
+ "details_url": obj.get("details_url"),
+ "output": GithubCheckRunOutput.from_dict(obj["output"]) if obj.get("output") is not None else None,
+ "pull_requests": [GithubCheckPullRequest.from_dict(_item) for _item in obj["pull_requests"]] if obj.get("pull_requests") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_check_run_output.py b/dc_rest/models/github_check_run_output.py
new file mode 100644
index 0000000..fe751db
--- /dev/null
+++ b/dc_rest/models/github_check_run_output.py
@@ -0,0 +1,139 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubCheckRunOutput(BaseModel):
+ """
+ GithubCheckRunOutput
+ """ # noqa: E501
+ title: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ summary: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ __properties: ClassVar[List[str]] = ["title", "summary"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubCheckRunOutput from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if title (nullable) is None
+ # and model_fields_set contains the field
+ if self.title is None and "title" in self.model_fields_set:
+ _dict['title'] = None
+
+ # set to None if summary (nullable) is None
+ # and model_fields_set contains the field
+ if self.summary is None and "summary" in self.model_fields_set:
+ _dict['summary'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubCheckRunOutput from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubCheckRunOutput) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "title": obj.get("title"),
+ "summary": obj.get("summary")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_check_suite.py b/dc_rest/models/github_check_suite.py
new file mode 100644
index 0000000..29b601f
--- /dev/null
+++ b/dc_rest/models/github_check_suite.py
@@ -0,0 +1,162 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.github_check_app import GithubCheckApp
+from dc_rest.models.github_check_pull_request import GithubCheckPullRequest
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubCheckSuite(BaseModel):
+ """
+ GithubCheckSuite
+ """ # noqa: E501
+ conclusion: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ head_branch: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ head_sha: Annotated[str, Field(strict=True, max_length=152133)]
+ pull_requests: Optional[Annotated[List[GithubCheckPullRequest], Field(max_length=1521)]] = None
+ app: GithubCheckApp
+ __properties: ClassVar[List[str]] = ["conclusion", "head_branch", "head_sha", "pull_requests", "app"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubCheckSuite from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in pull_requests (list)
+ _items = []
+ if self.pull_requests:
+ for _item_pull_requests in self.pull_requests:
+ if _item_pull_requests:
+ _items.append(_item_pull_requests.to_dict())
+ _dict['pull_requests'] = _items
+ # override the default output from pydantic by calling `to_dict()` of app
+ if self.app:
+ _dict['app'] = self.app.to_dict()
+ # set to None if conclusion (nullable) is None
+ # and model_fields_set contains the field
+ if self.conclusion is None and "conclusion" in self.model_fields_set:
+ _dict['conclusion'] = None
+
+ # set to None if head_branch (nullable) is None
+ # and model_fields_set contains the field
+ if self.head_branch is None and "head_branch" in self.model_fields_set:
+ _dict['head_branch'] = None
+
+ # set to None if pull_requests (nullable) is None
+ # and model_fields_set contains the field
+ if self.pull_requests is None and "pull_requests" in self.model_fields_set:
+ _dict['pull_requests'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubCheckSuite from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubCheckSuite) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "conclusion": obj.get("conclusion"),
+ "head_branch": obj.get("head_branch"),
+ "head_sha": obj.get("head_sha"),
+ "pull_requests": [GithubCheckPullRequest.from_dict(_item) for _item in obj["pull_requests"]] if obj.get("pull_requests") is not None else None,
+ "app": GithubCheckApp.from_dict(obj["app"]) if obj.get("app") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_comment.py b/dc_rest/models/github_comment.py
new file mode 100644
index 0000000..7cd5d9f
--- /dev/null
+++ b/dc_rest/models/github_comment.py
@@ -0,0 +1,144 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.github_user import GithubUser
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubComment(BaseModel):
+ """
+ GithubComment
+ """ # noqa: E501
+ id: StrictInt
+ html_url: Annotated[str, Field(strict=True, max_length=2048)]
+ user: GithubUser
+ commit_id: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ body: Annotated[str, Field(strict=True, max_length=152133)]
+ __properties: ClassVar[List[str]] = ["id", "html_url", "user", "commit_id", "body"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubComment from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if commit_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.commit_id is None and "commit_id" in self.model_fields_set:
+ _dict['commit_id'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubComment from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubComment) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "html_url": obj.get("html_url"),
+ "user": GithubUser.from_dict(obj["user"]) if obj.get("user") is not None else None,
+ "commit_id": obj.get("commit_id"),
+ "body": obj.get("body")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_commit.py b/dc_rest/models/github_commit.py
new file mode 100644
index 0000000..2e9352c
--- /dev/null
+++ b/dc_rest/models/github_commit.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from dc_rest.models.github_author import GithubAuthor
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubCommit(BaseModel):
+ """
+ GithubCommit
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True, max_length=152133)]
+ url: Annotated[str, Field(strict=True, max_length=2048)]
+ message: Annotated[str, Field(strict=True, max_length=152133)]
+ author: GithubAuthor
+ __properties: ClassVar[List[str]] = ["id", "url", "message", "author"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubCommit from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of author
+ if self.author:
+ _dict['author'] = self.author.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubCommit from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubCommit) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "url": obj.get("url"),
+ "message": obj.get("message"),
+ "author": GithubAuthor.from_dict(obj["author"]) if obj.get("author") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_discussion.py b/dc_rest/models/github_discussion.py
new file mode 100644
index 0000000..a9dc9d7
--- /dev/null
+++ b/dc_rest/models/github_discussion.py
@@ -0,0 +1,151 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.github_user import GithubUser
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubDiscussion(BaseModel):
+ """
+ GithubDiscussion
+ """ # noqa: E501
+ title: Annotated[str, Field(strict=True, max_length=152133)]
+ number: StrictInt
+ html_url: Annotated[str, Field(strict=True, max_length=2048)]
+ answer_html_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None
+ body: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ user: GithubUser
+ __properties: ClassVar[List[str]] = ["title", "number", "html_url", "answer_html_url", "body", "user"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubDiscussion from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if answer_html_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.answer_html_url is None and "answer_html_url" in self.model_fields_set:
+ _dict['answer_html_url'] = None
+
+ # set to None if body (nullable) is None
+ # and model_fields_set contains the field
+ if self.body is None and "body" in self.model_fields_set:
+ _dict['body'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubDiscussion from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubDiscussion) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "title": obj.get("title"),
+ "number": obj.get("number"),
+ "html_url": obj.get("html_url"),
+ "answer_html_url": obj.get("answer_html_url"),
+ "body": obj.get("body"),
+ "user": GithubUser.from_dict(obj["user"]) if obj.get("user") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_issue.py b/dc_rest/models/github_issue.py
new file mode 100644
index 0000000..f3d8112
--- /dev/null
+++ b/dc_rest/models/github_issue.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.github_user import GithubUser
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubIssue(BaseModel):
+ """
+ GithubIssue
+ """ # noqa: E501
+ id: StrictInt
+ number: StrictInt
+ html_url: Annotated[str, Field(strict=True, max_length=2048)]
+ user: GithubUser
+ title: Annotated[str, Field(strict=True, max_length=152133)]
+ body: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ pull_request: Optional[Any] = None
+ __properties: ClassVar[List[str]] = ["id", "number", "html_url", "user", "title", "body", "pull_request"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubIssue from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if body (nullable) is None
+ # and model_fields_set contains the field
+ if self.body is None and "body" in self.model_fields_set:
+ _dict['body'] = None
+
+ # set to None if pull_request (nullable) is None
+ # and model_fields_set contains the field
+ if self.pull_request is None and "pull_request" in self.model_fields_set:
+ _dict['pull_request'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubIssue from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubIssue) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "number": obj.get("number"),
+ "html_url": obj.get("html_url"),
+ "user": GithubUser.from_dict(obj["user"]) if obj.get("user") is not None else None,
+ "title": obj.get("title"),
+ "body": obj.get("body"),
+ "pull_request": obj.get("pull_request")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_release.py b/dc_rest/models/github_release.py
new file mode 100644
index 0000000..1db8063
--- /dev/null
+++ b/dc_rest/models/github_release.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from dc_rest.models.github_user import GithubUser
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubRelease(BaseModel):
+ """
+ GithubRelease
+ """ # noqa: E501
+ id: StrictInt
+ tag_name: Annotated[str, Field(strict=True, max_length=152133)]
+ html_url: Annotated[str, Field(strict=True, max_length=2048)]
+ author: GithubUser
+ __properties: ClassVar[List[str]] = ["id", "tag_name", "html_url", "author"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubRelease from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of author
+ if self.author:
+ _dict['author'] = self.author.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubRelease from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubRelease) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "tag_name": obj.get("tag_name"),
+ "html_url": obj.get("html_url"),
+ "author": GithubUser.from_dict(obj["author"]) if obj.get("author") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_repository.py b/dc_rest/models/github_repository.py
new file mode 100644
index 0000000..740277a
--- /dev/null
+++ b/dc_rest/models/github_repository.py
@@ -0,0 +1,133 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubRepository(BaseModel):
+ """
+ GithubRepository
+ """ # noqa: E501
+ id: StrictInt
+ html_url: Annotated[str, Field(strict=True, max_length=2048)]
+ name: Annotated[str, Field(strict=True, max_length=152133)]
+ full_name: Annotated[str, Field(strict=True, max_length=152133)]
+ __properties: ClassVar[List[str]] = ["id", "html_url", "name", "full_name"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubRepository from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubRepository from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubRepository) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "html_url": obj.get("html_url"),
+ "name": obj.get("name"),
+ "full_name": obj.get("full_name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_review.py b/dc_rest/models/github_review.py
new file mode 100644
index 0000000..047cd1f
--- /dev/null
+++ b/dc_rest/models/github_review.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.github_user import GithubUser
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubReview(BaseModel):
+ """
+ GithubReview
+ """ # noqa: E501
+ user: GithubUser
+ body: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ html_url: Annotated[str, Field(strict=True, max_length=2048)]
+ state: Annotated[str, Field(strict=True, max_length=152133)]
+ __properties: ClassVar[List[str]] = ["user", "body", "html_url", "state"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubReview from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if body (nullable) is None
+ # and model_fields_set contains the field
+ if self.body is None and "body" in self.model_fields_set:
+ _dict['body'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubReview from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubReview) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "user": GithubUser.from_dict(obj["user"]) if obj.get("user") is not None else None,
+ "body": obj.get("body"),
+ "html_url": obj.get("html_url"),
+ "state": obj.get("state")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_user.py b/dc_rest/models/github_user.py
new file mode 100644
index 0000000..50560cd
--- /dev/null
+++ b/dc_rest/models/github_user.py
@@ -0,0 +1,133 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubUser(BaseModel):
+ """
+ GithubUser
+ """ # noqa: E501
+ id: StrictInt
+ login: Annotated[str, Field(strict=True, max_length=152133)]
+ html_url: Annotated[str, Field(strict=True, max_length=2048)]
+ avatar_url: Annotated[str, Field(strict=True, max_length=2048)]
+ __properties: ClassVar[List[str]] = ["id", "login", "html_url", "avatar_url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubUser from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubUser from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubUser) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "login": obj.get("login"),
+ "html_url": obj.get("html_url"),
+ "avatar_url": obj.get("avatar_url")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/github_webhook.py b/dc_rest/models/github_webhook.py
new file mode 100644
index 0000000..9cc149a
--- /dev/null
+++ b/dc_rest/models/github_webhook.py
@@ -0,0 +1,319 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.github_check_run import GithubCheckRun
+from dc_rest.models.github_check_suite import GithubCheckSuite
+from dc_rest.models.github_comment import GithubComment
+from dc_rest.models.github_commit import GithubCommit
+from dc_rest.models.github_discussion import GithubDiscussion
+from dc_rest.models.github_issue import GithubIssue
+from dc_rest.models.github_release import GithubRelease
+from dc_rest.models.github_repository import GithubRepository
+from dc_rest.models.github_review import GithubReview
+from dc_rest.models.github_user import GithubUser
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GithubWebhook(BaseModel):
+ """
+ GithubWebhook
+ """ # noqa: E501
+ action: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ ref: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ ref_type: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ comment: Optional[GithubComment] = None
+ issue: Optional[GithubIssue] = None
+ pull_request: Optional[GithubIssue] = None
+ repository: Optional[GithubRepository] = None
+ forkee: Optional[GithubRepository] = None
+ sender: GithubUser
+ member: Optional[GithubUser] = None
+ release: Optional[GithubRelease] = None
+ head_commit: Optional[GithubCommit] = None
+ commits: Optional[Annotated[List[GithubCommit], Field(max_length=1521)]] = None
+ forced: Optional[StrictBool] = None
+ compare: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None
+ review: Optional[GithubReview] = None
+ check_run: Optional[GithubCheckRun] = None
+ check_suite: Optional[GithubCheckSuite] = None
+ discussion: Optional[GithubDiscussion] = None
+ answer: Optional[GithubComment] = None
+ __properties: ClassVar[List[str]] = ["action", "ref", "ref_type", "comment", "issue", "pull_request", "repository", "forkee", "sender", "member", "release", "head_commit", "commits", "forced", "compare", "review", "check_run", "check_suite", "discussion", "answer"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GithubWebhook from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of comment
+ if self.comment:
+ _dict['comment'] = self.comment.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of issue
+ if self.issue:
+ _dict['issue'] = self.issue.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of pull_request
+ if self.pull_request:
+ _dict['pull_request'] = self.pull_request.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of repository
+ if self.repository:
+ _dict['repository'] = self.repository.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of forkee
+ if self.forkee:
+ _dict['forkee'] = self.forkee.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of sender
+ if self.sender:
+ _dict['sender'] = self.sender.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of member
+ if self.member:
+ _dict['member'] = self.member.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of release
+ if self.release:
+ _dict['release'] = self.release.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of head_commit
+ if self.head_commit:
+ _dict['head_commit'] = self.head_commit.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in commits (list)
+ _items = []
+ if self.commits:
+ for _item_commits in self.commits:
+ if _item_commits:
+ _items.append(_item_commits.to_dict())
+ _dict['commits'] = _items
+ # override the default output from pydantic by calling `to_dict()` of review
+ if self.review:
+ _dict['review'] = self.review.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of check_run
+ if self.check_run:
+ _dict['check_run'] = self.check_run.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of check_suite
+ if self.check_suite:
+ _dict['check_suite'] = self.check_suite.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of discussion
+ if self.discussion:
+ _dict['discussion'] = self.discussion.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of answer
+ if self.answer:
+ _dict['answer'] = self.answer.to_dict()
+ # set to None if action (nullable) is None
+ # and model_fields_set contains the field
+ if self.action is None and "action" in self.model_fields_set:
+ _dict['action'] = None
+
+ # set to None if ref (nullable) is None
+ # and model_fields_set contains the field
+ if self.ref is None and "ref" in self.model_fields_set:
+ _dict['ref'] = None
+
+ # set to None if ref_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.ref_type is None and "ref_type" in self.model_fields_set:
+ _dict['ref_type'] = None
+
+ # set to None if comment (nullable) is None
+ # and model_fields_set contains the field
+ if self.comment is None and "comment" in self.model_fields_set:
+ _dict['comment'] = None
+
+ # set to None if issue (nullable) is None
+ # and model_fields_set contains the field
+ if self.issue is None and "issue" in self.model_fields_set:
+ _dict['issue'] = None
+
+ # set to None if pull_request (nullable) is None
+ # and model_fields_set contains the field
+ if self.pull_request is None and "pull_request" in self.model_fields_set:
+ _dict['pull_request'] = None
+
+ # set to None if repository (nullable) is None
+ # and model_fields_set contains the field
+ if self.repository is None and "repository" in self.model_fields_set:
+ _dict['repository'] = None
+
+ # set to None if forkee (nullable) is None
+ # and model_fields_set contains the field
+ if self.forkee is None and "forkee" in self.model_fields_set:
+ _dict['forkee'] = None
+
+ # set to None if member (nullable) is None
+ # and model_fields_set contains the field
+ if self.member is None and "member" in self.model_fields_set:
+ _dict['member'] = None
+
+ # set to None if release (nullable) is None
+ # and model_fields_set contains the field
+ if self.release is None and "release" in self.model_fields_set:
+ _dict['release'] = None
+
+ # set to None if head_commit (nullable) is None
+ # and model_fields_set contains the field
+ if self.head_commit is None and "head_commit" in self.model_fields_set:
+ _dict['head_commit'] = None
+
+ # set to None if commits (nullable) is None
+ # and model_fields_set contains the field
+ if self.commits is None and "commits" in self.model_fields_set:
+ _dict['commits'] = None
+
+ # set to None if forced (nullable) is None
+ # and model_fields_set contains the field
+ if self.forced is None and "forced" in self.model_fields_set:
+ _dict['forced'] = None
+
+ # set to None if compare (nullable) is None
+ # and model_fields_set contains the field
+ if self.compare is None and "compare" in self.model_fields_set:
+ _dict['compare'] = None
+
+ # set to None if review (nullable) is None
+ # and model_fields_set contains the field
+ if self.review is None and "review" in self.model_fields_set:
+ _dict['review'] = None
+
+ # set to None if check_run (nullable) is None
+ # and model_fields_set contains the field
+ if self.check_run is None and "check_run" in self.model_fields_set:
+ _dict['check_run'] = None
+
+ # set to None if check_suite (nullable) is None
+ # and model_fields_set contains the field
+ if self.check_suite is None and "check_suite" in self.model_fields_set:
+ _dict['check_suite'] = None
+
+ # set to None if discussion (nullable) is None
+ # and model_fields_set contains the field
+ if self.discussion is None and "discussion" in self.model_fields_set:
+ _dict['discussion'] = None
+
+ # set to None if answer (nullable) is None
+ # and model_fields_set contains the field
+ if self.answer is None and "answer" in self.model_fields_set:
+ _dict['answer'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GithubWebhook from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GithubWebhook) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "action": obj.get("action"),
+ "ref": obj.get("ref"),
+ "ref_type": obj.get("ref_type"),
+ "comment": GithubComment.from_dict(obj["comment"]) if obj.get("comment") is not None else None,
+ "issue": GithubIssue.from_dict(obj["issue"]) if obj.get("issue") is not None else None,
+ "pull_request": GithubIssue.from_dict(obj["pull_request"]) if obj.get("pull_request") is not None else None,
+ "repository": GithubRepository.from_dict(obj["repository"]) if obj.get("repository") is not None else None,
+ "forkee": GithubRepository.from_dict(obj["forkee"]) if obj.get("forkee") is not None else None,
+ "sender": GithubUser.from_dict(obj["sender"]) if obj.get("sender") is not None else None,
+ "member": GithubUser.from_dict(obj["member"]) if obj.get("member") is not None else None,
+ "release": GithubRelease.from_dict(obj["release"]) if obj.get("release") is not None else None,
+ "head_commit": GithubCommit.from_dict(obj["head_commit"]) if obj.get("head_commit") is not None else None,
+ "commits": [GithubCommit.from_dict(_item) for _item in obj["commits"]] if obj.get("commits") is not None else None,
+ "forced": obj.get("forced"),
+ "compare": obj.get("compare"),
+ "review": GithubReview.from_dict(obj["review"]) if obj.get("review") is not None else None,
+ "check_run": GithubCheckRun.from_dict(obj["check_run"]) if obj.get("check_run") is not None else None,
+ "check_suite": GithubCheckSuite.from_dict(obj["check_suite"]) if obj.get("check_suite") is not None else None,
+ "discussion": GithubDiscussion.from_dict(obj["discussion"]) if obj.get("discussion") is not None else None,
+ "answer": GithubComment.from_dict(obj["answer"]) if obj.get("answer") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/group_dm_invite_response.py b/dc_rest/models/group_dm_invite_response.py
new file mode 100644
index 0000000..b4826f5
--- /dev/null
+++ b/dc_rest/models/group_dm_invite_response.py
@@ -0,0 +1,184 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.invite_channel_response import InviteChannelResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupDMInviteResponse(BaseModel):
+ """
+ GroupDMInviteResponse
+ """ # noqa: E501
+ type: Optional[StrictInt] = None
+ code: StrictStr
+ inviter: Optional[UserResponse] = None
+ max_age: Optional[StrictInt] = None
+ created_at: Optional[datetime] = None
+ expires_at: Optional[datetime] = None
+ channel: Optional[InviteChannelResponse] = None
+ approximate_member_count: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["type", "code", "inviter", "max_age", "created_at", "expires_at", "channel", "approximate_member_count"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GroupDMInviteResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of inviter
+ if self.inviter:
+ _dict['inviter'] = self.inviter.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of channel
+ if self.channel:
+ _dict['channel'] = self.channel.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if inviter (nullable) is None
+ # and model_fields_set contains the field
+ if self.inviter is None and "inviter" in self.model_fields_set:
+ _dict['inviter'] = None
+
+ # set to None if max_age (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_age is None and "max_age" in self.model_fields_set:
+ _dict['max_age'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if expires_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.expires_at is None and "expires_at" in self.model_fields_set:
+ _dict['expires_at'] = None
+
+ # set to None if channel (nullable) is None
+ # and model_fields_set contains the field
+ if self.channel is None and "channel" in self.model_fields_set:
+ _dict['channel'] = None
+
+ # set to None if approximate_member_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.approximate_member_count is None and "approximate_member_count" in self.model_fields_set:
+ _dict['approximate_member_count'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GroupDMInviteResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GroupDMInviteResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "code": obj.get("code"),
+ "inviter": UserResponse.from_dict(obj["inviter"]) if obj.get("inviter") is not None else None,
+ "max_age": obj.get("max_age"),
+ "created_at": obj.get("created_at"),
+ "expires_at": obj.get("expires_at"),
+ "channel": InviteChannelResponse.from_dict(obj["channel"]) if obj.get("channel") is not None else None,
+ "approximate_member_count": obj.get("approximate_member_count")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_audit_log_response.py b/dc_rest/models/guild_audit_log_response.py
new file mode 100644
index 0000000..645a506
--- /dev/null
+++ b/dc_rest/models/guild_audit_log_response.py
@@ -0,0 +1,204 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.application_command_response import ApplicationCommandResponse
+from dc_rest.models.audit_log_entry_response import AuditLogEntryResponse
+from dc_rest.models.guild_audit_log_response_integrations_inner import GuildAuditLogResponseIntegrationsInner
+from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner
+from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner
+from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner
+from dc_rest.models.thread_response import ThreadResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildAuditLogResponse(BaseModel):
+ """
+ GuildAuditLogResponse
+ """ # noqa: E501
+ audit_log_entries: List[AuditLogEntryResponse]
+ users: List[UserResponse]
+ integrations: List[GuildAuditLogResponseIntegrationsInner]
+ webhooks: List[ListChannelWebhooks200ResponseInner]
+ guild_scheduled_events: List[ListGuildScheduledEvents200ResponseInner]
+ threads: List[ThreadResponse]
+ application_commands: List[ApplicationCommandResponse]
+ auto_moderation_rules: List[Optional[ListAutoModerationRules200ResponseInner]]
+ __properties: ClassVar[List[str]] = ["audit_log_entries", "users", "integrations", "webhooks", "guild_scheduled_events", "threads", "application_commands", "auto_moderation_rules"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildAuditLogResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in audit_log_entries (list)
+ _items = []
+ if self.audit_log_entries:
+ for _item_audit_log_entries in self.audit_log_entries:
+ if _item_audit_log_entries:
+ _items.append(_item_audit_log_entries.to_dict())
+ _dict['audit_log_entries'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in users (list)
+ _items = []
+ if self.users:
+ for _item_users in self.users:
+ if _item_users:
+ _items.append(_item_users.to_dict())
+ _dict['users'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in integrations (list)
+ _items = []
+ if self.integrations:
+ for _item_integrations in self.integrations:
+ if _item_integrations:
+ _items.append(_item_integrations.to_dict())
+ _dict['integrations'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in webhooks (list)
+ _items = []
+ if self.webhooks:
+ for _item_webhooks in self.webhooks:
+ if _item_webhooks:
+ _items.append(_item_webhooks.to_dict())
+ _dict['webhooks'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in guild_scheduled_events (list)
+ _items = []
+ if self.guild_scheduled_events:
+ for _item_guild_scheduled_events in self.guild_scheduled_events:
+ if _item_guild_scheduled_events:
+ _items.append(_item_guild_scheduled_events.to_dict())
+ _dict['guild_scheduled_events'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in threads (list)
+ _items = []
+ if self.threads:
+ for _item_threads in self.threads:
+ if _item_threads:
+ _items.append(_item_threads.to_dict())
+ _dict['threads'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in application_commands (list)
+ _items = []
+ if self.application_commands:
+ for _item_application_commands in self.application_commands:
+ if _item_application_commands:
+ _items.append(_item_application_commands.to_dict())
+ _dict['application_commands'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in auto_moderation_rules (list)
+ _items = []
+ if self.auto_moderation_rules:
+ for _item_auto_moderation_rules in self.auto_moderation_rules:
+ if _item_auto_moderation_rules:
+ _items.append(_item_auto_moderation_rules.to_dict())
+ _dict['auto_moderation_rules'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildAuditLogResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildAuditLogResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "audit_log_entries": [AuditLogEntryResponse.from_dict(_item) for _item in obj["audit_log_entries"]] if obj.get("audit_log_entries") is not None else None,
+ "users": [UserResponse.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None,
+ "integrations": [GuildAuditLogResponseIntegrationsInner.from_dict(_item) for _item in obj["integrations"]] if obj.get("integrations") is not None else None,
+ "webhooks": [ListChannelWebhooks200ResponseInner.from_dict(_item) for _item in obj["webhooks"]] if obj.get("webhooks") is not None else None,
+ "guild_scheduled_events": [ListGuildScheduledEvents200ResponseInner.from_dict(_item) for _item in obj["guild_scheduled_events"]] if obj.get("guild_scheduled_events") is not None else None,
+ "threads": [ThreadResponse.from_dict(_item) for _item in obj["threads"]] if obj.get("threads") is not None else None,
+ "application_commands": [ApplicationCommandResponse.from_dict(_item) for _item in obj["application_commands"]] if obj.get("application_commands") is not None else None,
+ "auto_moderation_rules": [ListAutoModerationRules200ResponseInner.from_dict(_item) for _item in obj["auto_moderation_rules"]] if obj.get("auto_moderation_rules") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_audit_log_response_integrations_inner.py b/dc_rest/models/guild_audit_log_response_integrations_inner.py
new file mode 100644
index 0000000..34919d2
--- /dev/null
+++ b/dc_rest/models/guild_audit_log_response_integrations_inner.py
@@ -0,0 +1,185 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.partial_discord_integration_response import PartialDiscordIntegrationResponse
+from dc_rest.models.partial_external_connection_integration_response import PartialExternalConnectionIntegrationResponse
+from dc_rest.models.partial_guild_subscription_integration_response import PartialGuildSubscriptionIntegrationResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+GUILDAUDITLOGRESPONSEINTEGRATIONSINNER_ONE_OF_SCHEMAS = ["PartialDiscordIntegrationResponse", "PartialExternalConnectionIntegrationResponse", "PartialGuildSubscriptionIntegrationResponse"]
+
+class GuildAuditLogResponseIntegrationsInner(BaseModel):
+ """
+ GuildAuditLogResponseIntegrationsInner
+ """
+ # data type: PartialDiscordIntegrationResponse
+ oneof_schema_1_validator: Optional[PartialDiscordIntegrationResponse] = None
+ # data type: PartialExternalConnectionIntegrationResponse
+ oneof_schema_2_validator: Optional[PartialExternalConnectionIntegrationResponse] = None
+ # data type: PartialGuildSubscriptionIntegrationResponse
+ oneof_schema_3_validator: Optional[PartialGuildSubscriptionIntegrationResponse] = None
+ actual_instance: Optional[Union[PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse]] = None
+ one_of_schemas: Set[str] = { "PartialDiscordIntegrationResponse", "PartialExternalConnectionIntegrationResponse", "PartialGuildSubscriptionIntegrationResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = GuildAuditLogResponseIntegrationsInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: PartialDiscordIntegrationResponse
+ if not isinstance(v, PartialDiscordIntegrationResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PartialDiscordIntegrationResponse`")
+ else:
+ match += 1
+ # validate data type: PartialExternalConnectionIntegrationResponse
+ if not isinstance(v, PartialExternalConnectionIntegrationResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PartialExternalConnectionIntegrationResponse`")
+ else:
+ match += 1
+ # validate data type: PartialGuildSubscriptionIntegrationResponse
+ if not isinstance(v, PartialGuildSubscriptionIntegrationResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PartialGuildSubscriptionIntegrationResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in GuildAuditLogResponseIntegrationsInner with oneOf schemas: PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in GuildAuditLogResponseIntegrationsInner with oneOf schemas: PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into PartialDiscordIntegrationResponse
+ try:
+ instance.actual_instance = PartialDiscordIntegrationResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into PartialExternalConnectionIntegrationResponse
+ try:
+ instance.actual_instance = PartialExternalConnectionIntegrationResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into PartialGuildSubscriptionIntegrationResponse
+ try:
+ instance.actual_instance = PartialGuildSubscriptionIntegrationResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into GuildAuditLogResponseIntegrationsInner with oneOf schemas: PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into GuildAuditLogResponseIntegrationsInner with oneOf schemas: PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/guild_ban_response.py b/dc_rest/models/guild_ban_response.py
new file mode 100644
index 0000000..9525eb5
--- /dev/null
+++ b/dc_rest/models/guild_ban_response.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildBanResponse(BaseModel):
+ """
+ GuildBanResponse
+ """ # noqa: E501
+ user: UserResponse
+ reason: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["user", "reason"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildBanResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if reason (nullable) is None
+ # and model_fields_set contains the field
+ if self.reason is None and "reason" in self.model_fields_set:
+ _dict['reason'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildBanResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildBanResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None,
+ "reason": obj.get("reason")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_channel_location.py b/dc_rest/models/guild_channel_location.py
new file mode 100644
index 0000000..7d43d1b
--- /dev/null
+++ b/dc_rest/models/guild_channel_location.py
@@ -0,0 +1,147 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildChannelLocation(BaseModel):
+ """
+ GuildChannelLocation
+ """ # noqa: E501
+ id: StrictStr
+ kind: StrictStr
+ channel_id: Annotated[str, Field(strict=True)]
+ guild_id: Annotated[str, Field(strict=True)]
+ __properties: ClassVar[List[str]] = ["id", "kind", "channel_id", "guild_id"]
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildChannelLocation from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildChannelLocation from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildChannelLocation) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "kind": obj.get("kind"),
+ "channel_id": obj.get("channel_id"),
+ "guild_id": obj.get("guild_id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_channel_response.py b/dc_rest/models/guild_channel_response.py
new file mode 100644
index 0000000..ace8ce5
--- /dev/null
+++ b/dc_rest/models/guild_channel_response.py
@@ -0,0 +1,309 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.channel_permission_overwrite_response import ChannelPermissionOverwriteResponse
+from dc_rest.models.default_reaction_emoji_response import DefaultReactionEmojiResponse
+from dc_rest.models.forum_tag_response import ForumTagResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildChannelResponse(BaseModel):
+ """
+ GuildChannelResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ type: StrictInt
+ last_message_id: Optional[Annotated[str, Field(strict=True)]] = None
+ flags: StrictInt
+ last_pin_timestamp: Optional[datetime] = None
+ guild_id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ parent_id: Optional[Annotated[str, Field(strict=True)]] = None
+ rate_limit_per_user: Optional[StrictInt] = None
+ bitrate: Optional[StrictInt] = None
+ user_limit: Optional[StrictInt] = None
+ rtc_region: Optional[StrictStr] = None
+ video_quality_mode: Optional[StrictInt] = None
+ permissions: Optional[StrictStr] = None
+ topic: Optional[StrictStr] = None
+ default_auto_archive_duration: Optional[StrictInt] = None
+ default_thread_rate_limit_per_user: Optional[StrictInt] = None
+ position: StrictInt
+ permission_overwrites: Optional[List[ChannelPermissionOverwriteResponse]] = None
+ nsfw: Optional[StrictBool] = None
+ available_tags: Optional[List[ForumTagResponse]] = None
+ default_reaction_emoji: Optional[DefaultReactionEmojiResponse] = None
+ default_sort_order: Optional[StrictInt] = None
+ default_forum_layout: Optional[StrictInt] = None
+ default_tag_setting: Optional[StrictStr] = None
+ hd_streaming_until: Optional[datetime] = None
+ hd_streaming_buyer_id: Optional[Annotated[str, Field(strict=True)]] = None
+ __properties: ClassVar[List[str]] = ["id", "type", "last_message_id", "flags", "last_pin_timestamp", "guild_id", "name", "parent_id", "rate_limit_per_user", "bitrate", "user_limit", "rtc_region", "video_quality_mode", "permissions", "topic", "default_auto_archive_duration", "default_thread_rate_limit_per_user", "position", "permission_overwrites", "nsfw", "available_tags", "default_reaction_emoji", "default_sort_order", "default_forum_layout", "default_tag_setting", "hd_streaming_until", "hd_streaming_buyer_id"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('last_message_id')
+ def last_message_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('parent_id')
+ def parent_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('hd_streaming_buyer_id')
+ def hd_streaming_buyer_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildChannelResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in permission_overwrites (list)
+ _items = []
+ if self.permission_overwrites:
+ for _item_permission_overwrites in self.permission_overwrites:
+ if _item_permission_overwrites:
+ _items.append(_item_permission_overwrites.to_dict())
+ _dict['permission_overwrites'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in available_tags (list)
+ _items = []
+ if self.available_tags:
+ for _item_available_tags in self.available_tags:
+ if _item_available_tags:
+ _items.append(_item_available_tags.to_dict())
+ _dict['available_tags'] = _items
+ # override the default output from pydantic by calling `to_dict()` of default_reaction_emoji
+ if self.default_reaction_emoji:
+ _dict['default_reaction_emoji'] = self.default_reaction_emoji.to_dict()
+ # set to None if last_pin_timestamp (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_pin_timestamp is None and "last_pin_timestamp" in self.model_fields_set:
+ _dict['last_pin_timestamp'] = None
+
+ # set to None if rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set:
+ _dict['rate_limit_per_user'] = None
+
+ # set to None if bitrate (nullable) is None
+ # and model_fields_set contains the field
+ if self.bitrate is None and "bitrate" in self.model_fields_set:
+ _dict['bitrate'] = None
+
+ # set to None if user_limit (nullable) is None
+ # and model_fields_set contains the field
+ if self.user_limit is None and "user_limit" in self.model_fields_set:
+ _dict['user_limit'] = None
+
+ # set to None if rtc_region (nullable) is None
+ # and model_fields_set contains the field
+ if self.rtc_region is None and "rtc_region" in self.model_fields_set:
+ _dict['rtc_region'] = None
+
+ # set to None if permissions (nullable) is None
+ # and model_fields_set contains the field
+ if self.permissions is None and "permissions" in self.model_fields_set:
+ _dict['permissions'] = None
+
+ # set to None if topic (nullable) is None
+ # and model_fields_set contains the field
+ if self.topic is None and "topic" in self.model_fields_set:
+ _dict['topic'] = None
+
+ # set to None if default_thread_rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_thread_rate_limit_per_user is None and "default_thread_rate_limit_per_user" in self.model_fields_set:
+ _dict['default_thread_rate_limit_per_user'] = None
+
+ # set to None if permission_overwrites (nullable) is None
+ # and model_fields_set contains the field
+ if self.permission_overwrites is None and "permission_overwrites" in self.model_fields_set:
+ _dict['permission_overwrites'] = None
+
+ # set to None if nsfw (nullable) is None
+ # and model_fields_set contains the field
+ if self.nsfw is None and "nsfw" in self.model_fields_set:
+ _dict['nsfw'] = None
+
+ # set to None if available_tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.available_tags is None and "available_tags" in self.model_fields_set:
+ _dict['available_tags'] = None
+
+ # set to None if default_reaction_emoji (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_reaction_emoji is None and "default_reaction_emoji" in self.model_fields_set:
+ _dict['default_reaction_emoji'] = None
+
+ # set to None if hd_streaming_until (nullable) is None
+ # and model_fields_set contains the field
+ if self.hd_streaming_until is None and "hd_streaming_until" in self.model_fields_set:
+ _dict['hd_streaming_until'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildChannelResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildChannelResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "last_message_id": obj.get("last_message_id"),
+ "flags": obj.get("flags"),
+ "last_pin_timestamp": obj.get("last_pin_timestamp"),
+ "guild_id": obj.get("guild_id"),
+ "name": obj.get("name"),
+ "parent_id": obj.get("parent_id"),
+ "rate_limit_per_user": obj.get("rate_limit_per_user"),
+ "bitrate": obj.get("bitrate"),
+ "user_limit": obj.get("user_limit"),
+ "rtc_region": obj.get("rtc_region"),
+ "video_quality_mode": obj.get("video_quality_mode"),
+ "permissions": obj.get("permissions"),
+ "topic": obj.get("topic"),
+ "default_auto_archive_duration": obj.get("default_auto_archive_duration"),
+ "default_thread_rate_limit_per_user": obj.get("default_thread_rate_limit_per_user"),
+ "position": obj.get("position"),
+ "permission_overwrites": [ChannelPermissionOverwriteResponse.from_dict(_item) for _item in obj["permission_overwrites"]] if obj.get("permission_overwrites") is not None else None,
+ "nsfw": obj.get("nsfw"),
+ "available_tags": [ForumTagResponse.from_dict(_item) for _item in obj["available_tags"]] if obj.get("available_tags") is not None else None,
+ "default_reaction_emoji": DefaultReactionEmojiResponse.from_dict(obj["default_reaction_emoji"]) if obj.get("default_reaction_emoji") is not None else None,
+ "default_sort_order": obj.get("default_sort_order"),
+ "default_forum_layout": obj.get("default_forum_layout"),
+ "default_tag_setting": obj.get("default_tag_setting"),
+ "hd_streaming_until": obj.get("hd_streaming_until"),
+ "hd_streaming_buyer_id": obj.get("hd_streaming_buyer_id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_create_request.py b/dc_rest/models/guild_create_request.py
new file mode 100644
index 0000000..4963582
--- /dev/null
+++ b/dc_rest/models/guild_create_request.py
@@ -0,0 +1,224 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.create_guild_request_channel_item import CreateGuildRequestChannelItem
+from dc_rest.models.create_guild_request_role_item import CreateGuildRequestRoleItem
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildCreateRequest(BaseModel):
+ """
+ GuildCreateRequest
+ """ # noqa: E501
+ description: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=300)]] = None
+ name: Annotated[str, Field(min_length=2, strict=True, max_length=100)]
+ region: Optional[StrictStr] = None
+ icon: Optional[StrictStr] = None
+ verification_level: Optional[StrictInt] = None
+ default_message_notifications: Optional[StrictInt] = None
+ explicit_content_filter: Optional[StrictInt] = None
+ preferred_locale: Optional[StrictStr] = None
+ afk_timeout: Optional[StrictInt] = None
+ roles: Optional[Annotated[List[CreateGuildRequestRoleItem], Field(max_length=1521)]] = None
+ channels: Optional[Annotated[List[CreateGuildRequestChannelItem], Field(max_length=1521)]] = None
+ afk_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ system_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ system_channel_flags: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["description", "name", "region", "icon", "verification_level", "default_message_notifications", "explicit_content_filter", "preferred_locale", "afk_timeout", "roles", "channels", "afk_channel_id", "system_channel_id", "system_channel_flags"]
+
+ @field_validator('afk_channel_id')
+ def afk_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('system_channel_id')
+ def system_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildCreateRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in roles (list)
+ _items = []
+ if self.roles:
+ for _item_roles in self.roles:
+ if _item_roles:
+ _items.append(_item_roles.to_dict())
+ _dict['roles'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in channels (list)
+ _items = []
+ if self.channels:
+ for _item_channels in self.channels:
+ if _item_channels:
+ _items.append(_item_channels.to_dict())
+ _dict['channels'] = _items
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if region (nullable) is None
+ # and model_fields_set contains the field
+ if self.region is None and "region" in self.model_fields_set:
+ _dict['region'] = None
+
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if afk_timeout (nullable) is None
+ # and model_fields_set contains the field
+ if self.afk_timeout is None and "afk_timeout" in self.model_fields_set:
+ _dict['afk_timeout'] = None
+
+ # set to None if roles (nullable) is None
+ # and model_fields_set contains the field
+ if self.roles is None and "roles" in self.model_fields_set:
+ _dict['roles'] = None
+
+ # set to None if channels (nullable) is None
+ # and model_fields_set contains the field
+ if self.channels is None and "channels" in self.model_fields_set:
+ _dict['channels'] = None
+
+ # set to None if system_channel_flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.system_channel_flags is None and "system_channel_flags" in self.model_fields_set:
+ _dict['system_channel_flags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildCreateRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildCreateRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "description": obj.get("description"),
+ "name": obj.get("name"),
+ "region": obj.get("region"),
+ "icon": obj.get("icon"),
+ "verification_level": obj.get("verification_level"),
+ "default_message_notifications": obj.get("default_message_notifications"),
+ "explicit_content_filter": obj.get("explicit_content_filter"),
+ "preferred_locale": obj.get("preferred_locale"),
+ "afk_timeout": obj.get("afk_timeout"),
+ "roles": [CreateGuildRequestRoleItem.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
+ "channels": [CreateGuildRequestChannelItem.from_dict(_item) for _item in obj["channels"]] if obj.get("channels") is not None else None,
+ "afk_channel_id": obj.get("afk_channel_id"),
+ "system_channel_id": obj.get("system_channel_id"),
+ "system_channel_flags": obj.get("system_channel_flags")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_home_settings_response.py b/dc_rest/models/guild_home_settings_response.py
new file mode 100644
index 0000000..ea77c27
--- /dev/null
+++ b/dc_rest/models/guild_home_settings_response.py
@@ -0,0 +1,177 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.new_member_action_response import NewMemberActionResponse
+from dc_rest.models.resource_channel_response import ResourceChannelResponse
+from dc_rest.models.welcome_message_response import WelcomeMessageResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildHomeSettingsResponse(BaseModel):
+ """
+ GuildHomeSettingsResponse
+ """ # noqa: E501
+ guild_id: Annotated[str, Field(strict=True)]
+ enabled: StrictBool
+ welcome_message: Optional[WelcomeMessageResponse] = None
+ new_member_actions: Optional[List[Optional[NewMemberActionResponse]]] = None
+ resource_channels: Optional[List[Optional[ResourceChannelResponse]]] = None
+ __properties: ClassVar[List[str]] = ["guild_id", "enabled", "welcome_message", "new_member_actions", "resource_channels"]
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildHomeSettingsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of welcome_message
+ if self.welcome_message:
+ _dict['welcome_message'] = self.welcome_message.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in new_member_actions (list)
+ _items = []
+ if self.new_member_actions:
+ for _item_new_member_actions in self.new_member_actions:
+ if _item_new_member_actions:
+ _items.append(_item_new_member_actions.to_dict())
+ _dict['new_member_actions'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in resource_channels (list)
+ _items = []
+ if self.resource_channels:
+ for _item_resource_channels in self.resource_channels:
+ if _item_resource_channels:
+ _items.append(_item_resource_channels.to_dict())
+ _dict['resource_channels'] = _items
+ # set to None if welcome_message (nullable) is None
+ # and model_fields_set contains the field
+ if self.welcome_message is None and "welcome_message" in self.model_fields_set:
+ _dict['welcome_message'] = None
+
+ # set to None if new_member_actions (nullable) is None
+ # and model_fields_set contains the field
+ if self.new_member_actions is None and "new_member_actions" in self.model_fields_set:
+ _dict['new_member_actions'] = None
+
+ # set to None if resource_channels (nullable) is None
+ # and model_fields_set contains the field
+ if self.resource_channels is None and "resource_channels" in self.model_fields_set:
+ _dict['resource_channels'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildHomeSettingsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildHomeSettingsResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "guild_id": obj.get("guild_id"),
+ "enabled": obj.get("enabled"),
+ "welcome_message": WelcomeMessageResponse.from_dict(obj["welcome_message"]) if obj.get("welcome_message") is not None else None,
+ "new_member_actions": [NewMemberActionResponse.from_dict(_item) for _item in obj["new_member_actions"]] if obj.get("new_member_actions") is not None else None,
+ "resource_channels": [ResourceChannelResponse.from_dict(_item) for _item in obj["resource_channels"]] if obj.get("resource_channels") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_incoming_webhook_response.py b/dc_rest/models/guild_incoming_webhook_response.py
new file mode 100644
index 0000000..2d5c982
--- /dev/null
+++ b/dc_rest/models/guild_incoming_webhook_response.py
@@ -0,0 +1,206 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildIncomingWebhookResponse(BaseModel):
+ """
+ GuildIncomingWebhookResponse
+ """ # noqa: E501
+ application_id: Optional[Annotated[str, Field(strict=True)]] = None
+ avatar: Optional[StrictStr] = None
+ channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ type: StrictInt
+ user: Optional[UserResponse] = None
+ token: Optional[StrictStr] = None
+ url: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["application_id", "avatar", "channel_id", "guild_id", "id", "name", "type", "user", "token", "url"]
+
+ @field_validator('application_id')
+ def application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildIncomingWebhookResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if avatar (nullable) is None
+ # and model_fields_set contains the field
+ if self.avatar is None and "avatar" in self.model_fields_set:
+ _dict['avatar'] = None
+
+ # set to None if user (nullable) is None
+ # and model_fields_set contains the field
+ if self.user is None and "user" in self.model_fields_set:
+ _dict['user'] = None
+
+ # set to None if token (nullable) is None
+ # and model_fields_set contains the field
+ if self.token is None and "token" in self.model_fields_set:
+ _dict['token'] = None
+
+ # set to None if url (nullable) is None
+ # and model_fields_set contains the field
+ if self.url is None and "url" in self.model_fields_set:
+ _dict['url'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildIncomingWebhookResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildIncomingWebhookResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "application_id": obj.get("application_id"),
+ "avatar": obj.get("avatar"),
+ "channel_id": obj.get("channel_id"),
+ "guild_id": obj.get("guild_id"),
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "type": obj.get("type"),
+ "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None,
+ "token": obj.get("token"),
+ "url": obj.get("url")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_invite_response.py b/dc_rest/models/guild_invite_response.py
new file mode 100644
index 0000000..59adb88
--- /dev/null
+++ b/dc_rest/models/guild_invite_response.py
@@ -0,0 +1,296 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.invite_application_response import InviteApplicationResponse
+from dc_rest.models.invite_channel_response import InviteChannelResponse
+from dc_rest.models.invite_guild_response import InviteGuildResponse
+from dc_rest.models.scheduled_event_response import ScheduledEventResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildInviteResponse(BaseModel):
+ """
+ GuildInviteResponse
+ """ # noqa: E501
+ type: Optional[StrictInt] = None
+ code: StrictStr
+ inviter: Optional[UserResponse] = None
+ max_age: Optional[StrictInt] = None
+ created_at: Optional[datetime] = None
+ expires_at: Optional[datetime] = None
+ is_contact: Optional[StrictBool] = None
+ flags: Optional[StrictInt] = None
+ guild: Optional[InviteGuildResponse] = None
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None
+ channel: Optional[InviteChannelResponse] = None
+ target_type: Optional[StrictInt] = None
+ target_user: Optional[UserResponse] = None
+ target_application: Optional[InviteApplicationResponse] = None
+ guild_scheduled_event: Optional[ScheduledEventResponse] = None
+ uses: Optional[StrictInt] = None
+ max_uses: Optional[StrictInt] = None
+ temporary: Optional[StrictBool] = None
+ approximate_member_count: Optional[StrictInt] = None
+ approximate_presence_count: Optional[StrictInt] = None
+ is_nickname_changeable: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["type", "code", "inviter", "max_age", "created_at", "expires_at", "is_contact", "flags", "guild", "guild_id", "channel", "target_type", "target_user", "target_application", "guild_scheduled_event", "uses", "max_uses", "temporary", "approximate_member_count", "approximate_presence_count", "is_nickname_changeable"]
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildInviteResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of inviter
+ if self.inviter:
+ _dict['inviter'] = self.inviter.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of guild
+ if self.guild:
+ _dict['guild'] = self.guild.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of channel
+ if self.channel:
+ _dict['channel'] = self.channel.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of target_user
+ if self.target_user:
+ _dict['target_user'] = self.target_user.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of target_application
+ if self.target_application:
+ _dict['target_application'] = self.target_application.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of guild_scheduled_event
+ if self.guild_scheduled_event:
+ _dict['guild_scheduled_event'] = self.guild_scheduled_event.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if inviter (nullable) is None
+ # and model_fields_set contains the field
+ if self.inviter is None and "inviter" in self.model_fields_set:
+ _dict['inviter'] = None
+
+ # set to None if max_age (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_age is None and "max_age" in self.model_fields_set:
+ _dict['max_age'] = None
+
+ # set to None if created_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.created_at is None and "created_at" in self.model_fields_set:
+ _dict['created_at'] = None
+
+ # set to None if expires_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.expires_at is None and "expires_at" in self.model_fields_set:
+ _dict['expires_at'] = None
+
+ # set to None if is_contact (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_contact is None and "is_contact" in self.model_fields_set:
+ _dict['is_contact'] = None
+
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ # set to None if guild (nullable) is None
+ # and model_fields_set contains the field
+ if self.guild is None and "guild" in self.model_fields_set:
+ _dict['guild'] = None
+
+ # set to None if channel (nullable) is None
+ # and model_fields_set contains the field
+ if self.channel is None and "channel" in self.model_fields_set:
+ _dict['channel'] = None
+
+ # set to None if target_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_type is None and "target_type" in self.model_fields_set:
+ _dict['target_type'] = None
+
+ # set to None if target_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_user is None and "target_user" in self.model_fields_set:
+ _dict['target_user'] = None
+
+ # set to None if target_application (nullable) is None
+ # and model_fields_set contains the field
+ if self.target_application is None and "target_application" in self.model_fields_set:
+ _dict['target_application'] = None
+
+ # set to None if guild_scheduled_event (nullable) is None
+ # and model_fields_set contains the field
+ if self.guild_scheduled_event is None and "guild_scheduled_event" in self.model_fields_set:
+ _dict['guild_scheduled_event'] = None
+
+ # set to None if uses (nullable) is None
+ # and model_fields_set contains the field
+ if self.uses is None and "uses" in self.model_fields_set:
+ _dict['uses'] = None
+
+ # set to None if max_uses (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_uses is None and "max_uses" in self.model_fields_set:
+ _dict['max_uses'] = None
+
+ # set to None if temporary (nullable) is None
+ # and model_fields_set contains the field
+ if self.temporary is None and "temporary" in self.model_fields_set:
+ _dict['temporary'] = None
+
+ # set to None if approximate_member_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.approximate_member_count is None and "approximate_member_count" in self.model_fields_set:
+ _dict['approximate_member_count'] = None
+
+ # set to None if approximate_presence_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.approximate_presence_count is None and "approximate_presence_count" in self.model_fields_set:
+ _dict['approximate_presence_count'] = None
+
+ # set to None if is_nickname_changeable (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_nickname_changeable is None and "is_nickname_changeable" in self.model_fields_set:
+ _dict['is_nickname_changeable'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildInviteResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildInviteResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "code": obj.get("code"),
+ "inviter": UserResponse.from_dict(obj["inviter"]) if obj.get("inviter") is not None else None,
+ "max_age": obj.get("max_age"),
+ "created_at": obj.get("created_at"),
+ "expires_at": obj.get("expires_at"),
+ "is_contact": obj.get("is_contact"),
+ "flags": obj.get("flags"),
+ "guild": InviteGuildResponse.from_dict(obj["guild"]) if obj.get("guild") is not None else None,
+ "guild_id": obj.get("guild_id"),
+ "channel": InviteChannelResponse.from_dict(obj["channel"]) if obj.get("channel") is not None else None,
+ "target_type": obj.get("target_type"),
+ "target_user": UserResponse.from_dict(obj["target_user"]) if obj.get("target_user") is not None else None,
+ "target_application": InviteApplicationResponse.from_dict(obj["target_application"]) if obj.get("target_application") is not None else None,
+ "guild_scheduled_event": ScheduledEventResponse.from_dict(obj["guild_scheduled_event"]) if obj.get("guild_scheduled_event") is not None else None,
+ "uses": obj.get("uses"),
+ "max_uses": obj.get("max_uses"),
+ "temporary": obj.get("temporary"),
+ "approximate_member_count": obj.get("approximate_member_count"),
+ "approximate_presence_count": obj.get("approximate_presence_count"),
+ "is_nickname_changeable": obj.get("is_nickname_changeable")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_member_response.py b/dc_rest/models/guild_member_response.py
new file mode 100644
index 0000000..b548288
--- /dev/null
+++ b/dc_rest/models/guild_member_response.py
@@ -0,0 +1,190 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildMemberResponse(BaseModel):
+ """
+ GuildMemberResponse
+ """ # noqa: E501
+ avatar: Optional[StrictStr] = None
+ avatar_decoration_data: Optional[UserAvatarDecorationResponse] = None
+ banner: Optional[StrictStr] = None
+ communication_disabled_until: Optional[datetime] = None
+ flags: StrictInt
+ joined_at: datetime
+ nick: Optional[StrictStr] = None
+ pending: StrictBool
+ premium_since: Optional[datetime] = None
+ roles: List[Annotated[str, Field(strict=True)]]
+ user: UserResponse
+ mute: StrictBool
+ deaf: StrictBool
+ __properties: ClassVar[List[str]] = ["avatar", "avatar_decoration_data", "banner", "communication_disabled_until", "flags", "joined_at", "nick", "pending", "premium_since", "roles", "user", "mute", "deaf"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildMemberResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of avatar_decoration_data
+ if self.avatar_decoration_data:
+ _dict['avatar_decoration_data'] = self.avatar_decoration_data.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if avatar (nullable) is None
+ # and model_fields_set contains the field
+ if self.avatar is None and "avatar" in self.model_fields_set:
+ _dict['avatar'] = None
+
+ # set to None if avatar_decoration_data (nullable) is None
+ # and model_fields_set contains the field
+ if self.avatar_decoration_data is None and "avatar_decoration_data" in self.model_fields_set:
+ _dict['avatar_decoration_data'] = None
+
+ # set to None if banner (nullable) is None
+ # and model_fields_set contains the field
+ if self.banner is None and "banner" in self.model_fields_set:
+ _dict['banner'] = None
+
+ # set to None if communication_disabled_until (nullable) is None
+ # and model_fields_set contains the field
+ if self.communication_disabled_until is None and "communication_disabled_until" in self.model_fields_set:
+ _dict['communication_disabled_until'] = None
+
+ # set to None if nick (nullable) is None
+ # and model_fields_set contains the field
+ if self.nick is None and "nick" in self.model_fields_set:
+ _dict['nick'] = None
+
+ # set to None if premium_since (nullable) is None
+ # and model_fields_set contains the field
+ if self.premium_since is None and "premium_since" in self.model_fields_set:
+ _dict['premium_since'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildMemberResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildMemberResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "avatar": obj.get("avatar"),
+ "avatar_decoration_data": UserAvatarDecorationResponse.from_dict(obj["avatar_decoration_data"]) if obj.get("avatar_decoration_data") is not None else None,
+ "banner": obj.get("banner"),
+ "communication_disabled_until": obj.get("communication_disabled_until"),
+ "flags": obj.get("flags"),
+ "joined_at": obj.get("joined_at"),
+ "nick": obj.get("nick"),
+ "pending": obj.get("pending"),
+ "premium_since": obj.get("premium_since"),
+ "roles": obj.get("roles"),
+ "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None,
+ "mute": obj.get("mute"),
+ "deaf": obj.get("deaf")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_mfa_level_response.py b/dc_rest/models/guild_mfa_level_response.py
new file mode 100644
index 0000000..16be023
--- /dev/null
+++ b/dc_rest/models/guild_mfa_level_response.py
@@ -0,0 +1,126 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildMFALevelResponse(BaseModel):
+ """
+ GuildMFALevelResponse
+ """ # noqa: E501
+ level: StrictInt
+ __properties: ClassVar[List[str]] = ["level"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildMFALevelResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildMFALevelResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildMFALevelResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "level": obj.get("level")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_onboarding_response.py b/dc_rest/models/guild_onboarding_response.py
new file mode 100644
index 0000000..dbf1e63
--- /dev/null
+++ b/dc_rest/models/guild_onboarding_response.py
@@ -0,0 +1,148 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from dc_rest.models.onboarding_prompt_response import OnboardingPromptResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildOnboardingResponse(BaseModel):
+ """
+ GuildOnboardingResponse
+ """ # noqa: E501
+ guild_id: Annotated[str, Field(strict=True)]
+ prompts: List[OnboardingPromptResponse]
+ default_channel_ids: List[Annotated[str, Field(strict=True)]]
+ enabled: StrictBool
+ __properties: ClassVar[List[str]] = ["guild_id", "prompts", "default_channel_ids", "enabled"]
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildOnboardingResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in prompts (list)
+ _items = []
+ if self.prompts:
+ for _item_prompts in self.prompts:
+ if _item_prompts:
+ _items.append(_item_prompts.to_dict())
+ _dict['prompts'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildOnboardingResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildOnboardingResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "guild_id": obj.get("guild_id"),
+ "prompts": [OnboardingPromptResponse.from_dict(_item) for _item in obj["prompts"]] if obj.get("prompts") is not None else None,
+ "default_channel_ids": obj.get("default_channel_ids"),
+ "enabled": obj.get("enabled")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_patch_request_partial.py b/dc_rest/models/guild_patch_request_partial.py
new file mode 100644
index 0000000..7b40751
--- /dev/null
+++ b/dc_rest/models/guild_patch_request_partial.py
@@ -0,0 +1,284 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildPatchRequestPartial(BaseModel):
+ """
+ GuildPatchRequestPartial
+ """ # noqa: E501
+ name: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=100)]] = None
+ description: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=300)]] = None
+ region: Optional[StrictStr] = None
+ icon: Optional[StrictStr] = None
+ verification_level: Optional[StrictInt] = None
+ default_message_notifications: Optional[StrictInt] = None
+ explicit_content_filter: Optional[StrictInt] = None
+ preferred_locale: Optional[StrictStr] = None
+ afk_timeout: Optional[StrictInt] = None
+ afk_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ system_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ owner_id: Optional[Annotated[str, Field(strict=True)]] = None
+ splash: Optional[StrictStr] = None
+ banner: Optional[StrictStr] = None
+ system_channel_flags: Optional[StrictInt] = None
+ features: Optional[Annotated[List[Optional[Annotated[str, Field(strict=True, max_length=152133)]]], Field(max_length=1521)]] = None
+ discovery_splash: Optional[StrictStr] = None
+ home_header: Optional[StrictStr] = None
+ rules_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ safety_alerts_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ public_updates_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ premium_progress_bar_enabled: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["name", "description", "region", "icon", "verification_level", "default_message_notifications", "explicit_content_filter", "preferred_locale", "afk_timeout", "afk_channel_id", "system_channel_id", "owner_id", "splash", "banner", "system_channel_flags", "features", "discovery_splash", "home_header", "rules_channel_id", "safety_alerts_channel_id", "public_updates_channel_id", "premium_progress_bar_enabled"]
+
+ @field_validator('afk_channel_id')
+ def afk_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('system_channel_id')
+ def system_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('owner_id')
+ def owner_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('rules_channel_id')
+ def rules_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('safety_alerts_channel_id')
+ def safety_alerts_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('public_updates_channel_id')
+ def public_updates_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildPatchRequestPartial from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if region (nullable) is None
+ # and model_fields_set contains the field
+ if self.region is None and "region" in self.model_fields_set:
+ _dict['region'] = None
+
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if afk_timeout (nullable) is None
+ # and model_fields_set contains the field
+ if self.afk_timeout is None and "afk_timeout" in self.model_fields_set:
+ _dict['afk_timeout'] = None
+
+ # set to None if splash (nullable) is None
+ # and model_fields_set contains the field
+ if self.splash is None and "splash" in self.model_fields_set:
+ _dict['splash'] = None
+
+ # set to None if banner (nullable) is None
+ # and model_fields_set contains the field
+ if self.banner is None and "banner" in self.model_fields_set:
+ _dict['banner'] = None
+
+ # set to None if system_channel_flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.system_channel_flags is None and "system_channel_flags" in self.model_fields_set:
+ _dict['system_channel_flags'] = None
+
+ # set to None if features (nullable) is None
+ # and model_fields_set contains the field
+ if self.features is None and "features" in self.model_fields_set:
+ _dict['features'] = None
+
+ # set to None if discovery_splash (nullable) is None
+ # and model_fields_set contains the field
+ if self.discovery_splash is None and "discovery_splash" in self.model_fields_set:
+ _dict['discovery_splash'] = None
+
+ # set to None if home_header (nullable) is None
+ # and model_fields_set contains the field
+ if self.home_header is None and "home_header" in self.model_fields_set:
+ _dict['home_header'] = None
+
+ # set to None if premium_progress_bar_enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.premium_progress_bar_enabled is None and "premium_progress_bar_enabled" in self.model_fields_set:
+ _dict['premium_progress_bar_enabled'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildPatchRequestPartial from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildPatchRequestPartial) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "region": obj.get("region"),
+ "icon": obj.get("icon"),
+ "verification_level": obj.get("verification_level"),
+ "default_message_notifications": obj.get("default_message_notifications"),
+ "explicit_content_filter": obj.get("explicit_content_filter"),
+ "preferred_locale": obj.get("preferred_locale"),
+ "afk_timeout": obj.get("afk_timeout"),
+ "afk_channel_id": obj.get("afk_channel_id"),
+ "system_channel_id": obj.get("system_channel_id"),
+ "owner_id": obj.get("owner_id"),
+ "splash": obj.get("splash"),
+ "banner": obj.get("banner"),
+ "system_channel_flags": obj.get("system_channel_flags"),
+ "features": obj.get("features"),
+ "discovery_splash": obj.get("discovery_splash"),
+ "home_header": obj.get("home_header"),
+ "rules_channel_id": obj.get("rules_channel_id"),
+ "safety_alerts_channel_id": obj.get("safety_alerts_channel_id"),
+ "public_updates_channel_id": obj.get("public_updates_channel_id"),
+ "premium_progress_bar_enabled": obj.get("premium_progress_bar_enabled")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_preview_response.py b/dc_rest/models/guild_preview_response.py
new file mode 100644
index 0000000..62046e4
--- /dev/null
+++ b/dc_rest/models/guild_preview_response.py
@@ -0,0 +1,197 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.emoji_response import EmojiResponse
+from dc_rest.models.guild_sticker_response import GuildStickerResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildPreviewResponse(BaseModel):
+ """
+ GuildPreviewResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ icon: Optional[StrictStr] = None
+ description: Optional[StrictStr] = None
+ home_header: Optional[StrictStr] = None
+ splash: Optional[StrictStr] = None
+ discovery_splash: Optional[StrictStr] = None
+ features: List[StrictStr]
+ approximate_member_count: StrictInt
+ approximate_presence_count: StrictInt
+ emojis: List[EmojiResponse]
+ stickers: List[GuildStickerResponse]
+ __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "home_header", "splash", "discovery_splash", "features", "approximate_member_count", "approximate_presence_count", "emojis", "stickers"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildPreviewResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in emojis (list)
+ _items = []
+ if self.emojis:
+ for _item_emojis in self.emojis:
+ if _item_emojis:
+ _items.append(_item_emojis.to_dict())
+ _dict['emojis'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in stickers (list)
+ _items = []
+ if self.stickers:
+ for _item_stickers in self.stickers:
+ if _item_stickers:
+ _items.append(_item_stickers.to_dict())
+ _dict['stickers'] = _items
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if home_header (nullable) is None
+ # and model_fields_set contains the field
+ if self.home_header is None and "home_header" in self.model_fields_set:
+ _dict['home_header'] = None
+
+ # set to None if splash (nullable) is None
+ # and model_fields_set contains the field
+ if self.splash is None and "splash" in self.model_fields_set:
+ _dict['splash'] = None
+
+ # set to None if discovery_splash (nullable) is None
+ # and model_fields_set contains the field
+ if self.discovery_splash is None and "discovery_splash" in self.model_fields_set:
+ _dict['discovery_splash'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildPreviewResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildPreviewResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "icon": obj.get("icon"),
+ "description": obj.get("description"),
+ "home_header": obj.get("home_header"),
+ "splash": obj.get("splash"),
+ "discovery_splash": obj.get("discovery_splash"),
+ "features": obj.get("features"),
+ "approximate_member_count": obj.get("approximate_member_count"),
+ "approximate_presence_count": obj.get("approximate_presence_count"),
+ "emojis": [EmojiResponse.from_dict(_item) for _item in obj["emojis"]] if obj.get("emojis") is not None else None,
+ "stickers": [GuildStickerResponse.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_product_purchase_response.py b/dc_rest/models/guild_product_purchase_response.py
new file mode 100644
index 0000000..8ca700f
--- /dev/null
+++ b/dc_rest/models/guild_product_purchase_response.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildProductPurchaseResponse(BaseModel):
+ """
+ GuildProductPurchaseResponse
+ """ # noqa: E501
+ listing_id: Annotated[str, Field(strict=True)]
+ product_name: StrictStr
+ __properties: ClassVar[List[str]] = ["listing_id", "product_name"]
+
+ @field_validator('listing_id')
+ def listing_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildProductPurchaseResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildProductPurchaseResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildProductPurchaseResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "listing_id": obj.get("listing_id"),
+ "product_name": obj.get("product_name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_prune_response.py b/dc_rest/models/guild_prune_response.py
new file mode 100644
index 0000000..dec3d51
--- /dev/null
+++ b/dc_rest/models/guild_prune_response.py
@@ -0,0 +1,131 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildPruneResponse(BaseModel):
+ """
+ GuildPruneResponse
+ """ # noqa: E501
+ pruned: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["pruned"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildPruneResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if pruned (nullable) is None
+ # and model_fields_set contains the field
+ if self.pruned is None and "pruned" in self.model_fields_set:
+ _dict['pruned'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildPruneResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildPruneResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "pruned": obj.get("pruned")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_response.py b/dc_rest/models/guild_response.py
new file mode 100644
index 0000000..b544367
--- /dev/null
+++ b/dc_rest/models/guild_response.py
@@ -0,0 +1,376 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.emoji_response import EmojiResponse
+from dc_rest.models.guild_role_response import GuildRoleResponse
+from dc_rest.models.guild_sticker_response import GuildStickerResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildResponse(BaseModel):
+ """
+ GuildResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ icon: Optional[StrictStr] = None
+ description: Optional[StrictStr] = None
+ home_header: Optional[StrictStr] = None
+ splash: Optional[StrictStr] = None
+ discovery_splash: Optional[StrictStr] = None
+ features: List[StrictStr]
+ banner: Optional[StrictStr] = None
+ owner_id: Annotated[str, Field(strict=True)]
+ application_id: Optional[Annotated[str, Field(strict=True)]] = None
+ region: StrictStr
+ afk_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ afk_timeout: Optional[StrictInt]
+ system_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ system_channel_flags: StrictInt
+ widget_enabled: StrictBool
+ widget_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ verification_level: StrictInt
+ roles: List[GuildRoleResponse]
+ default_message_notifications: StrictInt
+ mfa_level: StrictInt
+ explicit_content_filter: StrictInt
+ max_presences: Optional[StrictInt] = None
+ max_members: Optional[StrictInt] = None
+ max_stage_video_channel_users: Optional[StrictInt] = None
+ max_video_channel_users: Optional[StrictInt] = None
+ vanity_url_code: Optional[StrictStr] = None
+ premium_tier: StrictInt
+ premium_subscription_count: StrictInt
+ preferred_locale: StrictStr
+ rules_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ safety_alerts_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ public_updates_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ premium_progress_bar_enabled: StrictBool
+ nsfw: StrictBool
+ nsfw_level: Optional[StrictInt]
+ emojis: List[EmojiResponse]
+ stickers: List[GuildStickerResponse]
+ __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "home_header", "splash", "discovery_splash", "features", "banner", "owner_id", "application_id", "region", "afk_channel_id", "afk_timeout", "system_channel_id", "system_channel_flags", "widget_enabled", "widget_channel_id", "verification_level", "roles", "default_message_notifications", "mfa_level", "explicit_content_filter", "max_presences", "max_members", "max_stage_video_channel_users", "max_video_channel_users", "vanity_url_code", "premium_tier", "premium_subscription_count", "preferred_locale", "rules_channel_id", "safety_alerts_channel_id", "public_updates_channel_id", "premium_progress_bar_enabled", "nsfw", "nsfw_level", "emojis", "stickers"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('owner_id')
+ def owner_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('application_id')
+ def application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('afk_channel_id')
+ def afk_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('system_channel_id')
+ def system_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('widget_channel_id')
+ def widget_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('rules_channel_id')
+ def rules_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('safety_alerts_channel_id')
+ def safety_alerts_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('public_updates_channel_id')
+ def public_updates_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in roles (list)
+ _items = []
+ if self.roles:
+ for _item_roles in self.roles:
+ if _item_roles:
+ _items.append(_item_roles.to_dict())
+ _dict['roles'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in emojis (list)
+ _items = []
+ if self.emojis:
+ for _item_emojis in self.emojis:
+ if _item_emojis:
+ _items.append(_item_emojis.to_dict())
+ _dict['emojis'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in stickers (list)
+ _items = []
+ if self.stickers:
+ for _item_stickers in self.stickers:
+ if _item_stickers:
+ _items.append(_item_stickers.to_dict())
+ _dict['stickers'] = _items
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if home_header (nullable) is None
+ # and model_fields_set contains the field
+ if self.home_header is None and "home_header" in self.model_fields_set:
+ _dict['home_header'] = None
+
+ # set to None if splash (nullable) is None
+ # and model_fields_set contains the field
+ if self.splash is None and "splash" in self.model_fields_set:
+ _dict['splash'] = None
+
+ # set to None if discovery_splash (nullable) is None
+ # and model_fields_set contains the field
+ if self.discovery_splash is None and "discovery_splash" in self.model_fields_set:
+ _dict['discovery_splash'] = None
+
+ # set to None if banner (nullable) is None
+ # and model_fields_set contains the field
+ if self.banner is None and "banner" in self.model_fields_set:
+ _dict['banner'] = None
+
+ # set to None if afk_timeout (nullable) is None
+ # and model_fields_set contains the field
+ if self.afk_timeout is None and "afk_timeout" in self.model_fields_set:
+ _dict['afk_timeout'] = None
+
+ # set to None if max_presences (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_presences is None and "max_presences" in self.model_fields_set:
+ _dict['max_presences'] = None
+
+ # set to None if max_members (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_members is None and "max_members" in self.model_fields_set:
+ _dict['max_members'] = None
+
+ # set to None if max_stage_video_channel_users (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_stage_video_channel_users is None and "max_stage_video_channel_users" in self.model_fields_set:
+ _dict['max_stage_video_channel_users'] = None
+
+ # set to None if max_video_channel_users (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_video_channel_users is None and "max_video_channel_users" in self.model_fields_set:
+ _dict['max_video_channel_users'] = None
+
+ # set to None if vanity_url_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.vanity_url_code is None and "vanity_url_code" in self.model_fields_set:
+ _dict['vanity_url_code'] = None
+
+ # set to None if nsfw_level (nullable) is None
+ # and model_fields_set contains the field
+ if self.nsfw_level is None and "nsfw_level" in self.model_fields_set:
+ _dict['nsfw_level'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "icon": obj.get("icon"),
+ "description": obj.get("description"),
+ "home_header": obj.get("home_header"),
+ "splash": obj.get("splash"),
+ "discovery_splash": obj.get("discovery_splash"),
+ "features": obj.get("features"),
+ "banner": obj.get("banner"),
+ "owner_id": obj.get("owner_id"),
+ "application_id": obj.get("application_id"),
+ "region": obj.get("region"),
+ "afk_channel_id": obj.get("afk_channel_id"),
+ "afk_timeout": obj.get("afk_timeout"),
+ "system_channel_id": obj.get("system_channel_id"),
+ "system_channel_flags": obj.get("system_channel_flags"),
+ "widget_enabled": obj.get("widget_enabled"),
+ "widget_channel_id": obj.get("widget_channel_id"),
+ "verification_level": obj.get("verification_level"),
+ "roles": [GuildRoleResponse.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
+ "default_message_notifications": obj.get("default_message_notifications"),
+ "mfa_level": obj.get("mfa_level"),
+ "explicit_content_filter": obj.get("explicit_content_filter"),
+ "max_presences": obj.get("max_presences"),
+ "max_members": obj.get("max_members"),
+ "max_stage_video_channel_users": obj.get("max_stage_video_channel_users"),
+ "max_video_channel_users": obj.get("max_video_channel_users"),
+ "vanity_url_code": obj.get("vanity_url_code"),
+ "premium_tier": obj.get("premium_tier"),
+ "premium_subscription_count": obj.get("premium_subscription_count"),
+ "preferred_locale": obj.get("preferred_locale"),
+ "rules_channel_id": obj.get("rules_channel_id"),
+ "safety_alerts_channel_id": obj.get("safety_alerts_channel_id"),
+ "public_updates_channel_id": obj.get("public_updates_channel_id"),
+ "premium_progress_bar_enabled": obj.get("premium_progress_bar_enabled"),
+ "nsfw": obj.get("nsfw"),
+ "nsfw_level": obj.get("nsfw_level"),
+ "emojis": [EmojiResponse.from_dict(_item) for _item in obj["emojis"]] if obj.get("emojis") is not None else None,
+ "stickers": [GuildStickerResponse.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_role_response.py b/dc_rest/models/guild_role_response.py
new file mode 100644
index 0000000..2bd70bb
--- /dev/null
+++ b/dc_rest/models/guild_role_response.py
@@ -0,0 +1,180 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.guild_role_tags_response import GuildRoleTagsResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildRoleResponse(BaseModel):
+ """
+ GuildRoleResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ description: Optional[StrictStr] = None
+ permissions: StrictStr
+ position: StrictInt
+ color: StrictInt
+ hoist: StrictBool
+ managed: StrictBool
+ mentionable: StrictBool
+ icon: Optional[StrictStr] = None
+ unicode_emoji: Optional[StrictStr] = None
+ tags: Optional[GuildRoleTagsResponse] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "permissions", "position", "color", "hoist", "managed", "mentionable", "icon", "unicode_emoji", "tags"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildRoleResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of tags
+ if self.tags:
+ _dict['tags'] = self.tags.to_dict()
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if unicode_emoji (nullable) is None
+ # and model_fields_set contains the field
+ if self.unicode_emoji is None and "unicode_emoji" in self.model_fields_set:
+ _dict['unicode_emoji'] = None
+
+ # set to None if tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.tags is None and "tags" in self.model_fields_set:
+ _dict['tags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildRoleResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildRoleResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "permissions": obj.get("permissions"),
+ "position": obj.get("position"),
+ "color": obj.get("color"),
+ "hoist": obj.get("hoist"),
+ "managed": obj.get("managed"),
+ "mentionable": obj.get("mentionable"),
+ "icon": obj.get("icon"),
+ "unicode_emoji": obj.get("unicode_emoji"),
+ "tags": GuildRoleTagsResponse.from_dict(obj["tags"]) if obj.get("tags") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_role_tags_response.py b/dc_rest/models/guild_role_tags_response.py
new file mode 100644
index 0000000..89d1cc2
--- /dev/null
+++ b/dc_rest/models/guild_role_tags_response.py
@@ -0,0 +1,182 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildRoleTagsResponse(BaseModel):
+ """
+ GuildRoleTagsResponse
+ """ # noqa: E501
+ premium_subscriber: Optional[Any] = None
+ bot_id: Optional[Annotated[str, Field(strict=True)]] = None
+ integration_id: Optional[Annotated[str, Field(strict=True)]] = None
+ subscription_listing_id: Optional[Annotated[str, Field(strict=True)]] = None
+ available_for_purchase: Optional[Any] = None
+ guild_connections: Optional[Any] = None
+ __properties: ClassVar[List[str]] = ["premium_subscriber", "bot_id", "integration_id", "subscription_listing_id", "available_for_purchase", "guild_connections"]
+
+ @field_validator('bot_id')
+ def bot_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('integration_id')
+ def integration_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('subscription_listing_id')
+ def subscription_listing_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildRoleTagsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if premium_subscriber (nullable) is None
+ # and model_fields_set contains the field
+ if self.premium_subscriber is None and "premium_subscriber" in self.model_fields_set:
+ _dict['premium_subscriber'] = None
+
+ # set to None if available_for_purchase (nullable) is None
+ # and model_fields_set contains the field
+ if self.available_for_purchase is None and "available_for_purchase" in self.model_fields_set:
+ _dict['available_for_purchase'] = None
+
+ # set to None if guild_connections (nullable) is None
+ # and model_fields_set contains the field
+ if self.guild_connections is None and "guild_connections" in self.model_fields_set:
+ _dict['guild_connections'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildRoleTagsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildRoleTagsResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "premium_subscriber": obj.get("premium_subscriber"),
+ "bot_id": obj.get("bot_id"),
+ "integration_id": obj.get("integration_id"),
+ "subscription_listing_id": obj.get("subscription_listing_id"),
+ "available_for_purchase": obj.get("available_for_purchase"),
+ "guild_connections": obj.get("guild_connections")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_sticker_response.py b/dc_rest/models/guild_sticker_response.py
new file mode 100644
index 0000000..7106140
--- /dev/null
+++ b/dc_rest/models/guild_sticker_response.py
@@ -0,0 +1,176 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildStickerResponse(BaseModel):
+ """
+ GuildStickerResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ tags: StrictStr
+ type: StrictInt
+ format_type: Optional[StrictInt] = None
+ description: Optional[StrictStr] = None
+ available: StrictBool
+ guild_id: Annotated[str, Field(strict=True)]
+ user: Optional[UserResponse] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "tags", "type", "format_type", "description", "available", "guild_id", "user"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildStickerResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of user
+ if self.user:
+ _dict['user'] = self.user.to_dict()
+ # set to None if format_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.format_type is None and "format_type" in self.model_fields_set:
+ _dict['format_type'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if user (nullable) is None
+ # and model_fields_set contains the field
+ if self.user is None and "user" in self.model_fields_set:
+ _dict['user'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildStickerResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildStickerResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "tags": obj.get("tags"),
+ "type": obj.get("type"),
+ "format_type": obj.get("format_type"),
+ "description": obj.get("description"),
+ "available": obj.get("available"),
+ "guild_id": obj.get("guild_id"),
+ "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_subscription_integration_response.py b/dc_rest/models/guild_subscription_integration_response.py
new file mode 100644
index 0000000..789a343
--- /dev/null
+++ b/dc_rest/models/guild_subscription_integration_response.py
@@ -0,0 +1,166 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.account_response import AccountResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildSubscriptionIntegrationResponse(BaseModel):
+ """
+ GuildSubscriptionIntegrationResponse
+ """ # noqa: E501
+ type: Optional[StrictStr]
+ name: Optional[StrictStr] = None
+ account: Optional[AccountResponse] = None
+ enabled: Optional[StrictBool] = None
+ id: Annotated[str, Field(strict=True)]
+ __properties: ClassVar[List[str]] = ["type", "name", "account", "enabled", "id"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildSubscriptionIntegrationResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of account
+ if self.account:
+ _dict['account'] = self.account.to_dict()
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if account (nullable) is None
+ # and model_fields_set contains the field
+ if self.account is None and "account" in self.model_fields_set:
+ _dict['account'] = None
+
+ # set to None if enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.enabled is None and "enabled" in self.model_fields_set:
+ _dict['enabled'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildSubscriptionIntegrationResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildSubscriptionIntegrationResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None,
+ "enabled": obj.get("enabled"),
+ "id": obj.get("id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_template_channel_response.py b/dc_rest/models/guild_template_channel_response.py
new file mode 100644
index 0000000..8f4a20e
--- /dev/null
+++ b/dc_rest/models/guild_template_channel_response.py
@@ -0,0 +1,237 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.channel_permission_overwrite_response import ChannelPermissionOverwriteResponse
+from dc_rest.models.default_reaction_emoji_response import DefaultReactionEmojiResponse
+from dc_rest.models.guild_template_channel_tags import GuildTemplateChannelTags
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildTemplateChannelResponse(BaseModel):
+ """
+ GuildTemplateChannelResponse
+ """ # noqa: E501
+ id: Optional[StrictInt] = None
+ type: StrictInt
+ name: Optional[StrictStr] = None
+ position: Optional[StrictInt] = None
+ topic: Optional[StrictStr] = None
+ bitrate: StrictInt
+ user_limit: StrictInt
+ nsfw: StrictBool
+ rate_limit_per_user: StrictInt
+ parent_id: Optional[Annotated[str, Field(strict=True)]] = None
+ default_auto_archive_duration: Optional[StrictInt] = None
+ permission_overwrites: List[Optional[ChannelPermissionOverwriteResponse]]
+ available_tags: Optional[List[GuildTemplateChannelTags]] = None
+ template: StrictStr
+ default_reaction_emoji: Optional[DefaultReactionEmojiResponse] = None
+ default_thread_rate_limit_per_user: Optional[StrictInt] = None
+ default_sort_order: Optional[StrictInt] = None
+ default_forum_layout: Optional[StrictInt] = None
+ default_tag_setting: Optional[StrictStr] = None
+ icon_emoji: Optional[Dict[str, Any]] = None
+ theme_color: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["id", "type", "name", "position", "topic", "bitrate", "user_limit", "nsfw", "rate_limit_per_user", "parent_id", "default_auto_archive_duration", "permission_overwrites", "available_tags", "template", "default_reaction_emoji", "default_thread_rate_limit_per_user", "default_sort_order", "default_forum_layout", "default_tag_setting", "icon_emoji", "theme_color"]
+
+ @field_validator('parent_id')
+ def parent_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildTemplateChannelResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in permission_overwrites (list)
+ _items = []
+ if self.permission_overwrites:
+ for _item_permission_overwrites in self.permission_overwrites:
+ if _item_permission_overwrites:
+ _items.append(_item_permission_overwrites.to_dict())
+ _dict['permission_overwrites'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in available_tags (list)
+ _items = []
+ if self.available_tags:
+ for _item_available_tags in self.available_tags:
+ if _item_available_tags:
+ _items.append(_item_available_tags.to_dict())
+ _dict['available_tags'] = _items
+ # override the default output from pydantic by calling `to_dict()` of default_reaction_emoji
+ if self.default_reaction_emoji:
+ _dict['default_reaction_emoji'] = self.default_reaction_emoji.to_dict()
+ # set to None if id (nullable) is None
+ # and model_fields_set contains the field
+ if self.id is None and "id" in self.model_fields_set:
+ _dict['id'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if position (nullable) is None
+ # and model_fields_set contains the field
+ if self.position is None and "position" in self.model_fields_set:
+ _dict['position'] = None
+
+ # set to None if topic (nullable) is None
+ # and model_fields_set contains the field
+ if self.topic is None and "topic" in self.model_fields_set:
+ _dict['topic'] = None
+
+ # set to None if available_tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.available_tags is None and "available_tags" in self.model_fields_set:
+ _dict['available_tags'] = None
+
+ # set to None if default_reaction_emoji (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_reaction_emoji is None and "default_reaction_emoji" in self.model_fields_set:
+ _dict['default_reaction_emoji'] = None
+
+ # set to None if default_thread_rate_limit_per_user (nullable) is None
+ # and model_fields_set contains the field
+ if self.default_thread_rate_limit_per_user is None and "default_thread_rate_limit_per_user" in self.model_fields_set:
+ _dict['default_thread_rate_limit_per_user'] = None
+
+ # set to None if theme_color (nullable) is None
+ # and model_fields_set contains the field
+ if self.theme_color is None and "theme_color" in self.model_fields_set:
+ _dict['theme_color'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildTemplateChannelResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildTemplateChannelResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "position": obj.get("position"),
+ "topic": obj.get("topic"),
+ "bitrate": obj.get("bitrate"),
+ "user_limit": obj.get("user_limit"),
+ "nsfw": obj.get("nsfw"),
+ "rate_limit_per_user": obj.get("rate_limit_per_user"),
+ "parent_id": obj.get("parent_id"),
+ "default_auto_archive_duration": obj.get("default_auto_archive_duration"),
+ "permission_overwrites": [ChannelPermissionOverwriteResponse.from_dict(_item) for _item in obj["permission_overwrites"]] if obj.get("permission_overwrites") is not None else None,
+ "available_tags": [GuildTemplateChannelTags.from_dict(_item) for _item in obj["available_tags"]] if obj.get("available_tags") is not None else None,
+ "template": obj.get("template"),
+ "default_reaction_emoji": DefaultReactionEmojiResponse.from_dict(obj["default_reaction_emoji"]) if obj.get("default_reaction_emoji") is not None else None,
+ "default_thread_rate_limit_per_user": obj.get("default_thread_rate_limit_per_user"),
+ "default_sort_order": obj.get("default_sort_order"),
+ "default_forum_layout": obj.get("default_forum_layout"),
+ "default_tag_setting": obj.get("default_tag_setting"),
+ "icon_emoji": obj.get("icon_emoji"),
+ "theme_color": obj.get("theme_color")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_template_channel_tags.py b/dc_rest/models/guild_template_channel_tags.py
new file mode 100644
index 0000000..a05be27
--- /dev/null
+++ b/dc_rest/models/guild_template_channel_tags.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildTemplateChannelTags(BaseModel):
+ """
+ GuildTemplateChannelTags
+ """ # noqa: E501
+ name: StrictStr
+ emoji_id: Optional[Annotated[str, Field(strict=True)]] = None
+ emoji_name: Optional[StrictStr] = None
+ moderated: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["name", "emoji_id", "emoji_name", "moderated"]
+
+ @field_validator('emoji_id')
+ def emoji_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildTemplateChannelTags from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if emoji_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.emoji_name is None and "emoji_name" in self.model_fields_set:
+ _dict['emoji_name'] = None
+
+ # set to None if moderated (nullable) is None
+ # and model_fields_set contains the field
+ if self.moderated is None and "moderated" in self.model_fields_set:
+ _dict['moderated'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildTemplateChannelTags from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildTemplateChannelTags) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "emoji_id": obj.get("emoji_id"),
+ "emoji_name": obj.get("emoji_name"),
+ "moderated": obj.get("moderated")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_template_response.py b/dc_rest/models/guild_template_response.py
new file mode 100644
index 0000000..acb0a23
--- /dev/null
+++ b/dc_rest/models/guild_template_response.py
@@ -0,0 +1,185 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.guild_template_snapshot_response import GuildTemplateSnapshotResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildTemplateResponse(BaseModel):
+ """
+ GuildTemplateResponse
+ """ # noqa: E501
+ code: StrictStr
+ name: StrictStr
+ description: Optional[StrictStr] = None
+ usage_count: StrictInt
+ creator_id: Annotated[str, Field(strict=True)]
+ creator: Optional[UserResponse] = None
+ created_at: datetime
+ updated_at: datetime
+ source_guild_id: Annotated[str, Field(strict=True)]
+ serialized_source_guild: GuildTemplateSnapshotResponse
+ is_dirty: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["code", "name", "description", "usage_count", "creator_id", "creator", "created_at", "updated_at", "source_guild_id", "serialized_source_guild", "is_dirty"]
+
+ @field_validator('creator_id')
+ def creator_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('source_guild_id')
+ def source_guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildTemplateResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of creator
+ if self.creator:
+ _dict['creator'] = self.creator.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of serialized_source_guild
+ if self.serialized_source_guild:
+ _dict['serialized_source_guild'] = self.serialized_source_guild.to_dict()
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if creator (nullable) is None
+ # and model_fields_set contains the field
+ if self.creator is None and "creator" in self.model_fields_set:
+ _dict['creator'] = None
+
+ # set to None if is_dirty (nullable) is None
+ # and model_fields_set contains the field
+ if self.is_dirty is None and "is_dirty" in self.model_fields_set:
+ _dict['is_dirty'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildTemplateResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildTemplateResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "code": obj.get("code"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "usage_count": obj.get("usage_count"),
+ "creator_id": obj.get("creator_id"),
+ "creator": UserResponse.from_dict(obj["creator"]) if obj.get("creator") is not None else None,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "source_guild_id": obj.get("source_guild_id"),
+ "serialized_source_guild": GuildTemplateSnapshotResponse.from_dict(obj["serialized_source_guild"]) if obj.get("serialized_source_guild") is not None else None,
+ "is_dirty": obj.get("is_dirty")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_template_role_response.py b/dc_rest/models/guild_template_role_response.py
new file mode 100644
index 0000000..630e5e9
--- /dev/null
+++ b/dc_rest/models/guild_template_role_response.py
@@ -0,0 +1,150 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildTemplateRoleResponse(BaseModel):
+ """
+ GuildTemplateRoleResponse
+ """ # noqa: E501
+ id: StrictInt
+ name: StrictStr
+ permissions: StrictStr
+ color: StrictInt
+ hoist: StrictBool
+ mentionable: StrictBool
+ icon: Optional[StrictStr] = None
+ unicode_emoji: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "permissions", "color", "hoist", "mentionable", "icon", "unicode_emoji"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildTemplateRoleResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if unicode_emoji (nullable) is None
+ # and model_fields_set contains the field
+ if self.unicode_emoji is None and "unicode_emoji" in self.model_fields_set:
+ _dict['unicode_emoji'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildTemplateRoleResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildTemplateRoleResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "permissions": obj.get("permissions"),
+ "color": obj.get("color"),
+ "hoist": obj.get("hoist"),
+ "mentionable": obj.get("mentionable"),
+ "icon": obj.get("icon"),
+ "unicode_emoji": obj.get("unicode_emoji")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_template_snapshot_response.py b/dc_rest/models/guild_template_snapshot_response.py
new file mode 100644
index 0000000..29877d7
--- /dev/null
+++ b/dc_rest/models/guild_template_snapshot_response.py
@@ -0,0 +1,202 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.guild_template_channel_response import GuildTemplateChannelResponse
+from dc_rest.models.guild_template_role_response import GuildTemplateRoleResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildTemplateSnapshotResponse(BaseModel):
+ """
+ GuildTemplateSnapshotResponse
+ """ # noqa: E501
+ name: StrictStr
+ description: Optional[StrictStr] = None
+ region: Optional[StrictStr] = None
+ verification_level: StrictInt
+ default_message_notifications: StrictInt
+ explicit_content_filter: StrictInt
+ preferred_locale: StrictStr
+ afk_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ afk_timeout: Optional[StrictInt]
+ system_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ system_channel_flags: StrictInt
+ roles: List[GuildTemplateRoleResponse]
+ channels: List[GuildTemplateChannelResponse]
+ __properties: ClassVar[List[str]] = ["name", "description", "region", "verification_level", "default_message_notifications", "explicit_content_filter", "preferred_locale", "afk_channel_id", "afk_timeout", "system_channel_id", "system_channel_flags", "roles", "channels"]
+
+ @field_validator('afk_channel_id')
+ def afk_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('system_channel_id')
+ def system_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildTemplateSnapshotResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in roles (list)
+ _items = []
+ if self.roles:
+ for _item_roles in self.roles:
+ if _item_roles:
+ _items.append(_item_roles.to_dict())
+ _dict['roles'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in channels (list)
+ _items = []
+ if self.channels:
+ for _item_channels in self.channels:
+ if _item_channels:
+ _items.append(_item_channels.to_dict())
+ _dict['channels'] = _items
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if region (nullable) is None
+ # and model_fields_set contains the field
+ if self.region is None and "region" in self.model_fields_set:
+ _dict['region'] = None
+
+ # set to None if afk_timeout (nullable) is None
+ # and model_fields_set contains the field
+ if self.afk_timeout is None and "afk_timeout" in self.model_fields_set:
+ _dict['afk_timeout'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildTemplateSnapshotResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildTemplateSnapshotResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "region": obj.get("region"),
+ "verification_level": obj.get("verification_level"),
+ "default_message_notifications": obj.get("default_message_notifications"),
+ "explicit_content_filter": obj.get("explicit_content_filter"),
+ "preferred_locale": obj.get("preferred_locale"),
+ "afk_channel_id": obj.get("afk_channel_id"),
+ "afk_timeout": obj.get("afk_timeout"),
+ "system_channel_id": obj.get("system_channel_id"),
+ "system_channel_flags": obj.get("system_channel_flags"),
+ "roles": [GuildTemplateRoleResponse.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
+ "channels": [GuildTemplateChannelResponse.from_dict(_item) for _item in obj["channels"]] if obj.get("channels") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_welcome_channel.py b/dc_rest/models/guild_welcome_channel.py
new file mode 100644
index 0000000..65df650
--- /dev/null
+++ b/dc_rest/models/guild_welcome_channel.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildWelcomeChannel(BaseModel):
+ """
+ GuildWelcomeChannel
+ """ # noqa: E501
+ channel_id: Annotated[str, Field(strict=True)]
+ description: Annotated[str, Field(min_length=1, strict=True, max_length=50)]
+ emoji_id: Optional[Annotated[str, Field(strict=True)]] = None
+ emoji_name: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None
+ __properties: ClassVar[List[str]] = ["channel_id", "description", "emoji_id", "emoji_name"]
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('emoji_id')
+ def emoji_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildWelcomeChannel from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if emoji_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.emoji_name is None and "emoji_name" in self.model_fields_set:
+ _dict['emoji_name'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildWelcomeChannel from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildWelcomeChannel) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "channel_id": obj.get("channel_id"),
+ "description": obj.get("description"),
+ "emoji_id": obj.get("emoji_id"),
+ "emoji_name": obj.get("emoji_name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_welcome_screen_channel_response.py b/dc_rest/models/guild_welcome_screen_channel_response.py
new file mode 100644
index 0000000..d278da7
--- /dev/null
+++ b/dc_rest/models/guild_welcome_screen_channel_response.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildWelcomeScreenChannelResponse(BaseModel):
+ """
+ GuildWelcomeScreenChannelResponse
+ """ # noqa: E501
+ channel_id: Annotated[str, Field(strict=True)]
+ description: StrictStr
+ emoji_id: Optional[Annotated[str, Field(strict=True)]] = None
+ emoji_name: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["channel_id", "description", "emoji_id", "emoji_name"]
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('emoji_id')
+ def emoji_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildWelcomeScreenChannelResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if emoji_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.emoji_name is None and "emoji_name" in self.model_fields_set:
+ _dict['emoji_name'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildWelcomeScreenChannelResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildWelcomeScreenChannelResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "channel_id": obj.get("channel_id"),
+ "description": obj.get("description"),
+ "emoji_id": obj.get("emoji_id"),
+ "emoji_name": obj.get("emoji_name")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_welcome_screen_response.py b/dc_rest/models/guild_welcome_screen_response.py
new file mode 100644
index 0000000..5b96657
--- /dev/null
+++ b/dc_rest/models/guild_welcome_screen_response.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.guild_welcome_screen_channel_response import GuildWelcomeScreenChannelResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildWelcomeScreenResponse(BaseModel):
+ """
+ GuildWelcomeScreenResponse
+ """ # noqa: E501
+ description: Optional[StrictStr] = None
+ welcome_channels: List[GuildWelcomeScreenChannelResponse]
+ __properties: ClassVar[List[str]] = ["description", "welcome_channels"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildWelcomeScreenResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in welcome_channels (list)
+ _items = []
+ if self.welcome_channels:
+ for _item_welcome_channels in self.welcome_channels:
+ if _item_welcome_channels:
+ _items.append(_item_welcome_channels.to_dict())
+ _dict['welcome_channels'] = _items
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildWelcomeScreenResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildWelcomeScreenResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "description": obj.get("description"),
+ "welcome_channels": [GuildWelcomeScreenChannelResponse.from_dict(_item) for _item in obj["welcome_channels"]] if obj.get("welcome_channels") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/guild_with_counts_response.py b/dc_rest/models/guild_with_counts_response.py
new file mode 100644
index 0000000..2df716d
--- /dev/null
+++ b/dc_rest/models/guild_with_counts_response.py
@@ -0,0 +1,390 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.emoji_response import EmojiResponse
+from dc_rest.models.guild_role_response import GuildRoleResponse
+from dc_rest.models.guild_sticker_response import GuildStickerResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GuildWithCountsResponse(BaseModel):
+ """
+ GuildWithCountsResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ icon: Optional[StrictStr] = None
+ description: Optional[StrictStr] = None
+ home_header: Optional[StrictStr] = None
+ splash: Optional[StrictStr] = None
+ discovery_splash: Optional[StrictStr] = None
+ features: List[StrictStr]
+ banner: Optional[StrictStr] = None
+ owner_id: Annotated[str, Field(strict=True)]
+ application_id: Optional[Annotated[str, Field(strict=True)]] = None
+ region: StrictStr
+ afk_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ afk_timeout: Optional[StrictInt]
+ system_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ system_channel_flags: StrictInt
+ widget_enabled: StrictBool
+ widget_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ verification_level: StrictInt
+ roles: List[GuildRoleResponse]
+ default_message_notifications: StrictInt
+ mfa_level: StrictInt
+ explicit_content_filter: StrictInt
+ max_presences: Optional[StrictInt] = None
+ max_members: Optional[StrictInt] = None
+ max_stage_video_channel_users: Optional[StrictInt] = None
+ max_video_channel_users: Optional[StrictInt] = None
+ vanity_url_code: Optional[StrictStr] = None
+ premium_tier: StrictInt
+ premium_subscription_count: StrictInt
+ preferred_locale: StrictStr
+ rules_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ safety_alerts_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ public_updates_channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ premium_progress_bar_enabled: StrictBool
+ nsfw: StrictBool
+ nsfw_level: Optional[StrictInt]
+ emojis: List[EmojiResponse]
+ stickers: List[GuildStickerResponse]
+ approximate_member_count: Optional[StrictInt] = None
+ approximate_presence_count: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "home_header", "splash", "discovery_splash", "features", "banner", "owner_id", "application_id", "region", "afk_channel_id", "afk_timeout", "system_channel_id", "system_channel_flags", "widget_enabled", "widget_channel_id", "verification_level", "roles", "default_message_notifications", "mfa_level", "explicit_content_filter", "max_presences", "max_members", "max_stage_video_channel_users", "max_video_channel_users", "vanity_url_code", "premium_tier", "premium_subscription_count", "preferred_locale", "rules_channel_id", "safety_alerts_channel_id", "public_updates_channel_id", "premium_progress_bar_enabled", "nsfw", "nsfw_level", "emojis", "stickers", "approximate_member_count", "approximate_presence_count"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('owner_id')
+ def owner_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('application_id')
+ def application_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('afk_channel_id')
+ def afk_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('system_channel_id')
+ def system_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('widget_channel_id')
+ def widget_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('rules_channel_id')
+ def rules_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('safety_alerts_channel_id')
+ def safety_alerts_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('public_updates_channel_id')
+ def public_updates_channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GuildWithCountsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in roles (list)
+ _items = []
+ if self.roles:
+ for _item_roles in self.roles:
+ if _item_roles:
+ _items.append(_item_roles.to_dict())
+ _dict['roles'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in emojis (list)
+ _items = []
+ if self.emojis:
+ for _item_emojis in self.emojis:
+ if _item_emojis:
+ _items.append(_item_emojis.to_dict())
+ _dict['emojis'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in stickers (list)
+ _items = []
+ if self.stickers:
+ for _item_stickers in self.stickers:
+ if _item_stickers:
+ _items.append(_item_stickers.to_dict())
+ _dict['stickers'] = _items
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if home_header (nullable) is None
+ # and model_fields_set contains the field
+ if self.home_header is None and "home_header" in self.model_fields_set:
+ _dict['home_header'] = None
+
+ # set to None if splash (nullable) is None
+ # and model_fields_set contains the field
+ if self.splash is None and "splash" in self.model_fields_set:
+ _dict['splash'] = None
+
+ # set to None if discovery_splash (nullable) is None
+ # and model_fields_set contains the field
+ if self.discovery_splash is None and "discovery_splash" in self.model_fields_set:
+ _dict['discovery_splash'] = None
+
+ # set to None if banner (nullable) is None
+ # and model_fields_set contains the field
+ if self.banner is None and "banner" in self.model_fields_set:
+ _dict['banner'] = None
+
+ # set to None if afk_timeout (nullable) is None
+ # and model_fields_set contains the field
+ if self.afk_timeout is None and "afk_timeout" in self.model_fields_set:
+ _dict['afk_timeout'] = None
+
+ # set to None if max_presences (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_presences is None and "max_presences" in self.model_fields_set:
+ _dict['max_presences'] = None
+
+ # set to None if max_members (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_members is None and "max_members" in self.model_fields_set:
+ _dict['max_members'] = None
+
+ # set to None if max_stage_video_channel_users (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_stage_video_channel_users is None and "max_stage_video_channel_users" in self.model_fields_set:
+ _dict['max_stage_video_channel_users'] = None
+
+ # set to None if max_video_channel_users (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_video_channel_users is None and "max_video_channel_users" in self.model_fields_set:
+ _dict['max_video_channel_users'] = None
+
+ # set to None if vanity_url_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.vanity_url_code is None and "vanity_url_code" in self.model_fields_set:
+ _dict['vanity_url_code'] = None
+
+ # set to None if nsfw_level (nullable) is None
+ # and model_fields_set contains the field
+ if self.nsfw_level is None and "nsfw_level" in self.model_fields_set:
+ _dict['nsfw_level'] = None
+
+ # set to None if approximate_member_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.approximate_member_count is None and "approximate_member_count" in self.model_fields_set:
+ _dict['approximate_member_count'] = None
+
+ # set to None if approximate_presence_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.approximate_presence_count is None and "approximate_presence_count" in self.model_fields_set:
+ _dict['approximate_presence_count'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GuildWithCountsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in GuildWithCountsResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "icon": obj.get("icon"),
+ "description": obj.get("description"),
+ "home_header": obj.get("home_header"),
+ "splash": obj.get("splash"),
+ "discovery_splash": obj.get("discovery_splash"),
+ "features": obj.get("features"),
+ "banner": obj.get("banner"),
+ "owner_id": obj.get("owner_id"),
+ "application_id": obj.get("application_id"),
+ "region": obj.get("region"),
+ "afk_channel_id": obj.get("afk_channel_id"),
+ "afk_timeout": obj.get("afk_timeout"),
+ "system_channel_id": obj.get("system_channel_id"),
+ "system_channel_flags": obj.get("system_channel_flags"),
+ "widget_enabled": obj.get("widget_enabled"),
+ "widget_channel_id": obj.get("widget_channel_id"),
+ "verification_level": obj.get("verification_level"),
+ "roles": [GuildRoleResponse.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
+ "default_message_notifications": obj.get("default_message_notifications"),
+ "mfa_level": obj.get("mfa_level"),
+ "explicit_content_filter": obj.get("explicit_content_filter"),
+ "max_presences": obj.get("max_presences"),
+ "max_members": obj.get("max_members"),
+ "max_stage_video_channel_users": obj.get("max_stage_video_channel_users"),
+ "max_video_channel_users": obj.get("max_video_channel_users"),
+ "vanity_url_code": obj.get("vanity_url_code"),
+ "premium_tier": obj.get("premium_tier"),
+ "premium_subscription_count": obj.get("premium_subscription_count"),
+ "preferred_locale": obj.get("preferred_locale"),
+ "rules_channel_id": obj.get("rules_channel_id"),
+ "safety_alerts_channel_id": obj.get("safety_alerts_channel_id"),
+ "public_updates_channel_id": obj.get("public_updates_channel_id"),
+ "premium_progress_bar_enabled": obj.get("premium_progress_bar_enabled"),
+ "nsfw": obj.get("nsfw"),
+ "nsfw_level": obj.get("nsfw_level"),
+ "emojis": [EmojiResponse.from_dict(_item) for _item in obj["emojis"]] if obj.get("emojis") is not None else None,
+ "stickers": [GuildStickerResponse.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None,
+ "approximate_member_count": obj.get("approximate_member_count"),
+ "approximate_presence_count": obj.get("approximate_presence_count")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/incoming_webhook_interaction_request.py b/dc_rest/models/incoming_webhook_interaction_request.py
new file mode 100644
index 0000000..1cf418b
--- /dev/null
+++ b/dc_rest/models/incoming_webhook_interaction_request.py
@@ -0,0 +1,213 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner
+from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest
+from dc_rest.models.message_attachment_request import MessageAttachmentRequest
+from dc_rest.models.poll_create_request import PollCreateRequest
+from dc_rest.models.rich_embed import RichEmbed
+from typing import Optional, Set
+from typing_extensions import Self
+
+class IncomingWebhookInteractionRequest(BaseModel):
+ """
+ IncomingWebhookInteractionRequest
+ """ # noqa: E501
+ content: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None
+ embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None
+ allowed_mentions: Optional[MessageAllowedMentionsRequest] = None
+ components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None
+ attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None
+ poll: Optional[PollCreateRequest] = None
+ tts: Optional[StrictBool] = None
+ flags: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "components", "attachments", "poll", "tts", "flags"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of IncomingWebhookInteractionRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in embeds (list)
+ _items = []
+ if self.embeds:
+ for _item_embeds in self.embeds:
+ if _item_embeds:
+ _items.append(_item_embeds.to_dict())
+ _dict['embeds'] = _items
+ # override the default output from pydantic by calling `to_dict()` of allowed_mentions
+ if self.allowed_mentions:
+ _dict['allowed_mentions'] = self.allowed_mentions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in attachments (list)
+ _items = []
+ if self.attachments:
+ for _item_attachments in self.attachments:
+ if _item_attachments:
+ _items.append(_item_attachments.to_dict())
+ _dict['attachments'] = _items
+ # override the default output from pydantic by calling `to_dict()` of poll
+ if self.poll:
+ _dict['poll'] = self.poll.to_dict()
+ # set to None if content (nullable) is None
+ # and model_fields_set contains the field
+ if self.content is None and "content" in self.model_fields_set:
+ _dict['content'] = None
+
+ # set to None if embeds (nullable) is None
+ # and model_fields_set contains the field
+ if self.embeds is None and "embeds" in self.model_fields_set:
+ _dict['embeds'] = None
+
+ # set to None if allowed_mentions (nullable) is None
+ # and model_fields_set contains the field
+ if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set:
+ _dict['allowed_mentions'] = None
+
+ # set to None if components (nullable) is None
+ # and model_fields_set contains the field
+ if self.components is None and "components" in self.model_fields_set:
+ _dict['components'] = None
+
+ # set to None if attachments (nullable) is None
+ # and model_fields_set contains the field
+ if self.attachments is None and "attachments" in self.model_fields_set:
+ _dict['attachments'] = None
+
+ # set to None if poll (nullable) is None
+ # and model_fields_set contains the field
+ if self.poll is None and "poll" in self.model_fields_set:
+ _dict['poll'] = None
+
+ # set to None if tts (nullable) is None
+ # and model_fields_set contains the field
+ if self.tts is None and "tts" in self.model_fields_set:
+ _dict['tts'] = None
+
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of IncomingWebhookInteractionRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in IncomingWebhookInteractionRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "content": obj.get("content"),
+ "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None,
+ "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None,
+ "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None,
+ "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None,
+ "poll": PollCreateRequest.from_dict(obj["poll"]) if obj.get("poll") is not None else None,
+ "tts": obj.get("tts"),
+ "flags": obj.get("flags")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/incoming_webhook_request_partial.py b/dc_rest/models/incoming_webhook_request_partial.py
new file mode 100644
index 0000000..069c5a0
--- /dev/null
+++ b/dc_rest/models/incoming_webhook_request_partial.py
@@ -0,0 +1,241 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner
+from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest
+from dc_rest.models.message_attachment_request import MessageAttachmentRequest
+from dc_rest.models.poll_create_request import PollCreateRequest
+from dc_rest.models.rich_embed import RichEmbed
+from typing import Optional, Set
+from typing_extensions import Self
+
+class IncomingWebhookRequestPartial(BaseModel):
+ """
+ IncomingWebhookRequestPartial
+ """ # noqa: E501
+ content: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None
+ embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None
+ allowed_mentions: Optional[MessageAllowedMentionsRequest] = None
+ components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None
+ attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None
+ poll: Optional[PollCreateRequest] = None
+ tts: Optional[StrictBool] = None
+ flags: Optional[StrictInt] = None
+ username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=80)]] = None
+ avatar_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None
+ thread_name: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=100)]] = None
+ applied_tags: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=5)]] = None
+ __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "components", "attachments", "poll", "tts", "flags", "username", "avatar_url", "thread_name", "applied_tags"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of IncomingWebhookRequestPartial from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in embeds (list)
+ _items = []
+ if self.embeds:
+ for _item_embeds in self.embeds:
+ if _item_embeds:
+ _items.append(_item_embeds.to_dict())
+ _dict['embeds'] = _items
+ # override the default output from pydantic by calling `to_dict()` of allowed_mentions
+ if self.allowed_mentions:
+ _dict['allowed_mentions'] = self.allowed_mentions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in attachments (list)
+ _items = []
+ if self.attachments:
+ for _item_attachments in self.attachments:
+ if _item_attachments:
+ _items.append(_item_attachments.to_dict())
+ _dict['attachments'] = _items
+ # override the default output from pydantic by calling `to_dict()` of poll
+ if self.poll:
+ _dict['poll'] = self.poll.to_dict()
+ # set to None if content (nullable) is None
+ # and model_fields_set contains the field
+ if self.content is None and "content" in self.model_fields_set:
+ _dict['content'] = None
+
+ # set to None if embeds (nullable) is None
+ # and model_fields_set contains the field
+ if self.embeds is None and "embeds" in self.model_fields_set:
+ _dict['embeds'] = None
+
+ # set to None if allowed_mentions (nullable) is None
+ # and model_fields_set contains the field
+ if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set:
+ _dict['allowed_mentions'] = None
+
+ # set to None if components (nullable) is None
+ # and model_fields_set contains the field
+ if self.components is None and "components" in self.model_fields_set:
+ _dict['components'] = None
+
+ # set to None if attachments (nullable) is None
+ # and model_fields_set contains the field
+ if self.attachments is None and "attachments" in self.model_fields_set:
+ _dict['attachments'] = None
+
+ # set to None if poll (nullable) is None
+ # and model_fields_set contains the field
+ if self.poll is None and "poll" in self.model_fields_set:
+ _dict['poll'] = None
+
+ # set to None if tts (nullable) is None
+ # and model_fields_set contains the field
+ if self.tts is None and "tts" in self.model_fields_set:
+ _dict['tts'] = None
+
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ # set to None if username (nullable) is None
+ # and model_fields_set contains the field
+ if self.username is None and "username" in self.model_fields_set:
+ _dict['username'] = None
+
+ # set to None if avatar_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.avatar_url is None and "avatar_url" in self.model_fields_set:
+ _dict['avatar_url'] = None
+
+ # set to None if thread_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.thread_name is None and "thread_name" in self.model_fields_set:
+ _dict['thread_name'] = None
+
+ # set to None if applied_tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.applied_tags is None and "applied_tags" in self.model_fields_set:
+ _dict['applied_tags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of IncomingWebhookRequestPartial from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in IncomingWebhookRequestPartial) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "content": obj.get("content"),
+ "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None,
+ "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None,
+ "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None,
+ "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None,
+ "poll": PollCreateRequest.from_dict(obj["poll"]) if obj.get("poll") is not None else None,
+ "tts": obj.get("tts"),
+ "flags": obj.get("flags"),
+ "username": obj.get("username"),
+ "avatar_url": obj.get("avatar_url"),
+ "thread_name": obj.get("thread_name"),
+ "applied_tags": obj.get("applied_tags")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/incoming_webhook_update_for_interaction_callback_request_partial.py b/dc_rest/models/incoming_webhook_update_for_interaction_callback_request_partial.py
new file mode 100644
index 0000000..d2c9630
--- /dev/null
+++ b/dc_rest/models/incoming_webhook_update_for_interaction_callback_request_partial.py
@@ -0,0 +1,195 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner
+from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest
+from dc_rest.models.message_attachment_request import MessageAttachmentRequest
+from dc_rest.models.rich_embed import RichEmbed
+from typing import Optional, Set
+from typing_extensions import Self
+
+class IncomingWebhookUpdateForInteractionCallbackRequestPartial(BaseModel):
+ """
+ IncomingWebhookUpdateForInteractionCallbackRequestPartial
+ """ # noqa: E501
+ content: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None
+ embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None
+ allowed_mentions: Optional[MessageAllowedMentionsRequest] = None
+ components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None
+ attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None
+ flags: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "components", "attachments", "flags"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of IncomingWebhookUpdateForInteractionCallbackRequestPartial from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in embeds (list)
+ _items = []
+ if self.embeds:
+ for _item_embeds in self.embeds:
+ if _item_embeds:
+ _items.append(_item_embeds.to_dict())
+ _dict['embeds'] = _items
+ # override the default output from pydantic by calling `to_dict()` of allowed_mentions
+ if self.allowed_mentions:
+ _dict['allowed_mentions'] = self.allowed_mentions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in attachments (list)
+ _items = []
+ if self.attachments:
+ for _item_attachments in self.attachments:
+ if _item_attachments:
+ _items.append(_item_attachments.to_dict())
+ _dict['attachments'] = _items
+ # set to None if content (nullable) is None
+ # and model_fields_set contains the field
+ if self.content is None and "content" in self.model_fields_set:
+ _dict['content'] = None
+
+ # set to None if embeds (nullable) is None
+ # and model_fields_set contains the field
+ if self.embeds is None and "embeds" in self.model_fields_set:
+ _dict['embeds'] = None
+
+ # set to None if allowed_mentions (nullable) is None
+ # and model_fields_set contains the field
+ if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set:
+ _dict['allowed_mentions'] = None
+
+ # set to None if components (nullable) is None
+ # and model_fields_set contains the field
+ if self.components is None and "components" in self.model_fields_set:
+ _dict['components'] = None
+
+ # set to None if attachments (nullable) is None
+ # and model_fields_set contains the field
+ if self.attachments is None and "attachments" in self.model_fields_set:
+ _dict['attachments'] = None
+
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of IncomingWebhookUpdateForInteractionCallbackRequestPartial from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in IncomingWebhookUpdateForInteractionCallbackRequestPartial) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "content": obj.get("content"),
+ "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None,
+ "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None,
+ "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None,
+ "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None,
+ "flags": obj.get("flags")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/incoming_webhook_update_request_partial.py b/dc_rest/models/incoming_webhook_update_request_partial.py
new file mode 100644
index 0000000..b25cfde
--- /dev/null
+++ b/dc_rest/models/incoming_webhook_update_request_partial.py
@@ -0,0 +1,206 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner
+from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest
+from dc_rest.models.message_attachment_request import MessageAttachmentRequest
+from dc_rest.models.poll_create_request import PollCreateRequest
+from dc_rest.models.rich_embed import RichEmbed
+from typing import Optional, Set
+from typing_extensions import Self
+
+class IncomingWebhookUpdateRequestPartial(BaseModel):
+ """
+ IncomingWebhookUpdateRequestPartial
+ """ # noqa: E501
+ content: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None
+ embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None
+ allowed_mentions: Optional[MessageAllowedMentionsRequest] = None
+ components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None
+ attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None
+ poll: Optional[PollCreateRequest] = None
+ flags: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "components", "attachments", "poll", "flags"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of IncomingWebhookUpdateRequestPartial from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in embeds (list)
+ _items = []
+ if self.embeds:
+ for _item_embeds in self.embeds:
+ if _item_embeds:
+ _items.append(_item_embeds.to_dict())
+ _dict['embeds'] = _items
+ # override the default output from pydantic by calling `to_dict()` of allowed_mentions
+ if self.allowed_mentions:
+ _dict['allowed_mentions'] = self.allowed_mentions.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
+ _items = []
+ if self.components:
+ for _item_components in self.components:
+ if _item_components:
+ _items.append(_item_components.to_dict())
+ _dict['components'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in attachments (list)
+ _items = []
+ if self.attachments:
+ for _item_attachments in self.attachments:
+ if _item_attachments:
+ _items.append(_item_attachments.to_dict())
+ _dict['attachments'] = _items
+ # override the default output from pydantic by calling `to_dict()` of poll
+ if self.poll:
+ _dict['poll'] = self.poll.to_dict()
+ # set to None if content (nullable) is None
+ # and model_fields_set contains the field
+ if self.content is None and "content" in self.model_fields_set:
+ _dict['content'] = None
+
+ # set to None if embeds (nullable) is None
+ # and model_fields_set contains the field
+ if self.embeds is None and "embeds" in self.model_fields_set:
+ _dict['embeds'] = None
+
+ # set to None if allowed_mentions (nullable) is None
+ # and model_fields_set contains the field
+ if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set:
+ _dict['allowed_mentions'] = None
+
+ # set to None if components (nullable) is None
+ # and model_fields_set contains the field
+ if self.components is None and "components" in self.model_fields_set:
+ _dict['components'] = None
+
+ # set to None if attachments (nullable) is None
+ # and model_fields_set contains the field
+ if self.attachments is None and "attachments" in self.model_fields_set:
+ _dict['attachments'] = None
+
+ # set to None if poll (nullable) is None
+ # and model_fields_set contains the field
+ if self.poll is None and "poll" in self.model_fields_set:
+ _dict['poll'] = None
+
+ # set to None if flags (nullable) is None
+ # and model_fields_set contains the field
+ if self.flags is None and "flags" in self.model_fields_set:
+ _dict['flags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of IncomingWebhookUpdateRequestPartial from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in IncomingWebhookUpdateRequestPartial) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "content": obj.get("content"),
+ "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None,
+ "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None,
+ "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None,
+ "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None,
+ "poll": PollCreateRequest.from_dict(obj["poll"]) if obj.get("poll") is not None else None,
+ "flags": obj.get("flags")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/inner_errors.py b/dc_rest/models/inner_errors.py
new file mode 100644
index 0000000..e3522f0
--- /dev/null
+++ b/dc_rest/models/inner_errors.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from dc_rest.models.error import Error
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InnerErrors(BaseModel):
+ """
+ InnerErrors
+ """ # noqa: E501
+ errors: List[Error] = Field(description="The list of errors for this field", alias="_errors")
+ __properties: ClassVar[List[str]] = ["_errors"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InnerErrors from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
+ _items = []
+ if self.errors:
+ for _item_errors in self.errors:
+ if _item_errors:
+ _items.append(_item_errors.to_dict())
+ _dict['_errors'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InnerErrors from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in InnerErrors) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "_errors": [Error.from_dict(_item) for _item in obj["_errors"]] if obj.get("_errors") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/integration_application_response.py b/dc_rest/models/integration_application_response.py
new file mode 100644
index 0000000..b71f233
--- /dev/null
+++ b/dc_rest/models/integration_application_response.py
@@ -0,0 +1,182 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class IntegrationApplicationResponse(BaseModel):
+ """
+ IntegrationApplicationResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ icon: Optional[StrictStr] = None
+ description: StrictStr
+ type: Optional[StrictInt] = None
+ cover_image: Optional[StrictStr] = None
+ primary_sku_id: Optional[Annotated[str, Field(strict=True)]] = None
+ bot: Optional[UserResponse] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "type", "cover_image", "primary_sku_id", "bot"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('primary_sku_id')
+ def primary_sku_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of IntegrationApplicationResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of bot
+ if self.bot:
+ _dict['bot'] = self.bot.to_dict()
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if cover_image (nullable) is None
+ # and model_fields_set contains the field
+ if self.cover_image is None and "cover_image" in self.model_fields_set:
+ _dict['cover_image'] = None
+
+ # set to None if bot (nullable) is None
+ # and model_fields_set contains the field
+ if self.bot is None and "bot" in self.model_fields_set:
+ _dict['bot'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of IntegrationApplicationResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in IntegrationApplicationResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "icon": obj.get("icon"),
+ "description": obj.get("description"),
+ "type": obj.get("type"),
+ "cover_image": obj.get("cover_image"),
+ "primary_sku_id": obj.get("primary_sku_id"),
+ "bot": UserResponse.from_dict(obj["bot"]) if obj.get("bot") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/interaction_application_command_autocomplete_callback_integer_data.py b/dc_rest/models/interaction_application_command_autocomplete_callback_integer_data.py
new file mode 100644
index 0000000..5e7195e
--- /dev/null
+++ b/dc_rest/models/interaction_application_command_autocomplete_callback_integer_data.py
@@ -0,0 +1,140 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_option_integer_choice import ApplicationCommandOptionIntegerChoice
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InteractionApplicationCommandAutocompleteCallbackIntegerData(BaseModel):
+ """
+ InteractionApplicationCommandAutocompleteCallbackIntegerData
+ """ # noqa: E501
+ choices: Optional[Annotated[List[Optional[ApplicationCommandOptionIntegerChoice]], Field(max_length=25)]] = None
+ __properties: ClassVar[List[str]] = ["choices"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InteractionApplicationCommandAutocompleteCallbackIntegerData from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in choices (list)
+ _items = []
+ if self.choices:
+ for _item_choices in self.choices:
+ if _item_choices:
+ _items.append(_item_choices.to_dict())
+ _dict['choices'] = _items
+ # set to None if choices (nullable) is None
+ # and model_fields_set contains the field
+ if self.choices is None and "choices" in self.model_fields_set:
+ _dict['choices'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InteractionApplicationCommandAutocompleteCallbackIntegerData from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in InteractionApplicationCommandAutocompleteCallbackIntegerData) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "choices": [ApplicationCommandOptionIntegerChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/interaction_application_command_autocomplete_callback_number_data.py b/dc_rest/models/interaction_application_command_autocomplete_callback_number_data.py
new file mode 100644
index 0000000..599e38a
--- /dev/null
+++ b/dc_rest/models/interaction_application_command_autocomplete_callback_number_data.py
@@ -0,0 +1,140 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_option_number_choice import ApplicationCommandOptionNumberChoice
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InteractionApplicationCommandAutocompleteCallbackNumberData(BaseModel):
+ """
+ InteractionApplicationCommandAutocompleteCallbackNumberData
+ """ # noqa: E501
+ choices: Optional[Annotated[List[Optional[ApplicationCommandOptionNumberChoice]], Field(max_length=25)]] = None
+ __properties: ClassVar[List[str]] = ["choices"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InteractionApplicationCommandAutocompleteCallbackNumberData from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in choices (list)
+ _items = []
+ if self.choices:
+ for _item_choices in self.choices:
+ if _item_choices:
+ _items.append(_item_choices.to_dict())
+ _dict['choices'] = _items
+ # set to None if choices (nullable) is None
+ # and model_fields_set contains the field
+ if self.choices is None and "choices" in self.model_fields_set:
+ _dict['choices'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InteractionApplicationCommandAutocompleteCallbackNumberData from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in InteractionApplicationCommandAutocompleteCallbackNumberData) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "choices": [ApplicationCommandOptionNumberChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/interaction_application_command_autocomplete_callback_string_data.py b/dc_rest/models/interaction_application_command_autocomplete_callback_string_data.py
new file mode 100644
index 0000000..78aa288
--- /dev/null
+++ b/dc_rest/models/interaction_application_command_autocomplete_callback_string_data.py
@@ -0,0 +1,140 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_command_option_string_choice import ApplicationCommandOptionStringChoice
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InteractionApplicationCommandAutocompleteCallbackStringData(BaseModel):
+ """
+ InteractionApplicationCommandAutocompleteCallbackStringData
+ """ # noqa: E501
+ choices: Optional[Annotated[List[Optional[ApplicationCommandOptionStringChoice]], Field(max_length=25)]] = None
+ __properties: ClassVar[List[str]] = ["choices"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InteractionApplicationCommandAutocompleteCallbackStringData from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in choices (list)
+ _items = []
+ if self.choices:
+ for _item_choices in self.choices:
+ if _item_choices:
+ _items.append(_item_choices.to_dict())
+ _dict['choices'] = _items
+ # set to None if choices (nullable) is None
+ # and model_fields_set contains the field
+ if self.choices is None and "choices" in self.model_fields_set:
+ _dict['choices'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InteractionApplicationCommandAutocompleteCallbackStringData from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in InteractionApplicationCommandAutocompleteCallbackStringData) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "choices": [ApplicationCommandOptionStringChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/interaction_callback_response.py b/dc_rest/models/interaction_callback_response.py
new file mode 100644
index 0000000..d0b7ecc
--- /dev/null
+++ b/dc_rest/models/interaction_callback_response.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from dc_rest.models.interaction_callback_response_resource import InteractionCallbackResponseResource
+from dc_rest.models.interaction_response import InteractionResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InteractionCallbackResponse(BaseModel):
+ """
+ InteractionCallbackResponse
+ """ # noqa: E501
+ interaction: InteractionResponse
+ resource: Optional[InteractionCallbackResponseResource] = None
+ __properties: ClassVar[List[str]] = ["interaction", "resource"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InteractionCallbackResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of interaction
+ if self.interaction:
+ _dict['interaction'] = self.interaction.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of resource
+ if self.resource:
+ _dict['resource'] = self.resource.to_dict()
+ # set to None if resource (nullable) is None
+ # and model_fields_set contains the field
+ if self.resource is None and "resource" in self.model_fields_set:
+ _dict['resource'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InteractionCallbackResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in InteractionCallbackResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "interaction": InteractionResponse.from_dict(obj["interaction"]) if obj.get("interaction") is not None else None,
+ "resource": InteractionCallbackResponseResource.from_dict(obj["resource"]) if obj.get("resource") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/interaction_callback_response_resource.py b/dc_rest/models/interaction_callback_response_resource.py
new file mode 100644
index 0000000..2885e30
--- /dev/null
+++ b/dc_rest/models/interaction_callback_response_resource.py
@@ -0,0 +1,191 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.create_message_interaction_callback_response import CreateMessageInteractionCallbackResponse
+from dc_rest.models.launch_activity_interaction_callback_response import LaunchActivityInteractionCallbackResponse
+from dc_rest.models.update_message_interaction_callback_response import UpdateMessageInteractionCallbackResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+INTERACTIONCALLBACKRESPONSERESOURCE_ONE_OF_SCHEMAS = ["CreateMessageInteractionCallbackResponse", "LaunchActivityInteractionCallbackResponse", "UpdateMessageInteractionCallbackResponse"]
+
+class InteractionCallbackResponseResource(BaseModel):
+ """
+ InteractionCallbackResponseResource
+ """
+ # data type: CreateMessageInteractionCallbackResponse
+ oneof_schema_1_validator: Optional[CreateMessageInteractionCallbackResponse] = None
+ # data type: LaunchActivityInteractionCallbackResponse
+ oneof_schema_2_validator: Optional[LaunchActivityInteractionCallbackResponse] = None
+ # data type: UpdateMessageInteractionCallbackResponse
+ oneof_schema_3_validator: Optional[UpdateMessageInteractionCallbackResponse] = None
+ actual_instance: Optional[Union[CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse]] = None
+ one_of_schemas: Set[str] = { "CreateMessageInteractionCallbackResponse", "LaunchActivityInteractionCallbackResponse", "UpdateMessageInteractionCallbackResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ if v is None:
+ return v
+
+ instance = InteractionCallbackResponseResource.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: CreateMessageInteractionCallbackResponse
+ if not isinstance(v, CreateMessageInteractionCallbackResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CreateMessageInteractionCallbackResponse`")
+ else:
+ match += 1
+ # validate data type: LaunchActivityInteractionCallbackResponse
+ if not isinstance(v, LaunchActivityInteractionCallbackResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `LaunchActivityInteractionCallbackResponse`")
+ else:
+ match += 1
+ # validate data type: UpdateMessageInteractionCallbackResponse
+ if not isinstance(v, UpdateMessageInteractionCallbackResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `UpdateMessageInteractionCallbackResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in InteractionCallbackResponseResource with oneOf schemas: CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in InteractionCallbackResponseResource with oneOf schemas: CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: Optional[str]) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ if json_str is None:
+ return instance
+
+ error_messages = []
+ match = 0
+
+ # deserialize data into CreateMessageInteractionCallbackResponse
+ try:
+ instance.actual_instance = CreateMessageInteractionCallbackResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into LaunchActivityInteractionCallbackResponse
+ try:
+ instance.actual_instance = LaunchActivityInteractionCallbackResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into UpdateMessageInteractionCallbackResponse
+ try:
+ instance.actual_instance = UpdateMessageInteractionCallbackResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into InteractionCallbackResponseResource with oneOf schemas: CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into InteractionCallbackResponseResource with oneOf schemas: CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/interaction_response.py b/dc_rest/models/interaction_response.py
new file mode 100644
index 0000000..6245c48
--- /dev/null
+++ b/dc_rest/models/interaction_response.py
@@ -0,0 +1,186 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InteractionResponse(BaseModel):
+ """
+ InteractionResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ type: StrictInt
+ response_message_id: Optional[Annotated[str, Field(strict=True)]] = None
+ response_message_loading: Optional[StrictBool] = None
+ response_message_ephemeral: Optional[StrictBool] = None
+ channel_id: Optional[Annotated[str, Field(strict=True)]] = None
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None
+ __properties: ClassVar[List[str]] = ["id", "type", "response_message_id", "response_message_loading", "response_message_ephemeral", "channel_id", "guild_id"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('response_message_id')
+ def response_message_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('channel_id')
+ def channel_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InteractionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if response_message_loading (nullable) is None
+ # and model_fields_set contains the field
+ if self.response_message_loading is None and "response_message_loading" in self.model_fields_set:
+ _dict['response_message_loading'] = None
+
+ # set to None if response_message_ephemeral (nullable) is None
+ # and model_fields_set contains the field
+ if self.response_message_ephemeral is None and "response_message_ephemeral" in self.model_fields_set:
+ _dict['response_message_ephemeral'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InteractionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in InteractionResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "response_message_id": obj.get("response_message_id"),
+ "response_message_loading": obj.get("response_message_loading"),
+ "response_message_ephemeral": obj.get("response_message_ephemeral"),
+ "channel_id": obj.get("channel_id"),
+ "guild_id": obj.get("guild_id")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/invite_application_response.py b/dc_rest/models/invite_application_response.py
new file mode 100644
index 0000000..44c3e24
--- /dev/null
+++ b/dc_rest/models/invite_application_response.py
@@ -0,0 +1,287 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse
+from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse
+from dc_rest.models.user_response import UserResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InviteApplicationResponse(BaseModel):
+ """
+ InviteApplicationResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ icon: Optional[StrictStr] = None
+ description: StrictStr
+ type: Optional[StrictInt] = None
+ cover_image: Optional[StrictStr] = None
+ primary_sku_id: Optional[Annotated[str, Field(strict=True)]] = None
+ bot: Optional[UserResponse] = None
+ slug: Optional[StrictStr] = None
+ guild_id: Optional[Annotated[str, Field(strict=True)]] = None
+ rpc_origins: Optional[List[Optional[StrictStr]]] = None
+ bot_public: Optional[StrictBool] = None
+ bot_require_code_grant: Optional[StrictBool] = None
+ terms_of_service_url: Optional[StrictStr] = None
+ privacy_policy_url: Optional[StrictStr] = None
+ custom_install_url: Optional[StrictStr] = None
+ install_params: Optional[ApplicationOAuth2InstallParamsResponse] = None
+ integration_types_config: Optional[Dict[str, ApplicationIntegrationTypeConfigurationResponse]] = None
+ verify_key: StrictStr
+ flags: StrictInt
+ max_participants: Optional[StrictInt] = None
+ tags: Optional[List[StrictStr]] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "type", "cover_image", "primary_sku_id", "bot", "slug", "guild_id", "rpc_origins", "bot_public", "bot_require_code_grant", "terms_of_service_url", "privacy_policy_url", "custom_install_url", "install_params", "integration_types_config", "verify_key", "flags", "max_participants", "tags"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('primary_sku_id')
+ def primary_sku_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InviteApplicationResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of bot
+ if self.bot:
+ _dict['bot'] = self.bot.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of install_params
+ if self.install_params:
+ _dict['install_params'] = self.install_params.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each value in integration_types_config (dict)
+ _field_dict = {}
+ if self.integration_types_config:
+ for _key_integration_types_config in self.integration_types_config:
+ if self.integration_types_config[_key_integration_types_config]:
+ _field_dict[_key_integration_types_config] = self.integration_types_config[_key_integration_types_config].to_dict()
+ _dict['integration_types_config'] = _field_dict
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if cover_image (nullable) is None
+ # and model_fields_set contains the field
+ if self.cover_image is None and "cover_image" in self.model_fields_set:
+ _dict['cover_image'] = None
+
+ # set to None if bot (nullable) is None
+ # and model_fields_set contains the field
+ if self.bot is None and "bot" in self.model_fields_set:
+ _dict['bot'] = None
+
+ # set to None if slug (nullable) is None
+ # and model_fields_set contains the field
+ if self.slug is None and "slug" in self.model_fields_set:
+ _dict['slug'] = None
+
+ # set to None if rpc_origins (nullable) is None
+ # and model_fields_set contains the field
+ if self.rpc_origins is None and "rpc_origins" in self.model_fields_set:
+ _dict['rpc_origins'] = None
+
+ # set to None if bot_public (nullable) is None
+ # and model_fields_set contains the field
+ if self.bot_public is None and "bot_public" in self.model_fields_set:
+ _dict['bot_public'] = None
+
+ # set to None if bot_require_code_grant (nullable) is None
+ # and model_fields_set contains the field
+ if self.bot_require_code_grant is None and "bot_require_code_grant" in self.model_fields_set:
+ _dict['bot_require_code_grant'] = None
+
+ # set to None if terms_of_service_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.terms_of_service_url is None and "terms_of_service_url" in self.model_fields_set:
+ _dict['terms_of_service_url'] = None
+
+ # set to None if privacy_policy_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set:
+ _dict['privacy_policy_url'] = None
+
+ # set to None if custom_install_url (nullable) is None
+ # and model_fields_set contains the field
+ if self.custom_install_url is None and "custom_install_url" in self.model_fields_set:
+ _dict['custom_install_url'] = None
+
+ # set to None if install_params (nullable) is None
+ # and model_fields_set contains the field
+ if self.install_params is None and "install_params" in self.model_fields_set:
+ _dict['install_params'] = None
+
+ # set to None if max_participants (nullable) is None
+ # and model_fields_set contains the field
+ if self.max_participants is None and "max_participants" in self.model_fields_set:
+ _dict['max_participants'] = None
+
+ # set to None if tags (nullable) is None
+ # and model_fields_set contains the field
+ if self.tags is None and "tags" in self.model_fields_set:
+ _dict['tags'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InviteApplicationResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in InviteApplicationResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "icon": obj.get("icon"),
+ "description": obj.get("description"),
+ "type": obj.get("type"),
+ "cover_image": obj.get("cover_image"),
+ "primary_sku_id": obj.get("primary_sku_id"),
+ "bot": UserResponse.from_dict(obj["bot"]) if obj.get("bot") is not None else None,
+ "slug": obj.get("slug"),
+ "guild_id": obj.get("guild_id"),
+ "rpc_origins": obj.get("rpc_origins"),
+ "bot_public": obj.get("bot_public"),
+ "bot_require_code_grant": obj.get("bot_require_code_grant"),
+ "terms_of_service_url": obj.get("terms_of_service_url"),
+ "privacy_policy_url": obj.get("privacy_policy_url"),
+ "custom_install_url": obj.get("custom_install_url"),
+ "install_params": ApplicationOAuth2InstallParamsResponse.from_dict(obj["install_params"]) if obj.get("install_params") is not None else None,
+ "integration_types_config": dict(
+ (_k, ApplicationIntegrationTypeConfigurationResponse.from_dict(_v))
+ for _k, _v in obj["integration_types_config"].items()
+ )
+ if obj.get("integration_types_config") is not None
+ else None,
+ "verify_key": obj.get("verify_key"),
+ "flags": obj.get("flags"),
+ "max_participants": obj.get("max_participants"),
+ "tags": obj.get("tags")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/invite_channel_recipient_response.py b/dc_rest/models/invite_channel_recipient_response.py
new file mode 100644
index 0000000..ed9a462
--- /dev/null
+++ b/dc_rest/models/invite_channel_recipient_response.py
@@ -0,0 +1,126 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InviteChannelRecipientResponse(BaseModel):
+ """
+ InviteChannelRecipientResponse
+ """ # noqa: E501
+ username: StrictStr
+ __properties: ClassVar[List[str]] = ["username"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InviteChannelRecipientResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InviteChannelRecipientResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in InviteChannelRecipientResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "username": obj.get("username")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/invite_channel_response.py b/dc_rest/models/invite_channel_response.py
new file mode 100644
index 0000000..0405719
--- /dev/null
+++ b/dc_rest/models/invite_channel_response.py
@@ -0,0 +1,165 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.invite_channel_recipient_response import InviteChannelRecipientResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InviteChannelResponse(BaseModel):
+ """
+ InviteChannelResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ type: StrictInt
+ name: Optional[StrictStr] = None
+ icon: Optional[StrictStr] = None
+ recipients: Optional[List[InviteChannelRecipientResponse]] = None
+ __properties: ClassVar[List[str]] = ["id", "type", "name", "icon", "recipients"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InviteChannelResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in recipients (list)
+ _items = []
+ if self.recipients:
+ for _item_recipients in self.recipients:
+ if _item_recipients:
+ _items.append(_item_recipients.to_dict())
+ _dict['recipients'] = _items
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if recipients (nullable) is None
+ # and model_fields_set contains the field
+ if self.recipients is None and "recipients" in self.model_fields_set:
+ _dict['recipients'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InviteChannelResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in InviteChannelResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "icon": obj.get("icon"),
+ "recipients": [InviteChannelRecipientResponse.from_dict(_item) for _item in obj["recipients"]] if obj.get("recipients") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/invite_guild_response.py b/dc_rest/models/invite_guild_response.py
new file mode 100644
index 0000000..e1d09ff
--- /dev/null
+++ b/dc_rest/models/invite_guild_response.py
@@ -0,0 +1,196 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InviteGuildResponse(BaseModel):
+ """
+ InviteGuildResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ splash: Optional[StrictStr] = None
+ banner: Optional[StrictStr] = None
+ description: Optional[StrictStr] = None
+ icon: Optional[StrictStr] = None
+ features: List[StrictStr]
+ verification_level: Optional[StrictInt] = None
+ vanity_url_code: Optional[StrictStr] = None
+ nsfw_level: Optional[StrictInt] = None
+ nsfw: Optional[StrictBool] = None
+ premium_subscription_count: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["id", "name", "splash", "banner", "description", "icon", "features", "verification_level", "vanity_url_code", "nsfw_level", "nsfw", "premium_subscription_count"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InviteGuildResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if splash (nullable) is None
+ # and model_fields_set contains the field
+ if self.splash is None and "splash" in self.model_fields_set:
+ _dict['splash'] = None
+
+ # set to None if banner (nullable) is None
+ # and model_fields_set contains the field
+ if self.banner is None and "banner" in self.model_fields_set:
+ _dict['banner'] = None
+
+ # set to None if description (nullable) is None
+ # and model_fields_set contains the field
+ if self.description is None and "description" in self.model_fields_set:
+ _dict['description'] = None
+
+ # set to None if icon (nullable) is None
+ # and model_fields_set contains the field
+ if self.icon is None and "icon" in self.model_fields_set:
+ _dict['icon'] = None
+
+ # set to None if vanity_url_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.vanity_url_code is None and "vanity_url_code" in self.model_fields_set:
+ _dict['vanity_url_code'] = None
+
+ # set to None if nsfw_level (nullable) is None
+ # and model_fields_set contains the field
+ if self.nsfw_level is None and "nsfw_level" in self.model_fields_set:
+ _dict['nsfw_level'] = None
+
+ # set to None if nsfw (nullable) is None
+ # and model_fields_set contains the field
+ if self.nsfw is None and "nsfw" in self.model_fields_set:
+ _dict['nsfw'] = None
+
+ # set to None if premium_subscription_count (nullable) is None
+ # and model_fields_set contains the field
+ if self.premium_subscription_count is None and "premium_subscription_count" in self.model_fields_set:
+ _dict['premium_subscription_count'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InviteGuildResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in InviteGuildResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "splash": obj.get("splash"),
+ "banner": obj.get("banner"),
+ "description": obj.get("description"),
+ "icon": obj.get("icon"),
+ "features": obj.get("features"),
+ "verification_level": obj.get("verification_level"),
+ "vanity_url_code": obj.get("vanity_url_code"),
+ "nsfw_level": obj.get("nsfw_level"),
+ "nsfw": obj.get("nsfw"),
+ "premium_subscription_count": obj.get("premium_subscription_count")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/keyword_rule_response.py b/dc_rest/models/keyword_rule_response.py
new file mode 100644
index 0000000..d1576af
--- /dev/null
+++ b/dc_rest/models/keyword_rule_response.py
@@ -0,0 +1,195 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner
+from dc_rest.models.keyword_trigger_metadata_response import KeywordTriggerMetadataResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class KeywordRuleResponse(BaseModel):
+ """
+ KeywordRuleResponse
+ """ # noqa: E501
+ id: Annotated[str, Field(strict=True)]
+ guild_id: Annotated[str, Field(strict=True)]
+ creator_id: Annotated[str, Field(strict=True)]
+ name: StrictStr
+ event_type: StrictInt
+ actions: List[DefaultKeywordRuleResponseActionsInner]
+ trigger_type: StrictInt
+ enabled: Optional[StrictBool] = None
+ exempt_roles: Optional[List[Annotated[str, Field(strict=True)]]] = None
+ exempt_channels: Optional[List[Annotated[str, Field(strict=True)]]] = None
+ trigger_metadata: KeywordTriggerMetadataResponse
+ __properties: ClassVar[List[str]] = ["id", "guild_id", "creator_id", "name", "event_type", "actions", "trigger_type", "enabled", "exempt_roles", "exempt_channels", "trigger_metadata"]
+
+ @field_validator('id')
+ def id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('guild_id')
+ def guild_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ @field_validator('creator_id')
+ def creator_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"^(0|[1-9][0-9]*)$", value):
+ raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of KeywordRuleResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in actions (list)
+ _items = []
+ if self.actions:
+ for _item_actions in self.actions:
+ if _item_actions:
+ _items.append(_item_actions.to_dict())
+ _dict['actions'] = _items
+ # override the default output from pydantic by calling `to_dict()` of trigger_metadata
+ if self.trigger_metadata:
+ _dict['trigger_metadata'] = self.trigger_metadata.to_dict()
+ # set to None if enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.enabled is None and "enabled" in self.model_fields_set:
+ _dict['enabled'] = None
+
+ # set to None if exempt_roles (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_roles is None and "exempt_roles" in self.model_fields_set:
+ _dict['exempt_roles'] = None
+
+ # set to None if exempt_channels (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_channels is None and "exempt_channels" in self.model_fields_set:
+ _dict['exempt_channels'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of KeywordRuleResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in KeywordRuleResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "guild_id": obj.get("guild_id"),
+ "creator_id": obj.get("creator_id"),
+ "name": obj.get("name"),
+ "event_type": obj.get("event_type"),
+ "actions": [DefaultKeywordRuleResponseActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None,
+ "trigger_type": obj.get("trigger_type"),
+ "enabled": obj.get("enabled"),
+ "exempt_roles": obj.get("exempt_roles"),
+ "exempt_channels": obj.get("exempt_channels"),
+ "trigger_metadata": KeywordTriggerMetadataResponse.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/keyword_trigger_metadata.py b/dc_rest/models/keyword_trigger_metadata.py
new file mode 100644
index 0000000..bf07d9e
--- /dev/null
+++ b/dc_rest/models/keyword_trigger_metadata.py
@@ -0,0 +1,146 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class KeywordTriggerMetadata(BaseModel):
+ """
+ KeywordTriggerMetadata
+ """ # noqa: E501
+ keyword_filter: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=60)]], Field(max_length=1000)]] = None
+ regex_patterns: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=260)]], Field(max_length=10)]] = None
+ allow_list: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=60)]], Field(max_length=100)]] = None
+ __properties: ClassVar[List[str]] = ["keyword_filter", "regex_patterns", "allow_list"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of KeywordTriggerMetadata from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if keyword_filter (nullable) is None
+ # and model_fields_set contains the field
+ if self.keyword_filter is None and "keyword_filter" in self.model_fields_set:
+ _dict['keyword_filter'] = None
+
+ # set to None if regex_patterns (nullable) is None
+ # and model_fields_set contains the field
+ if self.regex_patterns is None and "regex_patterns" in self.model_fields_set:
+ _dict['regex_patterns'] = None
+
+ # set to None if allow_list (nullable) is None
+ # and model_fields_set contains the field
+ if self.allow_list is None and "allow_list" in self.model_fields_set:
+ _dict['allow_list'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of KeywordTriggerMetadata from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in KeywordTriggerMetadata) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "keyword_filter": obj.get("keyword_filter"),
+ "regex_patterns": obj.get("regex_patterns"),
+ "allow_list": obj.get("allow_list")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/keyword_trigger_metadata_response.py b/dc_rest/models/keyword_trigger_metadata_response.py
new file mode 100644
index 0000000..94e3ad6
--- /dev/null
+++ b/dc_rest/models/keyword_trigger_metadata_response.py
@@ -0,0 +1,130 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class KeywordTriggerMetadataResponse(BaseModel):
+ """
+ KeywordTriggerMetadataResponse
+ """ # noqa: E501
+ keyword_filter: List[StrictStr]
+ regex_patterns: List[StrictStr]
+ allow_list: List[StrictStr]
+ __properties: ClassVar[List[str]] = ["keyword_filter", "regex_patterns", "allow_list"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of KeywordTriggerMetadataResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of KeywordTriggerMetadataResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in KeywordTriggerMetadataResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "keyword_filter": obj.get("keyword_filter"),
+ "regex_patterns": obj.get("regex_patterns"),
+ "allow_list": obj.get("allow_list")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/keyword_upsert_request.py b/dc_rest/models/keyword_upsert_request.py
new file mode 100644
index 0000000..a898363
--- /dev/null
+++ b/dc_rest/models/keyword_upsert_request.py
@@ -0,0 +1,178 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner
+from dc_rest.models.keyword_trigger_metadata import KeywordTriggerMetadata
+from typing import Optional, Set
+from typing_extensions import Self
+
+class KeywordUpsertRequest(BaseModel):
+ """
+ KeywordUpsertRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(strict=True, max_length=100)]
+ event_type: StrictInt
+ actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None
+ enabled: Optional[StrictBool] = None
+ exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None
+ exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None
+ trigger_type: StrictInt
+ trigger_metadata: Optional[KeywordTriggerMetadata] = None
+ __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of KeywordUpsertRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in actions (list)
+ _items = []
+ if self.actions:
+ for _item_actions in self.actions:
+ if _item_actions:
+ _items.append(_item_actions.to_dict())
+ _dict['actions'] = _items
+ # override the default output from pydantic by calling `to_dict()` of trigger_metadata
+ if self.trigger_metadata:
+ _dict['trigger_metadata'] = self.trigger_metadata.to_dict()
+ # set to None if actions (nullable) is None
+ # and model_fields_set contains the field
+ if self.actions is None and "actions" in self.model_fields_set:
+ _dict['actions'] = None
+
+ # set to None if enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.enabled is None and "enabled" in self.model_fields_set:
+ _dict['enabled'] = None
+
+ # set to None if exempt_roles (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_roles is None and "exempt_roles" in self.model_fields_set:
+ _dict['exempt_roles'] = None
+
+ # set to None if exempt_channels (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_channels is None and "exempt_channels" in self.model_fields_set:
+ _dict['exempt_channels'] = None
+
+ # set to None if trigger_metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.trigger_metadata is None and "trigger_metadata" in self.model_fields_set:
+ _dict['trigger_metadata'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of KeywordUpsertRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in KeywordUpsertRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "event_type": obj.get("event_type"),
+ "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None,
+ "enabled": obj.get("enabled"),
+ "exempt_roles": obj.get("exempt_roles"),
+ "exempt_channels": obj.get("exempt_channels"),
+ "trigger_type": obj.get("trigger_type"),
+ "trigger_metadata": KeywordTriggerMetadata.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/keyword_upsert_request_partial.py b/dc_rest/models/keyword_upsert_request_partial.py
new file mode 100644
index 0000000..2f5db74
--- /dev/null
+++ b/dc_rest/models/keyword_upsert_request_partial.py
@@ -0,0 +1,178 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner
+from dc_rest.models.keyword_trigger_metadata import KeywordTriggerMetadata
+from typing import Optional, Set
+from typing_extensions import Self
+
+class KeywordUpsertRequestPartial(BaseModel):
+ """
+ KeywordUpsertRequestPartial
+ """ # noqa: E501
+ name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
+ event_type: Optional[StrictInt] = None
+ actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None
+ enabled: Optional[StrictBool] = None
+ exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None
+ exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None
+ trigger_type: Optional[StrictInt] = None
+ trigger_metadata: Optional[KeywordTriggerMetadata] = None
+ __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of KeywordUpsertRequestPartial from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in actions (list)
+ _items = []
+ if self.actions:
+ for _item_actions in self.actions:
+ if _item_actions:
+ _items.append(_item_actions.to_dict())
+ _dict['actions'] = _items
+ # override the default output from pydantic by calling `to_dict()` of trigger_metadata
+ if self.trigger_metadata:
+ _dict['trigger_metadata'] = self.trigger_metadata.to_dict()
+ # set to None if actions (nullable) is None
+ # and model_fields_set contains the field
+ if self.actions is None and "actions" in self.model_fields_set:
+ _dict['actions'] = None
+
+ # set to None if enabled (nullable) is None
+ # and model_fields_set contains the field
+ if self.enabled is None and "enabled" in self.model_fields_set:
+ _dict['enabled'] = None
+
+ # set to None if exempt_roles (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_roles is None and "exempt_roles" in self.model_fields_set:
+ _dict['exempt_roles'] = None
+
+ # set to None if exempt_channels (nullable) is None
+ # and model_fields_set contains the field
+ if self.exempt_channels is None and "exempt_channels" in self.model_fields_set:
+ _dict['exempt_channels'] = None
+
+ # set to None if trigger_metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.trigger_metadata is None and "trigger_metadata" in self.model_fields_set:
+ _dict['trigger_metadata'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of KeywordUpsertRequestPartial from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in KeywordUpsertRequestPartial) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "event_type": obj.get("event_type"),
+ "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None,
+ "enabled": obj.get("enabled"),
+ "exempt_roles": obj.get("exempt_roles"),
+ "exempt_channels": obj.get("exempt_channels"),
+ "trigger_type": obj.get("trigger_type"),
+ "trigger_metadata": KeywordTriggerMetadata.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/launch_activity_interaction_callback_request.py b/dc_rest/models/launch_activity_interaction_callback_request.py
new file mode 100644
index 0000000..2e42f83
--- /dev/null
+++ b/dc_rest/models/launch_activity_interaction_callback_request.py
@@ -0,0 +1,131 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LaunchActivityInteractionCallbackRequest(BaseModel):
+ """
+ LaunchActivityInteractionCallbackRequest
+ """ # noqa: E501
+ type: Optional[StrictInt]
+ __properties: ClassVar[List[str]] = ["type"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LaunchActivityInteractionCallbackRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LaunchActivityInteractionCallbackRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in LaunchActivityInteractionCallbackRequest) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/launch_activity_interaction_callback_response.py b/dc_rest/models/launch_activity_interaction_callback_response.py
new file mode 100644
index 0000000..b155cb0
--- /dev/null
+++ b/dc_rest/models/launch_activity_interaction_callback_response.py
@@ -0,0 +1,131 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LaunchActivityInteractionCallbackResponse(BaseModel):
+ """
+ LaunchActivityInteractionCallbackResponse
+ """ # noqa: E501
+ type: Optional[StrictInt]
+ __properties: ClassVar[List[str]] = ["type"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LaunchActivityInteractionCallbackResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LaunchActivityInteractionCallbackResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in LaunchActivityInteractionCallbackResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type")
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/list_application_emojis_response.py b/dc_rest/models/list_application_emojis_response.py
new file mode 100644
index 0000000..a9091cd
--- /dev/null
+++ b/dc_rest/models/list_application_emojis_response.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List
+from dc_rest.models.emoji_response import EmojiResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ListApplicationEmojisResponse(BaseModel):
+ """
+ ListApplicationEmojisResponse
+ """ # noqa: E501
+ items: List[EmojiResponse]
+ __properties: ClassVar[List[str]] = ["items"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ListApplicationEmojisResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item_items in self.items:
+ if _item_items:
+ _items.append(_item_items.to_dict())
+ _dict['items'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ListApplicationEmojisResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ # raise errors for additional fields in the input
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ raise ValueError("Error due to additional fields (not defined in ListApplicationEmojisResponse) in the input: " + _key)
+
+ _obj = cls.model_validate({
+ "items": [EmojiResponse.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None
+ })
+ return _obj
+
+
diff --git a/dc_rest/models/list_auto_moderation_rules200_response_inner.py b/dc_rest/models/list_auto_moderation_rules200_response_inner.py
new file mode 100644
index 0000000..d9152e4
--- /dev/null
+++ b/dc_rest/models/list_auto_moderation_rules200_response_inner.py
@@ -0,0 +1,219 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+⚠️ Important Disclaimer & Limitation of Liability
+
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited
+> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors,
+> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability
+> of this software or its outputs.
+>
+> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the
+> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of
+> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or
+> legal professionals before making decisions based on this software's outputs.
+>
+> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or
+> other financial activities may result in substantial losses, including total loss of capital. The Developers are not
+> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's
+> outputs and ensuring their suitability for intended purposes.
+>
+> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify
+> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must
+> comply with third-party terms and conditions.
+>
+> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in
+> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The
+> Developers disclaim liability for any legal consequences arising from non-compliance.
+>
+> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental,
+> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to
+> loss of profits, data, or business opportunities.
+
+
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
+from typing import Any, List, Optional
+from dc_rest.models.default_keyword_rule_response import DefaultKeywordRuleResponse
+from dc_rest.models.keyword_rule_response import KeywordRuleResponse
+from dc_rest.models.mention_spam_rule_response import MentionSpamRuleResponse
+from dc_rest.models.ml_spam_rule_response import MLSpamRuleResponse
+from dc_rest.models.spam_link_rule_response import SpamLinkRuleResponse
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+LISTAUTOMODERATIONRULES200RESPONSEINNER_ONE_OF_SCHEMAS = ["DefaultKeywordRuleResponse", "KeywordRuleResponse", "MLSpamRuleResponse", "MentionSpamRuleResponse", "SpamLinkRuleResponse"]
+
+class ListAutoModerationRules200ResponseInner(BaseModel):
+ """
+ ListAutoModerationRules200ResponseInner
+ """
+ # data type: DefaultKeywordRuleResponse
+ oneof_schema_1_validator: Optional[DefaultKeywordRuleResponse] = None
+ # data type: KeywordRuleResponse
+ oneof_schema_2_validator: Optional[KeywordRuleResponse] = None
+ # data type: MLSpamRuleResponse
+ oneof_schema_3_validator: Optional[MLSpamRuleResponse] = None
+ # data type: MentionSpamRuleResponse
+ oneof_schema_4_validator: Optional[MentionSpamRuleResponse] = None
+ # data type: SpamLinkRuleResponse
+ oneof_schema_5_validator: Optional[SpamLinkRuleResponse] = None
+ actual_instance: Optional[Union[DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse]] = None
+ one_of_schemas: Set[str] = { "DefaultKeywordRuleResponse", "KeywordRuleResponse", "MLSpamRuleResponse", "MentionSpamRuleResponse", "SpamLinkRuleResponse" }
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ if v is None:
+ return v
+
+ instance = ListAutoModerationRules200ResponseInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: DefaultKeywordRuleResponse
+ if not isinstance(v, DefaultKeywordRuleResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultKeywordRuleResponse`")
+ else:
+ match += 1
+ # validate data type: KeywordRuleResponse
+ if not isinstance(v, KeywordRuleResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `KeywordRuleResponse`")
+ else:
+ match += 1
+ # validate data type: MLSpamRuleResponse
+ if not isinstance(v, MLSpamRuleResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MLSpamRuleResponse`")
+ else:
+ match += 1
+ # validate data type: MentionSpamRuleResponse
+ if not isinstance(v, MentionSpamRuleResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MentionSpamRuleResponse`")
+ else:
+ match += 1
+ # validate data type: SpamLinkRuleResponse
+ if not isinstance(v, SpamLinkRuleResponse):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SpamLinkRuleResponse`")
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in ListAutoModerationRules200ResponseInner with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in ListAutoModerationRules200ResponseInner with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: Optional[str]) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ if json_str is None:
+ return instance
+
+ error_messages = []
+ match = 0
+
+ # deserialize data into DefaultKeywordRuleResponse
+ try:
+ instance.actual_instance = DefaultKeywordRuleResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into KeywordRuleResponse
+ try:
+ instance.actual_instance = KeywordRuleResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MLSpamRuleResponse
+ try:
+ instance.actual_instance = MLSpamRuleResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into MentionSpamRuleResponse
+ try:
+ instance.actual_instance = MentionSpamRuleResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SpamLinkRuleResponse
+ try:
+ instance.actual_instance = SpamLinkRuleResponse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into ListAutoModerationRules200ResponseInner with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into ListAutoModerationRules200ResponseInner with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/dc_rest/models/list_channel_invites200_response_inner.py b/dc_rest/models/list_channel_invites200_response_inner.py
new file mode 100644
index 0000000..75234c8
--- /dev/null
+++ b/dc_rest/models/list_channel_invites200_response_inner.py
@@ -0,0 +1,183 @@
+# coding: utf-8
+
+"""
+Discord HTTP API (Preview) - REST API Client
+Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.
+
+## Metadata
+
+- **Copyright**: Copyright (c) 2025 Qntx
+- **Author**: ΣX
+- **Version**: 10
+- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC]
+- **Generator Version**: 7.14.0
+
+
+