diff --git a/README.ja.rst b/README.ja.rst index f289c5fdf..258a3e032 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 e645b5535..6ec34aa30 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 03845fd15..e6c12f68a 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 `_ + `Terms of Service `_ 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 75c53da16..8acf1e32f 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 93137cad0..3d706bf80 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[0-9]{15,21})-)?(?P[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[0-9]{15,21})/(?P[0-9]{15,21})/?$' ) diff --git a/discord/http.py b/discord/http.py index 7f2496400..d022286f3 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 51c7005cd..87d0c9730 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 d9ce84cdc..79bf8245b 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 `_ + The raw data given by the `gateway `_ 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 46f35bdb2..c9ba2f388 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 c4fc9734f..a45d27e03 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[0-9]{17,21})/(?P[A-Za-z0-9\.\-\_]{60,68})', url) + m = re.search(r'discord(?:app)?.com/api/webhooks/(?P[0-9]{17,21})/(?P[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 662afca94..11037fbb5 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 6448ab418..6a1b66141 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 `_. + the raw data given by the `gateway `_. 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 80dc7e6f7..9c9b72c24 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 `_. -2. Navigate to the `application page `_ +1. Make sure you're logged on to the `Discord website `_. +2. Navigate to the `application page `_ 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 `_. -2. Navigate to the `application page `_ +1. Make sure you're logged on to the `Discord website `_. +2. Navigate to the `application page `_ 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 `_ 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 `_ 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 cf1445ebb..1ccdb1685 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 " -"`_ and " +"`_ and " "doing so might potentially get your account banned. Use this at your own " "risk." msgstr "" -"ユーザートークンを用いてのログインはDiscordの `利用規約 `_ に違反しているため、アカウントを停止される可能性があります。自己責任で使用してください。" #: 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 " -"`_." +"`_." msgstr "" "このイベントの性質は、本質的に生表現のため、データのパラメータは `ゲートウェイ " -"`_ " +"`_ " "によって与えられた生データと一致します。" #: ../../api.rst:317 @@ -11472,10 +11472,10 @@ msgstr "Banが解除されたユーザー。" #, fuzzy msgid "" "The raw data given by the `gateway " -"`_" +"`_" msgstr "" "このイベントの性質は、本質的に生表現のため、データのパラメータは `ゲートウェイ " -"`_ " +"`_ " "によって与えられた生データと一致します。" #: ../../api.rst:2284 @@ -15035,7 +15035,7 @@ msgstr "" #~ msgid "" #~ ":class:`dict` -- The raw data given " #~ "by the `gateway " -#~ "`_" #~ msgstr "" diff --git a/docs/locale/ja/LC_MESSAGES/discord.po b/docs/locale/ja/LC_MESSAGES/discord.po index e8b310635..77d07c1b4 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 `_." -msgstr "まずは `Discordのウェブサイト `_ にログインしてください。" +msgid "Make sure you're logged on to the `Discord website `_." +msgstr "まずは `Discordのウェブサイト `_ にログインしてください。" #: ../../discord.rst:11 #: ../../discord.rst:65 -msgid "Navigate to the `application page `_" -msgstr "`アプリケーションページ `_ に移動します。" +msgid "Navigate to the `application page `_" +msgstr "`アプリケーションページ `_ に移動します。" #: ../../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 `_ for more information." -msgstr "二段階認証が有効になっているサーバーにBotが追加された場合、Botの所有者は特定の動作と権限のために二段階認証を有効化させなければいけません。詳細は `二段階認証のサポートページ `_ を参照してください。" +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 `_ for more information." +msgstr "二段階認証が有効になっているサーバーにBotが追加された場合、Botの所有者は特定の動作と権限のために二段階認証を有効化させなければいけません。詳細は `二段階認証のサポートページ `_ を参照してください。" #: ../../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 8f491a481..53539d5f5 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 " -"`_ and " +"`_ and " "doing so might potentially get your account banned. Use this at your own " "risk." msgstr ""