Skip to content

Commit d9e43a7

Browse files
authored
fix(docs): update links to API docs after migration (#1502)
1 parent 7041dea commit d9e43a7

File tree

22 files changed

+111
-110
lines changed

22 files changed

+111
-110
lines changed

changelog/1502.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update links/references to Discord API docs.

disnake/app_commands.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def application_command_factory(data: ApplicationCommandPayload) -> APIApplicati
8585

8686
def _validate_name(name: str) -> None:
8787
# used for slash command names and option names
88-
# see https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-naming
88+
# see https://docs.discord.com/developers/interactions/application-commands#application-command-object-application-command-naming
8989

9090
if not isinstance(name, str):
9191
msg = f"Slash command name and option names must be an instance of class 'str', received '{name.__class__}'"
@@ -498,7 +498,7 @@ class ApplicationCommand(ABC): # noqa: B024 # this will get refactored eventua
498498
.. versionadded:: 2.5
499499
500500
nsfw: :class:`bool`
501-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
501+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
502502
Defaults to ``False``.
503503
504504
.. versionadded:: 2.8
@@ -771,7 +771,7 @@ class UserCommand(ApplicationCommand):
771771
.. versionadded:: 2.5
772772
773773
nsfw: :class:`bool`
774-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
774+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
775775
Defaults to ``False``.
776776
777777
.. versionadded:: 2.8
@@ -829,7 +829,7 @@ class APIUserCommand(UserCommand, _APIApplicationCommandMixin):
829829
.. versionadded:: 2.5
830830
831831
nsfw: :class:`bool`
832-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
832+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
833833
834834
.. versionadded:: 2.8
835835
@@ -900,7 +900,7 @@ class MessageCommand(ApplicationCommand):
900900
.. versionadded:: 2.5
901901
902902
nsfw: :class:`bool`
903-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
903+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
904904
Defaults to ``False``.
905905
906906
.. versionadded:: 2.8
@@ -958,7 +958,7 @@ class APIMessageCommand(MessageCommand, _APIApplicationCommandMixin):
958958
.. versionadded:: 2.5
959959
960960
nsfw: :class:`bool`
961-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
961+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
962962
963963
.. versionadded:: 2.8
964964
@@ -1036,7 +1036,7 @@ class SlashCommand(ApplicationCommand):
10361036
.. versionadded:: 2.5
10371037
10381038
nsfw: :class:`bool`
1039-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
1039+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
10401040
Defaults to ``False``.
10411041
10421042
.. versionadded:: 2.8
@@ -1177,7 +1177,7 @@ class APISlashCommand(SlashCommand, _APIApplicationCommandMixin):
11771177
.. versionadded:: 2.5
11781178
11791179
nsfw: :class:`bool`
1180-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
1180+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
11811181
11821182
.. versionadded:: 2.8
11831183

disnake/appinfo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class AppInfo:
192192
A list of RPC origin URLs, if RPC is enabled.
193193
verify_key: :class:`str`
194194
The hex encoded key for verification in interactions and the
195-
GameSDK's :ddocs:`GetTicket <game-sdk/applications#getticket>`.
195+
GameSDK's `GetTicket <https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Applications.md#getticket>`_.
196196
197197
.. versionadded:: 1.3
198198
@@ -540,7 +540,7 @@ async def edit(
540540
event_webhooks_status: :class:`ApplicationEventWebhookStatus`
541541
The application's event webhooks status.
542542
event_webhooks_types: :class:`list`\[:class:`str`] | :data:`None`
543-
The application's event webhook types. See `webhook event types <https://discord.com/developers/docs/events/webhook-events#event-types>`_
543+
The application's event webhook types. See :ddocs:`webhook event types <events/webhook-events#event-types>`
544544
for a list of valid events.
545545
546546
Raises
@@ -662,7 +662,7 @@ class PartialAppInfo:
662662
A list of RPC origin URLs, if RPC is enabled.
663663
verify_key: :class:`str`
664664
The hex encoded key for verification in interactions and the
665-
GameSDK's :ddocs:`GetTicket <game-sdk/applications#getticket>`.
665+
GameSDK's `GetTicket <https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Applications.md#getticket>`_.
666666
terms_of_service_url: :class:`str` | :data:`None`
667667
The application's terms of service URL, if set.
668668
privacy_policy_url: :class:`str` | :data:`None`

disnake/embeds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class Embed:
151151
type: :class:`str` | :data:`None`
152152
The type of embed. Usually "rich".
153153
Possible strings for embed types can be found on Discord's
154-
:ddocs:`api-docs <resources/channel#embed-object-embed-types>`.
154+
:ddocs:`api-docs <resources/message#embed-object-embed-types>`.
155155
description: :class:`str` | :data:`None`
156156
The description of the embed.
157157
url: :class:`str` | :data:`None`
@@ -239,7 +239,7 @@ def from_dict(cls, data: EmbedData) -> Self:
239239
format that Discord expects it to be in.
240240
241241
You can find out about this format in the
242-
:ddocs:`official Discord documentation <resources/channel#embed-object>`.
242+
:ddocs:`official Discord documentation <resources/message#embed-object>`.
243243
244244
Parameters
245245
----------

disnake/enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ def __str__(self) -> str:
15881588
return self.value
15891589

15901590

1591-
# reference: https://discord.com/developers/docs/reference#locales
1591+
# reference: https://docs.discord.com/developers/reference#locales
15921592
class Locale(Enum):
15931593
"""Represents supported locales by Discord.
15941594

disnake/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class ConnectionClosed(ClientException):
224224
The shard ID that got closed if applicable.
225225
"""
226226

227-
# https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
227+
# https://docs.discord.com/developers/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
228228
GATEWAY_CLOSE_EVENT_REASONS: ClassVar[Mapping[int, str]] = {
229229
4000: "Unknown error",
230230
4001: "Unknown opcode",
@@ -242,7 +242,7 @@ class ConnectionClosed(ClientException):
242242
4014: "Disallowed intents - you tried to specify an intent that you have not enabled or are not approved for.",
243243
}
244244

245-
# https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
245+
# https://docs.discord.com/developers/topics/opcodes-and-status-codes#voice-voice-close-event-codes
246246
GATEWAY_VOICE_CLOSE_EVENT_REASONS: ClassVar[Mapping[int, str]] = {
247247
**GATEWAY_CLOSE_EVENT_REASONS,
248248
4002: "Failed to decode payload",

disnake/ext/commands/ctx_menus_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def user_command(
293293
.. versionadded:: 2.5
294294
295295
nsfw: :class:`bool`
296-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
296+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
297297
Defaults to ``False``.
298298
299299
.. versionadded:: 2.8
@@ -404,7 +404,7 @@ def message_command(
404404
.. versionadded:: 2.5
405405
406406
nsfw: :class:`bool`
407-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
407+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
408408
Defaults to ``False``.
409409
410410
.. versionadded:: 2.8

disnake/ext/commands/interaction_bot_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def slash_command(
546546
.. versionadded:: 2.5
547547
548548
nsfw: :class:`bool`
549-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
549+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
550550
Defaults to ``False``.
551551
552552
.. versionadded:: 2.8
@@ -656,7 +656,7 @@ def user_command(
656656
.. versionadded:: 2.5
657657
658658
nsfw: :class:`bool`
659-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
659+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
660660
Defaults to ``False``.
661661
662662
.. versionadded:: 2.8
@@ -759,7 +759,7 @@ def message_command(
759759
.. versionadded:: 2.5
760760
761761
nsfw: :class:`bool`
762-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
762+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
763763
Defaults to ``False``.
764764
765765
.. versionadded:: 2.8

disnake/ext/commands/slash_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ def slash_command(
825825
Added support for localizations.
826826
827827
nsfw: :class:`bool`
828-
Whether this command is :ddocs:`age-restricted <interactions/application-commands#agerestricted-commands>`.
828+
Whether this command is :ddocs:`age-restricted <interactions/application-commands#age-restricted-commands>`.
829829
Defaults to ``False``.
830830
831831
.. versionadded:: 2.8

disnake/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def set_attachments(payload: dict[str, Any], files: Sequence[File]) -> None:
134134

135135
def to_multipart(payload: dict[str, Any], files: Sequence[File]) -> list[dict[str, Any]]:
136136
"""Converts the payload and list of files to a multipart payload,
137-
as specified by https://discord.com/developers/docs/reference#uploading-files
137+
as specified by https://docs.discord.com/developers/reference#uploading-files
138138
"""
139139
multipart: list[dict[str, Any]] = []
140140
for index, file in enumerate(files):

0 commit comments

Comments
 (0)