aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-05-23 21:44:30 -0400
committerRapptz <[email protected]>2020-05-23 21:44:30 -0400
commit66c6be50d8ac5d401a658c757c5f1ccb454c798b (patch)
treebc5079ddfca32f952417416f473283cda045017b
parentplayer: Close ffmpeg stdin during streaming (diff)
downloaddiscord.py-66c6be50d8ac5d401a658c757c5f1ccb454c798b.tar.xz
discord.py-66c6be50d8ac5d401a658c757c5f1ccb454c798b.zip
Prepare for the discord.com domain rename
-rw-r--r--README.ja.rst2
-rw-r--r--README.rst2
-rw-r--r--discord/client.py2
-rw-r--r--discord/embeds.py2
-rw-r--r--discord/ext/commands/converter.py2
-rw-r--r--discord/http.py2
-rw-r--r--discord/message.py2
-rw-r--r--discord/raw_models.py2
-rw-r--r--discord/utils.py2
-rw-r--r--discord/webhook.py6
-rw-r--r--discord/widget.py2
-rw-r--r--docs/api.rst2
-rw-r--r--docs/discord.rst10
-rw-r--r--docs/locale/ja/LC_MESSAGES/api.po14
-rw-r--r--docs/locale/ja/LC_MESSAGES/discord.po12
-rw-r--r--docs/locale/ja/LC_MESSAGES/ext/commands/api.po2
16 files changed, 33 insertions, 33 deletions
diff --git a/README.ja.rst b/README.ja.rst
index f289c5fd..258a3e03 100644
--- a/README.ja.rst
+++ b/README.ja.rst
@@ -1,7 +1,7 @@
discord.py
==========
-.. image:: https://discordapp.com/api/guilds/336642139381301249/embed.png
+.. image:: https://discord.com/api/guilds/336642139381301249/embed.png
:target: https://discord.gg/nXzj3dg
:alt: Discordサーバーの招待
.. image:: https://img.shields.io/pypi/v/discord.py.svg
diff --git a/README.rst b/README.rst
index e645b553..6ec34aa3 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
discord.py
==========
-.. image:: https://discordapp.com/api/guilds/336642139381301249/embed.png
+.. image:: https://discord.com/api/guilds/336642139381301249/embed.png
:target: https://discord.gg/r3sSKJJ
:alt: Discord server invite
.. image:: https://img.shields.io/pypi/v/discord.py.svg
diff --git a/discord/client.py b/discord/client.py
index 03845fd1..e6c12f68 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -406,7 +406,7 @@ class Client:
.. warning::
Logging on with a user token is against the Discord
- `Terms of Service <https://support.discordapp.com/hc/en-us/articles/115002192352>`_
+ `Terms of Service <https://support.discord.com/hc/en-us/articles/115002192352>`_
and doing so might potentially get your account banned.
Use this at your own risk.
diff --git a/discord/embeds.py b/discord/embeds.py
index 75c53da1..8acf1e32 100644
--- a/discord/embeds.py
+++ b/discord/embeds.py
@@ -130,7 +130,7 @@ class Embed:
You can find out about this format in the `official Discord documentation`__.
- .. _DiscordDocs: https://discordapp.com/developers/docs/resources/channel#embed-object
+ .. _DiscordDocs: https://discord.com/developers/docs/resources/channel#embed-object
__ DiscordDocs_
diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py
index 93137cad..3d706bf8 100644
--- a/discord/ext/commands/converter.py
+++ b/discord/ext/commands/converter.py
@@ -194,7 +194,7 @@ class MessageConverter(Converter):
async def convert(self, ctx, argument):
id_regex = re.compile(r'^(?:(?P<channel_id>[0-9]{15,21})-)?(?P<message_id>[0-9]{15,21})$')
link_regex = re.compile(
- r'^https?://(?:(ptb|canary)\.)?discordapp\.com/channels/'
+ r'^https?://(?:(ptb|canary)\.)?discord(?:app)?\.com/channels/'
r'(?:([0-9]{15,21})|(@me))'
r'/(?P<channel_id>[0-9]{15,21})/(?P<message_id>[0-9]{15,21})/?$'
)
diff --git a/discord/http.py b/discord/http.py
index 7f249640..d022286f 100644
--- a/discord/http.py
+++ b/discord/http.py
@@ -50,7 +50,7 @@ async def json_or_text(response):
return text
class Route:
- BASE = 'https://discordapp.com/api/v7'
+ BASE = 'https://discord.com/api/v7'
def __init__(self, method, path, **parameters):
self.path = path
diff --git a/discord/message.py b/discord/message.py
index 51c7005c..87d0c973 100644
--- a/discord/message.py
+++ b/discord/message.py
@@ -620,7 +620,7 @@ class Message:
def jump_url(self):
""":class:`str`: Returns a URL that allows the client to jump to this message."""
guild_id = getattr(self.guild, 'id', '@me')
- return 'https://discordapp.com/channels/{0}/{1.channel.id}/{1.id}'.format(guild_id, self)
+ return 'https://discord.com/channels/{0}/{1.channel.id}/{1.id}'.format(guild_id, self)
def is_system(self):
""":class:`bool`: Whether the message is a system message.
diff --git a/discord/raw_models.py b/discord/raw_models.py
index d9ce84cd..79bf8245 100644
--- a/discord/raw_models.py
+++ b/discord/raw_models.py
@@ -95,7 +95,7 @@ class RawMessageUpdateEvent(_RawReprMixin):
.. versionadded:: 1.3
data: :class:`dict`
- The raw data given by the `gateway <https://discordapp.com/developers/docs/topics/gateway#message-update>`_
+ The raw data given by the `gateway <https://discord.com/developers/docs/topics/gateway#message-update>`_
cached_message: Optional[:class:`Message`]
The cached message, if found in the internal message cache.
"""
diff --git a/discord/utils.py b/discord/utils.py
index 46f35bdb..c9ba2f38 100644
--- a/discord/utils.py
+++ b/discord/utils.py
@@ -144,7 +144,7 @@ def oauth_url(client_id, permissions=None, guild=None, redirect_uri=None):
redirect_uri: :class:`str`
An optional valid redirect URI.
"""
- url = 'https://discordapp.com/oauth2/authorize?client_id={}&scope=bot'.format(client_id)
+ url = 'https://discord.com/oauth2/authorize?client_id={}&scope=bot'.format(client_id)
if permissions is not None:
url = url + '&permissions=' + str(permissions.value)
if guild is not None:
diff --git a/discord/webhook.py b/discord/webhook.py
index c4fc9734..a45d27e0 100644
--- a/discord/webhook.py
+++ b/discord/webhook.py
@@ -53,7 +53,7 @@ class WebhookAdapter:
The webhook that owns this adapter.
"""
- BASE = 'https://discordapp.com/api/v7'
+ BASE = 'https://discord.com/api/v7'
def _prepare(self, webhook):
self._webhook_id = webhook.id
@@ -454,7 +454,7 @@ class Webhook:
@property
def url(self):
"""Returns the webhook's url."""
- return 'https://discordapp.com/api/webhooks/{}/{}'.format(self.id, self.token)
+ return 'https://discord.com/api/webhooks/{}/{}'.format(self.id, self.token)
@classmethod
def partial(cls, id, token, *, adapter):
@@ -504,7 +504,7 @@ class Webhook:
The URL is invalid.
"""
- m = re.search(r'discordapp.com/api/webhooks/(?P<id>[0-9]{17,21})/(?P<token>[A-Za-z0-9\.\-\_]{60,68})', url)
+ m = re.search(r'discord(?:app)?.com/api/webhooks/(?P<id>[0-9]{17,21})/(?P<token>[A-Za-z0-9\.\-\_]{60,68})', url)
if m is None:
raise InvalidArgument('Invalid webhook URL given.')
data = m.groupdict()
diff --git a/discord/widget.py b/discord/widget.py
index 662afca9..11037fbb 100644
--- a/discord/widget.py
+++ b/discord/widget.py
@@ -226,7 +226,7 @@ class Widget:
@property
def json_url(self):
""":class:`str`: The JSON URL of the widget."""
- return "https://discordapp.com/api/guilds/{0.id}/widget.json".format(self)
+ return "https://discord.com/api/guilds/{0.id}/widget.json".format(self)
@property
def invite_url(self):
diff --git a/docs/api.rst b/docs/api.rst
index 6448ab41..6a1b6614 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -328,7 +328,7 @@ to handle it, which defaults to print a traceback and ignoring the exception.
it can be accessed via :attr:`RawMessageUpdateEvent.cached_message`
Due to the inherently raw nature of this event, the data parameter coincides with
- the raw data given by the `gateway <https://discordapp.com/developers/docs/topics/gateway#message-update>`_.
+ the raw data given by the `gateway <https://discord.com/developers/docs/topics/gateway#message-update>`_.
Since the data payload can be partial, care must be taken when accessing stuff in the dictionary.
One example of a common case of partial data is when the ``'content'`` key is inaccessible. This
diff --git a/docs/discord.rst b/docs/discord.rst
index 80dc7e6f..9c9b72c2 100644
--- a/docs/discord.rst
+++ b/docs/discord.rst
@@ -7,8 +7,8 @@ In order to work with the library and the Discord API in general, we must first
Creating a Bot account is a pretty straightforward process.
-1. Make sure you're logged on to the `Discord website <https://discordapp.com>`_.
-2. Navigate to the `application page <https://discordapp.com/developers/applications>`_
+1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
+2. Navigate to the `application page <https://discord.com/developers/applications>`_
3. Click on the "New Application" button.
.. image:: /images/discord_create_app_button.png
@@ -61,8 +61,8 @@ So you've made a Bot User but it's not actually in any server.
If you want to invite your bot you must create an invite URL for it.
-1. Make sure you're logged on to the `Discord website <https://discordapp.com>`_.
-2. Navigate to the `application page <https://discordapp.com/developers/applications>`_
+1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
+2. Navigate to the `application page <https://discord.com/developers/applications>`_
3. Click on your bot's page.
4. Go to the "OAuth2" tab.
@@ -78,7 +78,7 @@ If you want to invite your bot you must create an invite URL for it.
- Please be aware of the consequences of requiring your bot to have the "Administrator" permission.
- - Bot owners must have 2FA enabled for certain actions and permissions when added in servers that have Server-Wide 2FA enabled. Check the `2FA support page <https://support.discordapp.com/hc/en-us/articles/219576828-Setting-up-Two-Factor-Authentication>`_ for more information.
+ - Bot owners must have 2FA enabled for certain actions and permissions when added in servers that have Server-Wide 2FA enabled. Check the `2FA support page <https://support.discord.com/hc/en-us/articles/219576828-Setting-up-Two-Factor-Authentication>`_ for more information.
.. image:: /images/discord_oauth2_perms.png
:alt: The permission checkboxes with some permissions checked.
diff --git a/docs/locale/ja/LC_MESSAGES/api.po b/docs/locale/ja/LC_MESSAGES/api.po
index cf1445eb..1ccdb168 100644
--- a/docs/locale/ja/LC_MESSAGES/api.po
+++ b/docs/locale/ja/LC_MESSAGES/api.po
@@ -639,11 +639,11 @@ msgstr "この関数は、異なる二通りの方法で使用することがで
#: discord.Client.login:9 of
msgid ""
"Logging on with a user token is against the Discord `Terms of Service "
-"<https://support.discordapp.com/hc/en-us/articles/115002192352>`_ and "
+"<https://support.discord.com/hc/en-us/articles/115002192352>`_ and "
"doing so might potentially get your account banned. Use this at your own "
"risk."
msgstr ""
-"ユーザートークンを用いてのログインはDiscordの `利用規約 <https://support.discordapp.com/hc/en-"
+"ユーザートークンを用いてのログインはDiscordの `利用規約 <https://support.discord.com/hc/en-"
"us/articles/115002192352>`_ に違反しているため、アカウントを停止される可能性があります。自己責任で使用してください。"
#: discord.Client.login:14 of
@@ -2624,10 +2624,10 @@ msgstr ""
msgid ""
"Due to the inherently raw nature of this event, the data parameter "
"coincides with the raw data given by the `gateway "
-"<https://discordapp.com/developers/docs/topics/gateway#message-update>`_."
+"<https://discord.com/developers/docs/topics/gateway#message-update>`_."
msgstr ""
"このイベントの性質は、本質的に生表現のため、データのパラメータは `ゲートウェイ "
-"<https://discordapp.com/developers/docs/topics/gateway#message-update>`_ "
+"<https://discord.com/developers/docs/topics/gateway#message-update>`_ "
"によって与えられた生データと一致します。"
#: ../../api.rst:317
@@ -11472,10 +11472,10 @@ msgstr "Banが解除されたユーザー。"
#, fuzzy
msgid ""
"The raw data given by the `gateway "
-"<https://discordapp.com/developers/docs/topics/gateway#message-update>`_"
+"<https://discord.com/developers/docs/topics/gateway#message-update>`_"
msgstr ""
"このイベントの性質は、本質的に生表現のため、データのパラメータは `ゲートウェイ "
-"<https://discordapp.com/developers/docs/topics/gateway#message-update>`_ "
+"<https://discord.com/developers/docs/topics/gateway#message-update>`_ "
"によって与えられた生データと一致します。"
#: ../../api.rst:2284
@@ -15035,7 +15035,7 @@ msgstr ""
#~ msgid ""
#~ ":class:`dict` -- The raw data given "
#~ "by the `gateway "
-#~ "<https://discordapp.com/developers/docs/topics/gateway#message-"
+#~ "<https://discord.com/developers/docs/topics/gateway#message-"
#~ "update>`_"
#~ msgstr ""
diff --git a/docs/locale/ja/LC_MESSAGES/discord.po b/docs/locale/ja/LC_MESSAGES/discord.po
index e8b31063..77d07c1b 100644
--- a/docs/locale/ja/LC_MESSAGES/discord.po
+++ b/docs/locale/ja/LC_MESSAGES/discord.po
@@ -30,13 +30,13 @@ msgstr "Botのアカウント作成はとても簡単です。"
#: ../../discord.rst:10
#: ../../discord.rst:64
-msgid "Make sure you're logged on to the `Discord website <https://discordapp.com>`_."
-msgstr "まずは `Discordのウェブサイト <https://discordapp.com>`_ にログインしてください。"
+msgid "Make sure you're logged on to the `Discord website <https://discord.com>`_."
+msgstr "まずは `Discordのウェブサイト <https://discord.com>`_ にログインしてください。"
#: ../../discord.rst:11
#: ../../discord.rst:65
-msgid "Navigate to the `application page <https://discordapp.com/developers/applications>`_"
-msgstr "`アプリケーションページ <https://discordapp.com/developers/applications>`_ に移動します。"
+msgid "Navigate to the `application page <https://discord.com/developers/applications>`_"
+msgstr "`アプリケーションページ <https://discord.com/developers/applications>`_ に移動します。"
#: ../../discord.rst:12
msgid "Click on the \"New Application\" button."
@@ -119,8 +119,8 @@ msgid "Please be aware of the consequences of requiring your bot to have the \"A
msgstr "Botに「管理者」権限を要求させることによる影響は認識しておきましょう。"
#: ../../discord.rst:81
-msgid "Bot owners must have 2FA enabled for certain actions and permissions when added in servers that have Server-Wide 2FA enabled. Check the `2FA support page <https://support.discordapp.com/hc/en-us/articles/219576828-Setting-up-Two-Factor-Authentication>`_ for more information."
-msgstr "二段階認証が有効になっているサーバーにBotが追加された場合、Botの所有者は特定の動作と権限のために二段階認証を有効化させなければいけません。詳細は `二段階認証のサポートページ <https://support.discordapp.com/hc/en-us/articles/219576828-Setting-up-Two-Factor-Authentication>`_ を参照してください。"
+msgid "Bot owners must have 2FA enabled for certain actions and permissions when added in servers that have Server-Wide 2FA enabled. Check the `2FA support page <https://support.discord.com/hc/en-us/articles/219576828-Setting-up-Two-Factor-Authentication>`_ for more information."
+msgstr "二段階認証が有効になっているサーバーにBotが追加された場合、Botの所有者は特定の動作と権限のために二段階認証を有効化させなければいけません。詳細は `二段階認証のサポートページ <https://support.discord.com/hc/en-us/articles/219576828-Setting-up-Two-Factor-Authentication>`_ を参照してください。"
#: ../../discord.rst:86
msgid "Now the resulting URL can be used to add your bot to a server. Copy and paste the URL into your browser, choose a server to invite the bot to, and click \"Authorize\"."
diff --git a/docs/locale/ja/LC_MESSAGES/ext/commands/api.po b/docs/locale/ja/LC_MESSAGES/ext/commands/api.po
index 8f491a48..53539d5f 100644
--- a/docs/locale/ja/LC_MESSAGES/ext/commands/api.po
+++ b/docs/locale/ja/LC_MESSAGES/ext/commands/api.po
@@ -1525,7 +1525,7 @@ msgstr ""
#: discord.ext.commands.Bot.login:9 of
msgid ""
"Logging on with a user token is against the Discord `Terms of Service "
-"<https://support.discordapp.com/hc/en-us/articles/115002192352>`_ and "
+"<https://support.discord.com/hc/en-us/articles/115002192352>`_ and "
"doing so might potentially get your account banned. Use this at your own "
"risk."
msgstr ""