remove JA docs / README.ja.rst
This commit is contained in:
parent
45d498c1b7
commit
96ac8c1a4f
113
README.ja.rst
113
README.ja.rst
@ -1,113 +0,0 @@
|
||||
discord.py
|
||||
==========
|
||||
|
||||
.. 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
|
||||
:target: https://pypi.python.org/pypi/discord.py
|
||||
:alt: PyPIのバージョン情報
|
||||
.. image:: https://img.shields.io/pypi/pyversions/discord.py.svg
|
||||
:target: https://pypi.python.org/pypi/discord.py
|
||||
:alt: PyPIのサポートしているPythonのバージョン
|
||||
|
||||
discord.py は機能豊富かつモダンで使いやすい、非同期処理にも対応したDiscord用のAPIラッパーです。
|
||||
|
||||
主な特徴
|
||||
-------------
|
||||
|
||||
- ``async`` と ``await`` を使ったモダンなPythonらしいAPI。
|
||||
- 適切なレート制限処理
|
||||
- メモリと速度の両方を最適化。
|
||||
|
||||
インストール
|
||||
-------------
|
||||
|
||||
**Python 3.8 以降のバージョンが必須です**
|
||||
|
||||
完全な音声サポートなしでライブラリをインストールする場合は次のコマンドを実行してください:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
# Linux/OS X
|
||||
python3 -m pip install -U discord.py
|
||||
|
||||
# Windows
|
||||
py -3 -m pip install -U discord.py
|
||||
|
||||
音声サポートが必要なら、次のコマンドを実行しましょう:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
# Linux/OS X
|
||||
python3 -m pip install -U discord.py[voice]
|
||||
|
||||
# Windows
|
||||
py -3 -m pip install -U discord.py[voice]
|
||||
|
||||
|
||||
開発版をインストールしたいのならば、次の手順に従ってください:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
$ git clone https://github.com/Rapptz/discord.py
|
||||
$ cd discord.py
|
||||
$ python3 -m pip install -U .[voice]
|
||||
|
||||
|
||||
オプションパッケージ
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* PyNaCl (音声サポート用)
|
||||
|
||||
Linuxで音声サポートを導入するには、前述のコマンドを実行する前にお気に入りのパッケージマネージャー(例えば ``apt`` や ``dnf`` など)を使って以下のパッケージをインストールする必要があります:
|
||||
|
||||
* libffi-dev (システムによっては ``libffi-devel``)
|
||||
* python-dev (例えばPython 3.6用の ``python3.6-dev``)
|
||||
|
||||
簡単な例
|
||||
--------------
|
||||
|
||||
.. code:: py
|
||||
|
||||
import discord
|
||||
|
||||
class MyClient(discord.Client):
|
||||
async def on_ready(self):
|
||||
print('Logged on as', self.user)
|
||||
|
||||
async def on_message(self, message):
|
||||
# don't respond to ourselves
|
||||
if message.author == self.user:
|
||||
return
|
||||
|
||||
if message.content == 'ping':
|
||||
await message.channel.send('pong')
|
||||
|
||||
client = MyClient()
|
||||
client.run('token')
|
||||
|
||||
Botの例
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. code:: py
|
||||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
bot = commands.Bot(command_prefix='>')
|
||||
|
||||
@bot.command()
|
||||
async def ping(ctx):
|
||||
await ctx.send('pong')
|
||||
|
||||
bot.run('token')
|
||||
|
||||
examplesディレクトリに更に多くのサンプルがあります。
|
||||
|
||||
リンク
|
||||
------
|
||||
|
||||
- `ドキュメント <https://discordpy.readthedocs.io/ja/latest/index.html>`_
|
||||
- `公式Discordサーバー <https://discord.gg/nXzj3dg>`_
|
||||
- `Discord API <https://discord.gg/discord-api>`_
|
File diff suppressed because it is too large
Load Diff
@ -1,179 +0,0 @@
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-10-23 22:41-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language: ja_JP\n"
|
||||
"Language-Team: Japanese\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
|
||||
#: ../../discord.rst:4
|
||||
msgid "Creating a Bot Account"
|
||||
msgstr "Botアカウント作成"
|
||||
|
||||
#: ../../discord.rst:6
|
||||
msgid ""
|
||||
"In order to work with the library and the Discord API in general, we must"
|
||||
" first create a Discord Bot account."
|
||||
msgstr "ライブラリとDiscord APIを使用するには、BotのDiscordアカウントを用意する必要があります。"
|
||||
|
||||
#: ../../discord.rst:8
|
||||
msgid "Creating a Bot account is a pretty straightforward process."
|
||||
msgstr "Botのアカウント作成はとても簡単です。"
|
||||
|
||||
#: ../../discord.rst:10 ../../discord.rst:64
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Make sure you're logged on to the `Discord website "
|
||||
"<https://discord.com>`_."
|
||||
msgstr "まずは `Discordのウェブサイト <https://discordapp.com>`_ にログインしてください。"
|
||||
|
||||
#: ../../discord.rst:11 ../../discord.rst:65
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Navigate to the `application page "
|
||||
"<https://discord.com/developers/applications>`_"
|
||||
msgstr "`アプリケーションページ <https://discordapp.com/developers/applications>`_ に移動します。"
|
||||
|
||||
#: ../../discord.rst:12
|
||||
msgid "Click on the \"New Application\" button."
|
||||
msgstr "「New Application」ボタンをクリックします。"
|
||||
|
||||
#: ../../discord.rst:17
|
||||
msgid "Give the application a name and click \"Create\"."
|
||||
msgstr "アプリケーションの名前を決めて、「Create」をクリックします。"
|
||||
|
||||
#: ../../discord.rst:22
|
||||
msgid ""
|
||||
"Create a Bot User by navigating to the \"Bot\" tab and clicking \"Add "
|
||||
"Bot\"."
|
||||
msgstr "「Bot」タブへ移動し、「Add Bot」をクリックしてBotユーザーを作成します。"
|
||||
|
||||
#: ../../discord.rst:24
|
||||
msgid "Click \"Yes, do it!\" to continue."
|
||||
msgstr "「Yes, do it!」をクリックして続行します。"
|
||||
|
||||
#: ../../discord.rst:28
|
||||
msgid ""
|
||||
"Make sure that **Public Bot** is ticked if you want others to invite your"
|
||||
" bot."
|
||||
msgstr "他人にBotの招待を許可する場合には、 **Public Bot** にチェックを入れてください。"
|
||||
|
||||
#: ../../discord.rst:30
|
||||
msgid ""
|
||||
"You should also make sure that **Require OAuth2 Code Grant** is unchecked"
|
||||
" unless you are developing a service that needs it. If you're unsure, "
|
||||
"then **leave it unchecked**."
|
||||
msgstr ""
|
||||
"また、必要なサービスを開発している場合を除いて、 **Require OAuth2 Code Grant** "
|
||||
"がオフになっていることを確認する必要があります。わからない場合は **チェックを外してください** 。"
|
||||
|
||||
#: ../../discord.rst:36
|
||||
msgid "Copy the token using the \"Copy\" button."
|
||||
msgstr "「Copy」ボタンを使ってトークンをコピーします。"
|
||||
|
||||
#: ../../discord.rst:38
|
||||
msgid "**This is not the Client Secret at the General Information page**"
|
||||
msgstr "**General InformationページのClient Secretではないので注意してください**"
|
||||
|
||||
#: ../../discord.rst:42
|
||||
msgid ""
|
||||
"It should be worth noting that this token is essentially your bot's "
|
||||
"password. You should **never** share this to someone else. In doing so, "
|
||||
"someone can log in to your bot and do malicious things, such as leaving "
|
||||
"servers, ban all members inside a server, or pinging everyone "
|
||||
"maliciously."
|
||||
msgstr "このトークンは、あなたのBotのパスワードと同義であることを覚えておきましょう。誰か他の人とトークンを共有することは絶対に避けてください。トークンがあれば、誰かがあなたのBotにログインし、サーバーから退出したり、サーバー内のすべてのメンバーをBANしたり、すべての人にメンションを送るなどといった悪質な行為を行える様になってしまいます。"
|
||||
|
||||
#: ../../discord.rst:47
|
||||
msgid "The possibilities are endless, so **do not share this token.**"
|
||||
msgstr "可能性は無限にあるので、絶対に **トークンを共有しないでください** 。"
|
||||
|
||||
#: ../../discord.rst:49
|
||||
msgid ""
|
||||
"If you accidentally leaked your token, click the \"Regenerate\" button as"
|
||||
" soon as possible. This revokes your old token and re-generates a new "
|
||||
"one. Now you need to use the new token to login."
|
||||
msgstr "誤ってトークンを流出させてしまった場合、可能な限り速急に「Regenerate」ボタンをクリックしましょう。これによって古いトークンが無効になり、新しいトークンが再生成されます。今度からは新しいトークンを利用してログインを行う必要があります。"
|
||||
|
||||
#: ../../discord.rst:53
|
||||
msgid ""
|
||||
"And that's it. You now have a bot account and you can login with that "
|
||||
"token."
|
||||
msgstr "以上です。 これでボットアカウントが作成され、そのトークンでログインできます。"
|
||||
|
||||
#: ../../discord.rst:58
|
||||
msgid "Inviting Your Bot"
|
||||
msgstr "Botを招待する"
|
||||
|
||||
#: ../../discord.rst:60
|
||||
msgid "So you've made a Bot User but it's not actually in any server."
|
||||
msgstr "Botのユーザーを作成しましたが、現時点ではどのサーバーにも参加していない状態です。"
|
||||
|
||||
#: ../../discord.rst:62
|
||||
msgid "If you want to invite your bot you must create an invite URL for it."
|
||||
msgstr "Botを招待したい場合は、そのための招待URLを作成する必要があります。"
|
||||
|
||||
#: ../../discord.rst:66
|
||||
msgid "Click on your bot's page."
|
||||
msgstr "Botのページを開きます。"
|
||||
|
||||
#: ../../discord.rst:67
|
||||
msgid "Go to the \"OAuth2\" tab."
|
||||
msgstr "「OAuth2」タブへ移動します。"
|
||||
|
||||
#: ../../discord.rst:72
|
||||
msgid "Tick the \"bot\" checkbox under \"scopes\"."
|
||||
msgstr "「scopes」下にある「bot」チェックボックスを選択してください。"
|
||||
|
||||
#: ../../discord.rst:77
|
||||
msgid ""
|
||||
"Tick the permissions required for your bot to function under \"Bot "
|
||||
"Permissions\"."
|
||||
msgstr "「Bot Permissions」からBotの機能に必要な権限を選択してください。"
|
||||
|
||||
#: ../../discord.rst:79
|
||||
msgid ""
|
||||
"Please be aware of the consequences of requiring your bot to have the "
|
||||
"\"Administrator\" permission."
|
||||
msgstr "Botに「管理者」権限を要求させることによる影響は認識しておきましょう。"
|
||||
|
||||
#: ../../discord.rst:81
|
||||
#, fuzzy
|
||||
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.discordapp.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\"."
|
||||
msgstr "結果的に生成されたURLを使ってBotをサーバーに追加することができます。URLをコピーしてブラウザに貼り付け、Botを招待したいサーバーを選択した後、「認証」をクリックしてください。"
|
||||
|
||||
#: ../../discord.rst:91
|
||||
msgid "The person adding the bot needs \"Manage Server\" permissions to do so."
|
||||
msgstr "Botを追加する人には「サーバー管理」権限が必要です。"
|
||||
|
||||
#: ../../discord.rst:93
|
||||
msgid ""
|
||||
"If you want to generate this URL dynamically at run-time inside your bot "
|
||||
"and using the :class:`discord.Permissions` interface, you can use "
|
||||
":func:`discord.utils.oauth_url`."
|
||||
msgstr ""
|
||||
"このURLを実行時に動的に生成したい場合は、 :class:`discord.Permissions` インターフェイスから "
|
||||
":func:`discord.utils.oauth_url` を使用できます。"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,179 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-22 09:35-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Japanese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Crowdin-Project: discordpy\n"
|
||||
"X-Crowdin-Project-ID: 362783\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: /ext/commands/cogs.pot\n"
|
||||
"X-Crowdin-File-ID: 60\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:6
|
||||
msgid "Cogs"
|
||||
msgstr "コグ"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:8
|
||||
msgid "There comes a point in your bot's development when you want to organize a collection of commands, listeners, and some state into one class. Cogs allow you to do just that."
|
||||
msgstr "Bot開発においてコマンドやリスナー、いくつかの状態を一つのクラスにまとめてしまいたい場合があるでしょう。コグはそれを実現したものです。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:10
|
||||
msgid "The gist:"
|
||||
msgstr "要旨:"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:12
|
||||
msgid "Each cog is a Python class that subclasses :class:`.commands.Cog`."
|
||||
msgstr "すべてのコグは :class:`.commands.Cog` を継承したPythonクラスです。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:13
|
||||
msgid "Every command is marked with the :func:`.commands.command` decorator."
|
||||
msgstr "すべてのコマンドは :func:`.commands.command` デコレータでデコレートされます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:14
|
||||
msgid "Every listener is marked with the :meth:`.commands.Cog.listener` decorator."
|
||||
msgstr "すべてのリスナーは :meth:`.commands.Cog.listener` デコレータでデコレートされます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:15
|
||||
msgid "Cogs are then registered with the :meth:`.Bot.add_cog` call."
|
||||
msgstr "コグは :meth:`.Bot.add_cog` を呼び出して登録します。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:16
|
||||
msgid "Cogs are subsequently removed with the :meth:`.Bot.remove_cog` call."
|
||||
msgstr "コグは :meth:`.Bot.remove_cog` の呼び出しで削除されます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:18
|
||||
msgid "It should be noted that cogs are typically used alongside with :ref:`ext_commands_extensions`."
|
||||
msgstr "コグは :ref:`ext_commands_extensions` とともに使用されるのが一般的であることを覚えておきましょう。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:21
|
||||
msgid "Quick Example"
|
||||
msgstr "簡単な例"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:23
|
||||
msgid "This example cog defines a ``Greetings`` category for your commands, with a single :ref:`command <ext_commands_commands>` named ``hello`` as well as a listener to listen to an :ref:`Event <discord-api-events>`."
|
||||
msgstr "この例で紹介するコグは ``hello`` という名前の :ref:`command <ext_commands_commands>` と、 :ref:`Event <discord-api-events>` をリッスンするリスナーを実装した ``Greetings`` という名前のコマンドカテゴリを定義しています。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:48
|
||||
msgid "A couple of technical notes to take into consideration:"
|
||||
msgstr "考慮すべき二つのテクニカルノート:"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:50
|
||||
msgid "All listeners must be explicitly marked via decorator, :meth:`~.commands.Cog.listener`."
|
||||
msgstr "すべてのリスナーは :meth:`~.commands.Cog.listener` で明示的にデコレートする必要があります。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:51
|
||||
msgid "The name of the cog is automatically derived from the class name but can be overridden. See :ref:`ext_commands_cogs_meta_options`."
|
||||
msgstr "コグの名前は、自動的にクラスの名前が引用されますが、上書きも可能です。 :ref:`ext_commands_cogs_meta_options` を参照してください。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:52
|
||||
msgid "All commands must now take a ``self`` parameter to allow usage of instance attributes that can be used to maintain state."
|
||||
msgstr "すべてのコマンドは状態を保持するインスタンスの属性を使用するために ``self`` パラメータを持つ必要があります。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:55
|
||||
msgid "Cog Registration"
|
||||
msgstr "コグの登録"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:57
|
||||
msgid "Once you have defined your cogs, you need to tell the bot to register the cogs to be used. We do this via the :meth:`~.commands.Bot.add_cog` method."
|
||||
msgstr "コグを定義したら、Botにコグを登録する処理が必要になります。 :meth:`~.commands.Bot.add_cog` メソッドを用いて登録ができます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:63
|
||||
msgid "This binds the cog to the bot, adding all commands and listeners to the bot automatically."
|
||||
msgstr "これはコグとBotを紐づけ、すべてのコマンドとリスナーを自動的にBotに追加します。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:65
|
||||
msgid "Note that we reference the cog by name, which we can override through :ref:`ext_commands_cogs_meta_options`. So if we ever want to remove the cog eventually, we would have to do the following."
|
||||
msgstr "コグを名前で参照している点に注意してください。これは :ref:`ext_commands_cogs_meta_options` でオーバーライドが可能です。そのため、最終的にコグを削除したい場合は、次の処理を行う必要があります。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:72
|
||||
msgid "Using Cogs"
|
||||
msgstr "コグの使用"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:74
|
||||
msgid "Just as we remove a cog by its name, we can also retrieve it by its name as well. This allows us to use a cog as an inter-command communication protocol to share data. For example:"
|
||||
msgstr "コグを名前で削除するのと同様に、名前でコグを検索することもできます。これによってコグをデータ共有のためのコマンド間通信プロトコルとして使うことができます。例えば:"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:109
|
||||
msgid "Special Methods"
|
||||
msgstr "特殊なメソッド"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:111
|
||||
msgid "As cogs get more complicated and have more commands, there comes a point where we want to customise the behaviour of the entire cog or bot."
|
||||
msgstr "コグが複雑化し、多くのコマンドを持つようになるにつれ、コグあるいはBot全体の挙動をカスタマイズしたくなることがあります。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:113
|
||||
msgid "They are as follows:"
|
||||
msgstr "そのための特殊なメソッドは以下のとおりです:"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:115
|
||||
msgid ":meth:`.Cog.cog_unload`"
|
||||
msgstr ":meth:`.Cog.cog_unload`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:116
|
||||
msgid ":meth:`.Cog.cog_check`"
|
||||
msgstr ":meth:`.Cog.cog_check`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:117
|
||||
msgid ":meth:`.Cog.cog_command_error`"
|
||||
msgstr ":meth:`.Cog.cog_command_error`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:118
|
||||
msgid ":meth:`.Cog.cog_before_invoke`"
|
||||
msgstr ":meth:`.Cog.cog_before_invoke`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:119
|
||||
msgid ":meth:`.Cog.cog_after_invoke`"
|
||||
msgstr ":meth:`.Cog.cog_after_invoke`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:120
|
||||
msgid ":meth:`.Cog.bot_check`"
|
||||
msgstr ":meth:`.Cog.bot_check`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:121
|
||||
msgid ":meth:`.Cog.bot_check_once`"
|
||||
msgstr ":meth:`.Cog.bot_check_once`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:123
|
||||
msgid "You can visit the reference to get more detail."
|
||||
msgstr "詳細はリファレンスを参照してください。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:128
|
||||
msgid "Meta Options"
|
||||
msgstr "メタオプション"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:130
|
||||
msgid "At the heart of a cog resides a metaclass, :class:`.commands.CogMeta`, which can take various options to customise some of the behaviour. To do this, we pass keyword arguments to the class definition line. For example, to change the cog name we can pass the ``name`` keyword argument as follows:"
|
||||
msgstr "コグの中核にはメタクラスである :class:`.commands.CogMeta` が存在します。これにはいくつかの挙動を変更ができる様々なオプションが用意されています。オプションを使用する際はキーワード引数をクラス定義の行で渡します。例えば、コグの名前を変更する場合はキーワード引数 ``name`` を次のように渡します。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:137
|
||||
msgid "To see more options that you can set, see the documentation of :class:`.commands.CogMeta`."
|
||||
msgstr "設定可能な他のオプションについては :class:`.commands.CogMeta` のドキュメントを参照してください。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:140
|
||||
msgid "Inspection"
|
||||
msgstr "インスペクション"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:142
|
||||
msgid "Since cogs ultimately are classes, we have some tools to help us inspect certain properties of the cog."
|
||||
msgstr "コグは究極的にはクラスのため、コグの特定のプロパティを調べるのに役立つツールがいくつか用意されています。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:145
|
||||
msgid "To get a :class:`list` of commands, we can use :meth:`.Cog.get_commands`. ::"
|
||||
msgstr ":meth:`.Cog.get_commands` を使うことで、コマンドの :class:`list` を取得できます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:151
|
||||
msgid "If we want to get the subcommands as well, we can use the :meth:`.Cog.walk_commands` generator. ::"
|
||||
msgstr "サブコマンドを取得したい場合は :meth:`.Cog.walk_commands` ジェネレータを使うことができます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:155
|
||||
msgid "To do the same with listeners, we can query them with :meth:`.Cog.get_listeners`. This returns a list of tuples -- the first element being the listener name and the second one being the actual function itself. ::"
|
||||
msgstr "これ同様の処理をリスナーで行う場合は、 :meth:`.Cog.get_listeners` が使用できます。これはタプルのリストを返します -- 最初の要素がリスナーの名前で、二つ目の要素が関数そのものです。"
|
||||
|
@ -1,901 +0,0 @@
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-10-23 22:41-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language: ja_JP\n"
|
||||
"Language-Team: Japanese\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
|
||||
#: ../../ext/commands/commands.rst:6
|
||||
msgid "Commands"
|
||||
msgstr "コマンド"
|
||||
|
||||
#: ../../ext/commands/commands.rst:8
|
||||
msgid ""
|
||||
"One of the most appealing aspect of the command extension is how easy it "
|
||||
"is to define commands and how you can arbitrarily nest groups and "
|
||||
"commands to have a rich sub-command system."
|
||||
msgstr "コマンド拡張の最も魅力的な機能の一つは、簡単にコマンドが定義でき、かつそのコマンドを好きなようにネスト状にして、豊富なサブコマンドを用意することができる点です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:11
|
||||
msgid ""
|
||||
"Commands are defined by attaching it to a regular Python function. The "
|
||||
"command is then invoked by the user using a similar signature to the "
|
||||
"Python function."
|
||||
msgstr "コマンドは、Pythonの関数と関連付けすることによって定義され、同様のシグネチャを使用してユーザーに呼び出されます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:14
|
||||
msgid "For example, in the given command definition:"
|
||||
msgstr "例えば、指定されたコマンド定義を使うと次のようになります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:22
|
||||
msgid "With the following prefix (``$``), it would be invoked by the user via:"
|
||||
msgstr "Prefixを (``$``) としたとすると、このコマンドは次の用に実行できます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:28
|
||||
msgid ""
|
||||
"A command must always have at least one parameter, ``ctx``, which is the "
|
||||
":class:`.Context` as the first one."
|
||||
msgstr "コマンドには、少なくとも :class:`.Context` を渡すための引数 ``ctx`` が必要です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:30
|
||||
msgid ""
|
||||
"There are two ways of registering a command. The first one is by using "
|
||||
":meth:`.Bot.command` decorator, as seen in the example above. The second "
|
||||
"is using the :func:`~ext.commands.command` decorator followed by "
|
||||
":meth:`.Bot.add_command` on the instance."
|
||||
msgstr ""
|
||||
"コマンドを登録するには二通りの方法があります。一つ目は :meth:`.Bot.command` を使用する方法で、二つ目が "
|
||||
":func:`~ext.commands.command` デコレータを使用して :meth:`.Bot.add_command` "
|
||||
"でインスタンスにコマンドを追加していく方法です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:34
|
||||
msgid "Essentially, these two are equivalent: ::"
|
||||
msgstr "本質的に、これら2つは同等になります: ::"
|
||||
|
||||
#: ../../ext/commands/commands.rst:52
|
||||
msgid ""
|
||||
"Since the :meth:`.Bot.command` decorator is shorter and easier to "
|
||||
"comprehend, it will be the one used throughout the documentation here."
|
||||
msgstr ":meth:`.Bot.command` が簡単かつ理解がしやすいので、ドキュメント上ではこちらを使っています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:55
|
||||
msgid ""
|
||||
"Any parameter that is accepted by the :class:`.Command` constructor can "
|
||||
"be passed into the decorator. For example, to change the name to "
|
||||
"something other than the function would be as simple as doing this:"
|
||||
msgstr ""
|
||||
":class:`.Command` "
|
||||
"のコンストラクタの引数はデコレータに渡すことで利用できます。例えば、コマンドの名前を関数以外のものへと変更したい場合は以下のように簡単に設定することができます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:65
|
||||
msgid "Parameters"
|
||||
msgstr "パラメーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:67
|
||||
msgid ""
|
||||
"Since we define commands by making Python functions, we also define the "
|
||||
"argument passing behaviour by the function parameters."
|
||||
msgstr "Pythonの関数定義によって、同時にコマンドを定義するので、関数のパラメーターを設定することにより、コマンドの引数受け渡し動作も定義することができます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:70
|
||||
msgid ""
|
||||
"Certain parameter types do different things in the user side and most "
|
||||
"forms of parameter types are supported."
|
||||
msgstr "特定のパラメータタイプはユーザーサイドで異なる動作を行い、そしてほとんどの形式のパラメータタイプがサポートされています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:73
|
||||
msgid "Positional"
|
||||
msgstr "位置引数"
|
||||
|
||||
#: ../../ext/commands/commands.rst:75
|
||||
msgid ""
|
||||
"The most basic form of parameter passing is the positional parameter. "
|
||||
"This is where we pass a parameter as-is:"
|
||||
msgstr "最も基本的な引数は位置パラメーターです。与えられた値をそのまま渡します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:84
|
||||
msgid ""
|
||||
"On the bot using side, you can provide positional arguments by just "
|
||||
"passing a regular string:"
|
||||
msgstr "Botの使用者側は、通常の文字列を渡すだけで位置引数に値を渡すことができます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:88
|
||||
msgid "To make use of a word with spaces in between, you should quote it:"
|
||||
msgstr "間に空白を含む文字列を渡す場合は、文字列を引用符で囲む必要があります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:92
|
||||
msgid ""
|
||||
"As a note of warning, if you omit the quotes, you will only get the first"
|
||||
" word:"
|
||||
msgstr "引用符を用いなかった場合、最初の文字列のみが渡されます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:96
|
||||
msgid ""
|
||||
"Since positional arguments are just regular Python arguments, you can "
|
||||
"have as many as you want:"
|
||||
msgstr "位置引数は、Pythonの引数と同じものなので、好きなだけ設定することが可能です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:105
|
||||
msgid "Variable"
|
||||
msgstr "可変長引数"
|
||||
|
||||
#: ../../ext/commands/commands.rst:107
|
||||
msgid ""
|
||||
"Sometimes you want users to pass in an undetermined number of parameters."
|
||||
" The library supports this similar to how variable list parameters are "
|
||||
"done in Python:"
|
||||
msgstr "場合によっては、可変長のパラメーターを設定したい場合もあるでしょう。このライブラリはPythonの可変長パラメーターと同様にこれをサポートしています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:116
|
||||
msgid ""
|
||||
"This allows our user to accept either one or many arguments as they "
|
||||
"please. This works similar to positional arguments, so multi-word "
|
||||
"parameters should be quoted."
|
||||
msgstr "これによって一つ、あるいは複数の引数を受け取ることができます。ただし、引数を渡す際の挙動は位置引数と同様のため、複数の単語を含む文字列は引用符で囲む必要があります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:119
|
||||
msgid "For example, on the bot side:"
|
||||
msgstr "例えば、Bot側ではこのように動きます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:123
|
||||
msgid ""
|
||||
"If the user wants to input a multi-word argument, they have to quote it "
|
||||
"like earlier:"
|
||||
msgstr "複数単語の文字列を渡す際は、引用符で囲んでください。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:127
|
||||
msgid ""
|
||||
"Do note that similar to the Python function behaviour, a user can "
|
||||
"technically pass no arguments at all:"
|
||||
msgstr "Pythonの振る舞いと同様に、ユーザーは引数なしの状態を技術的に渡すことができます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:132
|
||||
msgid ""
|
||||
"Since the ``args`` variable is a :class:`py:tuple`, you can do anything "
|
||||
"you would usually do with one."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:136
|
||||
msgid "Keyword-Only Arguments"
|
||||
msgstr "キーワード引数"
|
||||
|
||||
#: ../../ext/commands/commands.rst:138
|
||||
msgid ""
|
||||
"When you want to handle parsing of the argument yourself or do not feel "
|
||||
"like you want to wrap multi-word user input into quotes, you can ask the "
|
||||
"library to give you the rest as a single argument. We do this by using a "
|
||||
"**keyword-only argument**, seen below:"
|
||||
msgstr "引数の構文解析を自分で行う場合や、複数単語の入力を引用符で囲む必要のないようにしたい場合は、渡された値を単一の引数として受け取るようにライブラリに求めることができます。以下のコードのようにキーワード引数のみを使用することでこれが可能になります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:150
|
||||
msgid "You can only have one keyword-only argument due to parsing ambiguities."
|
||||
msgstr "解析が曖昧になるため、一つのキーワードのみの引数しか扱えません。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:152
|
||||
msgid "On the bot side, we do not need to quote input with spaces:"
|
||||
msgstr "Bot側では、スペースを含む入力を引用符で囲む必要がありません:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:156
|
||||
msgid "Do keep in mind that wrapping it in quotes leaves it as-is:"
|
||||
msgstr "引用符で囲んだ場合、消えずに残るので注意してください:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:160
|
||||
msgid ""
|
||||
"By default, the keyword-only arguments are stripped of white space to "
|
||||
"make it easier to work with. This behaviour can be toggled by the "
|
||||
":attr:`.Command.rest_is_raw` argument in the decorator."
|
||||
msgstr ""
|
||||
"通常、キーワード引数は利便性のために空白文字で分割されます。この動作はデコレータの引数として "
|
||||
":attr:`.Command.rest_is_raw` を使うことで切り替えることが可能です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:166
|
||||
msgid "Invocation Context"
|
||||
msgstr "呼び出しコンテクスト"
|
||||
|
||||
#: ../../ext/commands/commands.rst:168
|
||||
msgid ""
|
||||
"As seen earlier, every command must take at least a single parameter, "
|
||||
"called the :class:`~ext.commands.Context`."
|
||||
msgstr "前述の通り、すべてのコマンドは必ず :class:`~ext.commands.Context` と呼ばれるパラメータを受け取らなければいけません。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:170
|
||||
msgid ""
|
||||
"This parameter gives you access to something called the \"invocation "
|
||||
"context\". Essentially all the information you need to know how the "
|
||||
"command was executed. It contains a lot of useful information:"
|
||||
msgstr "このパラメータにより、「呼び出しコンテクスト」というものにアクセスできます。言うなればコマンドがどのように実行されたのかを知るのに必要な基本的情報です。これにはたくさんの有用な情報が含まれています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:173
|
||||
msgid ":attr:`.Context.guild` to fetch the :class:`Guild` of the command, if any."
|
||||
msgstr "存在する場合に限り、コマンドの :class:`Guild` を取得できる :attr:`.Context.guild` 。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:174
|
||||
msgid ":attr:`.Context.message` to fetch the :class:`Message` of the command."
|
||||
msgstr "コマンドの :class:`Message` を取得できる :attr:`.Context.message` 。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:175
|
||||
msgid ""
|
||||
":attr:`.Context.author` to fetch the :class:`Member` or :class:`User` "
|
||||
"that called the command."
|
||||
msgstr ""
|
||||
"コマンドを実行した :class:`Member` あるいは :class:`User` を取得できる "
|
||||
":attr:`.Context.author` 。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:176
|
||||
msgid ""
|
||||
":meth:`.Context.send` to send a message to the channel the command was "
|
||||
"used in."
|
||||
msgstr "コマンドが実行されたチャンネルにメッセージを送信する :meth:`.Context.send` 。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:178
|
||||
msgid ""
|
||||
"The context implements the :class:`abc.Messageable` interface, so "
|
||||
"anything you can do on a :class:`abc.Messageable` you can do on the "
|
||||
":class:`~ext.commands.Context`."
|
||||
msgstr ""
|
||||
"コンテクストは :class:`abc.Messageable` インタフェースを実装しているため、 "
|
||||
":class:`abc.Messageable` 上でできることは :class:`~ext.commands.Context` "
|
||||
"上でも行うことが可能です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:182
|
||||
msgid "Converters"
|
||||
msgstr "コンバータ"
|
||||
|
||||
#: ../../ext/commands/commands.rst:184
|
||||
msgid ""
|
||||
"Adding bot arguments with function parameters is only the first step in "
|
||||
"defining your bot's command interface. To actually make use of the "
|
||||
"arguments, we usually want to convert the data into a target type. We "
|
||||
"call these :ref:`ext_commands_api_converters`."
|
||||
msgstr ""
|
||||
"Botの引数を関数のパラメータとして設定するのは、Botのコマンドインタフェースを定義する第一歩です。引数を実際に扱うには、大抵の場合、データを目的の型へとと変換する必要があります。私達はこれを"
|
||||
" :ref:`ext_commands_api_converters` と呼んでいます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:188
|
||||
msgid "Converters come in a few flavours:"
|
||||
msgstr "コンバータにはいくつかの種類があります:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:190
|
||||
msgid ""
|
||||
"A regular callable object that takes an argument as a sole parameter and "
|
||||
"returns a different type."
|
||||
msgstr "引数を一つのパラメータとして受け取り、異なる型として返す、通常の呼び出し可能オブジェクト。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:192
|
||||
msgid ""
|
||||
"These range from your own function, to something like :class:`bool` or "
|
||||
":class:`int`."
|
||||
msgstr "これらにはあなたの作った関数、 :class:`bool` や :class:`int` といったものまで含まれます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:194
|
||||
msgid "A custom class that inherits from :class:`~ext.commands.Converter`."
|
||||
msgstr ":class:`~ext.commands.Converter` を継承したカスタムクラス。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:197
|
||||
msgid "Basic Converters"
|
||||
msgstr "基本的なコンバーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:199
|
||||
msgid ""
|
||||
"At its core, a basic converter is a callable that takes in an argument "
|
||||
"and turns it into something else."
|
||||
msgstr "基本的なコンバーターは、中核をなすものであり、受け取った引数を別のものへと変換します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:201
|
||||
msgid ""
|
||||
"For example, if we wanted to add two numbers together, we could request "
|
||||
"that they are turned into integers for us by specifying the converter:"
|
||||
msgstr "例えば、二つの値を加算したい場合、コンバーターを指定することにより、受け取った値を整数型へ変換するように要求できます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:210
|
||||
msgid ""
|
||||
"We specify converters by using something called a **function "
|
||||
"annotation**. This is a Python 3 exclusive feature that was introduced in"
|
||||
" :pep:`3107`."
|
||||
msgstr ""
|
||||
"コンバーターの指定には関数アノテーションというもの用います。これは :pep:`3107` にて追加された Python 3 "
|
||||
"にのみ実装されている機能です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:213
|
||||
msgid ""
|
||||
"This works with any callable, such as a function that would convert a "
|
||||
"string to all upper-case:"
|
||||
msgstr "これは、文字列をすべて大文字に変換する関数などといった、任意の呼び出し可能関数でも動作します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:225
|
||||
msgid "bool"
|
||||
msgstr "論理型"
|
||||
|
||||
#: ../../ext/commands/commands.rst:227
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Unlike the other basic converters, the :class:`bool` converter is treated"
|
||||
" slightly different. Instead of casting directly to the :class:`bool` "
|
||||
"type, which would result in any non-empty argument returning ``True``, it"
|
||||
" instead evaluates the argument as ``True`` or ``False`` based on its "
|
||||
"given content:"
|
||||
msgstr ""
|
||||
"他の基本的なコンバーターとは異なり、 :class:`bool` のコンバーターは若干異なる扱いになります。 :class:`bool` "
|
||||
"型に直接キャストする代わりに、与えられた値に基づいて ``True`` か ``False`` を返します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:239
|
||||
msgid "Advanced Converters"
|
||||
msgstr "応用的なコンバータ"
|
||||
|
||||
#: ../../ext/commands/commands.rst:241
|
||||
msgid ""
|
||||
"Sometimes a basic converter doesn't have enough information that we need."
|
||||
" For example, sometimes we want to get some information from the "
|
||||
":class:`Message` that called the command or we want to do some "
|
||||
"asynchronous processing."
|
||||
msgstr ""
|
||||
"場合によっては、基本的なコンバータを動かすのに必要な情報が不足していることがあります。例えば、実行されたコマンドの "
|
||||
":class:`Message` から情報を取得したい場合や、非同期処理を行いたい場合です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:244
|
||||
msgid ""
|
||||
"For this, the library provides the :class:`~ext.commands.Converter` "
|
||||
"interface. This allows you to have access to the :class:`.Context` and "
|
||||
"have the callable be asynchronous. Defining a custom converter using this"
|
||||
" interface requires overriding a single method, "
|
||||
":meth:`.Converter.convert`."
|
||||
msgstr ""
|
||||
"そういった用途のために、このライブラリは :class:`~ext.commands.Converter` "
|
||||
"インタフェースを提供します。これによって :class:`.Context` "
|
||||
"にアクセスが可能になり、また、呼び出し可能関数を非同期にもできるようになります。このインタフェースを使用して、カスタムコンバーターを定義したい場合は"
|
||||
" :meth:`.Converter.convert` をオーバーライドしてください。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:248
|
||||
msgid "An example converter:"
|
||||
msgstr "コンバーターの例"
|
||||
|
||||
#: ../../ext/commands/commands.rst:263
|
||||
msgid ""
|
||||
"The converter provided can either be constructed or not. Essentially "
|
||||
"these two are equivalent:"
|
||||
msgstr "コンバーターはインスタンス化されていなくても構いません。以下の例の二つのは同じ処理になります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:277
|
||||
msgid ""
|
||||
"Having the possibility of the converter be constructed allows you to set "
|
||||
"up some state in the converter's ``__init__`` for fine tuning the "
|
||||
"converter. An example of this is actually in the library, "
|
||||
":class:`~ext.commands.clean_content`."
|
||||
msgstr ""
|
||||
"コンバーターをインスタンス化する可能性がある場合、コンバーターの調整を行うために ``__init__`` "
|
||||
"で何かしらの状態を設定することが出来ます。この例としてライブラリに実際に存在する "
|
||||
":class:`~ext.commands.clean_content` があります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:293
|
||||
msgid ""
|
||||
"If a converter fails to convert an argument to its designated target "
|
||||
"type, the :exc:`.BadArgument` exception must be raised."
|
||||
msgstr "コンバーターが渡された引数を指定の型に変換できなかった場合は :exc:`.BadArgument` を発生させてください。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:297
|
||||
msgid "Inline Advanced Converters"
|
||||
msgstr "埋込み型の応用的なコンバーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:299
|
||||
msgid ""
|
||||
"If we don't want to inherit from :class:`~ext.commands.Converter`, we can"
|
||||
" still provide a converter that has the advanced functionalities of an "
|
||||
"advanced converter and save us from specifying two types."
|
||||
msgstr ""
|
||||
":class:`~ext.commands.Converter` "
|
||||
"を継承したくない場合のために、応用的なコンバータの高度な機能を備えたコンバータを提供しています。これを使用することで2つのクラスを作成する必要がなくなります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:302
|
||||
msgid ""
|
||||
"For example, a common idiom would be to have a class and a converter for "
|
||||
"that class:"
|
||||
msgstr "例えば、一般的な書き方だと、クラスとそのクラスへのコンバーターを定義します:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:328
|
||||
msgid ""
|
||||
"This can get tedious, so an inline advanced converter is possible through"
|
||||
" a ``classmethod`` inside the type:"
|
||||
msgstr ""
|
||||
"これでは面倒に感じてしまうこともあるでしょう。しかし、埋込み型の応用的なコンバーターは ``classmethod`` "
|
||||
"としてクラスへ埋め込むことが可能です:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:355
|
||||
msgid "Discord Converters"
|
||||
msgstr "Discord コンバーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:357
|
||||
msgid ""
|
||||
"Working with :ref:`discord_api_models` is a fairly common thing when "
|
||||
"defining commands, as a result the library makes working with them easy."
|
||||
msgstr ""
|
||||
":ref:`discord_api_models` "
|
||||
"を使用して作業を行うのは、コマンドを定義する際には一般的なことです。そのため、このライブラリでは簡単に作業が行えるようになっています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:360
|
||||
msgid ""
|
||||
"For example, to receive a :class:`Member` you can just pass it as a "
|
||||
"converter:"
|
||||
msgstr "例えば、 :class:`Member` を受け取るには、これをコンバーターとして渡すだけです。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:368
|
||||
msgid ""
|
||||
"When this command is executed, it attempts to convert the string given "
|
||||
"into a :class:`Member` and then passes it as a parameter for the "
|
||||
"function. This works by checking if the string is a mention, an ID, a "
|
||||
"nickname, a username + discriminator, or just a regular username. The "
|
||||
"default set of converters have been written to be as easy to use as "
|
||||
"possible."
|
||||
msgstr ""
|
||||
"このコマンドが実行されると、与えられた文字列を :class:`Member` "
|
||||
"に変換して、それを関数のパラメーターとして渡します。これは文字列がメンション、ID、ニックネーム、ユーザー名 + "
|
||||
"Discordタグ、または普通のユーザー名かどうかをチェックすることで機能しています。デフォルトで定義されているコンバーターは、できるだけ簡単に使えるように作られています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:372
|
||||
msgid "A lot of discord models work out of the gate as a parameter:"
|
||||
msgstr "Discordモデルの多くがコンバーターとして動作します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:374 ../../ext/commands/commands.rst:396
|
||||
msgid ":class:`Member`"
|
||||
msgstr ":class:`Member`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:375 ../../ext/commands/commands.rst:400
|
||||
msgid ":class:`User`"
|
||||
msgstr ":class:`User`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:376 ../../ext/commands/commands.rst:402
|
||||
msgid ":class:`TextChannel`"
|
||||
msgstr ":class:`TextChannel`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:377 ../../ext/commands/commands.rst:404
|
||||
msgid ":class:`VoiceChannel`"
|
||||
msgstr ":class:`VoiceChannel`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:378 ../../ext/commands/commands.rst:406
|
||||
msgid ":class:`CategoryChannel`"
|
||||
msgstr ":class:`CategoryChannel`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:379 ../../ext/commands/commands.rst:408
|
||||
msgid ":class:`Role`"
|
||||
msgstr ":class:`Role`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:380
|
||||
msgid ":class:`Message` (since v1.1)"
|
||||
msgstr ":class:`Message` (v1.1 から)"
|
||||
|
||||
#: ../../ext/commands/commands.rst:381 ../../ext/commands/commands.rst:410
|
||||
msgid ":class:`Invite`"
|
||||
msgstr ":class:`Invite`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:382 ../../ext/commands/commands.rst:412
|
||||
msgid ":class:`Game`"
|
||||
msgstr ":class:`Game`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:383 ../../ext/commands/commands.rst:414
|
||||
msgid ":class:`Emoji`"
|
||||
msgstr ":class:`Emoji`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:384 ../../ext/commands/commands.rst:416
|
||||
msgid ":class:`PartialEmoji`"
|
||||
msgstr ":class:`PartialEmoji`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:385 ../../ext/commands/commands.rst:418
|
||||
msgid ":class:`Colour`"
|
||||
msgstr ":class:`Colour`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:387
|
||||
msgid ""
|
||||
"Having any of these set as the converter will intelligently convert the "
|
||||
"argument to the appropriate target type you specify."
|
||||
msgstr "これらをコンバーターとして設定すると、引数を指定した型へとインテリジェントに変換します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:390
|
||||
msgid ""
|
||||
"Under the hood, these are implemented by the "
|
||||
":ref:`ext_commands_adv_converters` interface. A table of the equivalent "
|
||||
"converter is given below:"
|
||||
msgstr ""
|
||||
"これらは :ref:`ext_commands_adv_converters` "
|
||||
"インタフェースによって実装されています。コンバーターとクラスの関係は以下の通りです。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:394
|
||||
msgid "Discord Class"
|
||||
msgstr "Discord クラス"
|
||||
|
||||
#: ../../ext/commands/commands.rst:394
|
||||
msgid "Converter"
|
||||
msgstr "コンバーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:396
|
||||
msgid ":class:`~ext.commands.MemberConverter`"
|
||||
msgstr ":class:`~ext.commands.MemberConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:398
|
||||
msgid ":class:`Message`"
|
||||
msgstr ":class:`Message`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:398
|
||||
msgid ":class:`~ext.commands.MessageConverter`"
|
||||
msgstr ":class:`~ext.commands.MessageConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:400
|
||||
msgid ":class:`~ext.commands.UserConverter`"
|
||||
msgstr ":class:`~ext.commands.UserConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:402
|
||||
msgid ":class:`~ext.commands.TextChannelConverter`"
|
||||
msgstr ":class:`~ext.commands.TextChannelConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:404
|
||||
msgid ":class:`~ext.commands.VoiceChannelConverter`"
|
||||
msgstr ":class:`~ext.commands.VoiceChannelConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:406
|
||||
msgid ":class:`~ext.commands.CategoryChannelConverter`"
|
||||
msgstr ":class:`~ext.commands.CategoryChannelConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:408
|
||||
msgid ":class:`~ext.commands.RoleConverter`"
|
||||
msgstr ":class:`~ext.commands.RoleConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:410
|
||||
msgid ":class:`~ext.commands.InviteConverter`"
|
||||
msgstr ":class:`~ext.commands.InviteConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:412
|
||||
msgid ":class:`~ext.commands.GameConverter`"
|
||||
msgstr ":class:`~ext.commands.GameConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:414
|
||||
msgid ":class:`~ext.commands.EmojiConverter`"
|
||||
msgstr ":class:`~ext.commands.EmojiConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:416
|
||||
msgid ":class:`~ext.commands.PartialEmojiConverter`"
|
||||
msgstr ":class:`~ext.commands.PartialEmojiConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:418
|
||||
msgid ":class:`~ext.commands.ColourConverter`"
|
||||
msgstr ":class:`~ext.commands.ColourConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:421
|
||||
msgid ""
|
||||
"By providing the converter it allows us to use them as building blocks "
|
||||
"for another converter:"
|
||||
msgstr "コンバーターを継承することで、他のコンバーターの一部として使うことができます:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:438
|
||||
msgid "Special Converters"
|
||||
msgstr "特殊なコンバーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:440
|
||||
msgid ""
|
||||
"The command extension also has support for certain converters to allow "
|
||||
"for more advanced and intricate use cases that go beyond the generic "
|
||||
"linear parsing. These converters allow you to introduce some more relaxed"
|
||||
" and dynamic grammar to your commands in an easy to use manner."
|
||||
msgstr "コマンド拡張機能は一般的な線形解析を超える、より高度で複雑なユースケースに対応するため、特殊なコンバータをサポートしています。これらのコンバータは、簡単な方法でコマンドに更に容易で動的な文法の導入を可能にします。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:445
|
||||
msgid "typing.Union"
|
||||
msgstr "typing.Union"
|
||||
|
||||
#: ../../ext/commands/commands.rst:447
|
||||
msgid ""
|
||||
"A :data:`typing.Union` is a special type hint that allows for the command"
|
||||
" to take in any of the specific types instead of a singular type. For "
|
||||
"example, given the following:"
|
||||
msgstr ":data:`typing.Union` はコマンドが単数の型の代わりに、複数の特定の型を取り込める特殊な型ヒントです。例えば:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:459
|
||||
msgid ""
|
||||
"The ``what`` parameter would either take a :class:`discord.TextChannel` "
|
||||
"converter or a :class:`discord.Member` converter. The way this works is "
|
||||
"through a left-to-right order. It first attempts to convert the input to "
|
||||
"a :class:`discord.TextChannel`, and if it fails it tries to convert it to"
|
||||
" a :class:`discord.Member`. If all converters fail, then a special error "
|
||||
"is raised, :exc:`~ext.commands.BadUnionArgument`."
|
||||
msgstr ""
|
||||
"``what`` パラメータには :class:`discord.TextChannel` コンバーターか "
|
||||
":class:`discord.Member` "
|
||||
"コンバーターのいずれかが用いられます。これは左から右の順で変換できるか試行することになります。最初に渡された値を "
|
||||
":class:`discord.TextChannel` へ変換しようと試み、失敗した場合は :class:`discord.Member` "
|
||||
"に変換しようとします。すべてのコンバーターで失敗した場合は :exc:`~ext.commands.BadUnionArgument` "
|
||||
"というエラーが発生します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:464
|
||||
msgid ""
|
||||
"Note that any valid converter discussed above can be passed in to the "
|
||||
"argument list of a :data:`typing.Union`."
|
||||
msgstr "以前に説明した有効なコンバーターは、すべて :data:`typing.Union` にわたすことが可能です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:467
|
||||
msgid "typing.Optional"
|
||||
msgstr "typing.Optional"
|
||||
|
||||
#: ../../ext/commands/commands.rst:469
|
||||
msgid ""
|
||||
"A :data:`typing.Optional` is a special type hint that allows for \"back-"
|
||||
"referencing\" behaviour. If the converter fails to parse into the "
|
||||
"specified type, the parser will skip the parameter and then either "
|
||||
"``None`` or the specified default will be passed into the parameter "
|
||||
"instead. The parser will then continue on to the next parameters and "
|
||||
"converters, if any."
|
||||
msgstr ""
|
||||
":data:`typing.Optional` "
|
||||
"は「後方参照」のような動作をする特殊な型ヒントです。コンバーターが指定された型へのパースに失敗した場合、パーサーは代わりに ``None`` "
|
||||
"または指定されたデフォルト値をパラメータに渡したあと、そのパラメータをスキップします。次のパラメータまたはコンバータがあれば、そちらに進みます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:473 ../../ext/commands/commands.rst:500
|
||||
msgid "Consider the following example:"
|
||||
msgstr "次の例をみてください:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:486
|
||||
msgid ""
|
||||
"In this example, since the argument could not be converted into an "
|
||||
"``int``, the default of ``99`` is passed and the parser resumes handling,"
|
||||
" which in this case would be to pass it into the ``liquid`` parameter."
|
||||
msgstr ""
|
||||
"この例では引数を ``int`` に変換することができなかったので、デフォルト値である ``99`` "
|
||||
"を代入し、パーサーは処理を続行しています。この場合、先程の変換に失敗した引数は ``liquid`` パラメータに渡されます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:491
|
||||
msgid ""
|
||||
"This converter only works in regular positional parameters, not variable "
|
||||
"parameters or keyword-only parameters."
|
||||
msgstr "このコンバーターは位置パラメータでのみ動作し、可変長パラメータやキーワードパラメータでは機能しません。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:494
|
||||
msgid "Greedy"
|
||||
msgstr "Greedy"
|
||||
|
||||
#: ../../ext/commands/commands.rst:496
|
||||
msgid ""
|
||||
"The :data:`~ext.commands.Greedy` converter is a generalisation of the "
|
||||
":data:`typing.Optional` converter, except applied to a list of arguments."
|
||||
" In simple terms, this means that it tries to convert as much as it can "
|
||||
"until it can't convert any further."
|
||||
msgstr ""
|
||||
":data:`~ext.commands.Greedy` コンバータは引数にリストが適用される以外は "
|
||||
":data:`typing.Optional` "
|
||||
"を一般化したものです。簡単に言うと、与えられた引数を変換ができなくなるまで指定の型に変換しようと試みます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:509
|
||||
msgid "When invoked, it allows for any number of members to be passed in:"
|
||||
msgstr "これが呼び出されると、任意の数のメンバーを渡すことができます:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:513
|
||||
msgid ""
|
||||
"The type passed when using this converter depends on the parameter type "
|
||||
"that it is being attached to:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:515
|
||||
msgid ""
|
||||
"Positional parameter types will receive either the default parameter or a"
|
||||
" :class:`list` of the converted values."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:516
|
||||
msgid "Variable parameter types will be a :class:`tuple` as usual."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:517
|
||||
msgid ""
|
||||
"Keyword-only parameter types will be the same as if "
|
||||
":data:`~ext.commands.Greedy` was not passed at all."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:519
|
||||
msgid ""
|
||||
":data:`~ext.commands.Greedy` parameters can also be made optional by "
|
||||
"specifying an optional value."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:521
|
||||
msgid ""
|
||||
"When mixed with the :data:`typing.Optional` converter you can provide "
|
||||
"simple and expressive command invocation syntaxes:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:536
|
||||
msgid "This command can be invoked any of the following ways:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:546
|
||||
msgid ""
|
||||
"The usage of :data:`~ext.commands.Greedy` and :data:`typing.Optional` are"
|
||||
" powerful and useful, however as a price, they open you up to some "
|
||||
"parsing ambiguities that might surprise some people."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:549
|
||||
msgid ""
|
||||
"For example, a signature expecting a :data:`typing.Optional` of a "
|
||||
":class:`discord.Member` followed by a :class:`int` could catch a member "
|
||||
"named after a number due to the different ways a "
|
||||
":class:`~ext.commands.MemberConverter` decides to fetch members. You "
|
||||
"should take care to not introduce unintended parsing ambiguities in your "
|
||||
"code. One technique would be to clamp down the expected syntaxes allowed "
|
||||
"through custom converters or reordering the parameters to minimise "
|
||||
"clashes."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:555
|
||||
msgid ""
|
||||
"To help aid with some parsing ambiguities, :class:`str`, ``None``, "
|
||||
":data:`typing.Optional` and :data:`~ext.commands.Greedy` are forbidden as"
|
||||
" parameters for the :data:`~ext.commands.Greedy` converter."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:561
|
||||
msgid "Error Handling"
|
||||
msgstr "エラーハンドリング"
|
||||
|
||||
#: ../../ext/commands/commands.rst:563
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"When our commands fail to parse we will, by default, receive a noisy "
|
||||
"error in ``stderr`` of our console that tells us that an error has "
|
||||
"happened and has been silently ignored."
|
||||
msgstr ""
|
||||
"コマンドの解析に失敗したとき、通常では煩わしいエラーはエラーの発生を伝えるためにコンソールの ``stderr`` "
|
||||
"で受け取られ、無視されていました。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:566
|
||||
msgid ""
|
||||
"In order to handle our errors, we must use something called an error "
|
||||
"handler. There is a global error handler, called :func:`on_command_error`"
|
||||
" which works like any other event in the :ref:`discord-api-events`. This "
|
||||
"global error handler is called for every error reached."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:570
|
||||
msgid ""
|
||||
"Most of the time however, we want to handle an error local to the command"
|
||||
" itself. Luckily, commands come with local error handlers that allow us "
|
||||
"to do just that. First we decorate an error handler function with "
|
||||
":meth:`.Command.error`:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:586
|
||||
msgid ""
|
||||
"The first parameter of the error handler is the :class:`.Context` while "
|
||||
"the second one is an exception that is derived from "
|
||||
":exc:`~ext.commands.CommandError`. A list of errors is found in the "
|
||||
":ref:`ext_commands_api_errors` page of the documentation."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:590
|
||||
msgid "Checks"
|
||||
msgstr "チェック"
|
||||
|
||||
#: ../../ext/commands/commands.rst:592
|
||||
msgid ""
|
||||
"There are cases when we don't want a user to use our commands. They don't"
|
||||
" have permissions to do so or maybe we blocked them from using our bot "
|
||||
"earlier. The commands extension comes with full support for these things "
|
||||
"in a concept called a :ref:`ext_commands_api_checks`."
|
||||
msgstr ""
|
||||
"コマンドをユーザーに使ってほしくない場合などがあります。例えば、使用者が権限を持っていない場合や、Botをブロックしている場合などです。コマンド拡張ではこのような機能を"
|
||||
" :ref:`ext_commands_api_checks` と呼び、完全にサポートしています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:596
|
||||
msgid ""
|
||||
"A check is a basic predicate that can take in a :class:`.Context` as its "
|
||||
"sole parameter. Within it, you have the following options:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:599
|
||||
msgid "Return ``True`` to signal that the person can run the command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:600
|
||||
msgid "Return ``False`` to signal that the person cannot run the command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:601
|
||||
msgid ""
|
||||
"Raise a :exc:`~ext.commands.CommandError` derived exception to signal the"
|
||||
" person cannot run the command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:603
|
||||
msgid ""
|
||||
"This allows you to have custom error messages for you to handle in the "
|
||||
":ref:`error handlers <ext_commands_error_handler>`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:606
|
||||
msgid ""
|
||||
"To register a check for a command, we would have two ways of doing so. "
|
||||
"The first is using the :meth:`~ext.commands.check` decorator. For "
|
||||
"example:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:620
|
||||
msgid ""
|
||||
"This would only evaluate the command if the function ``is_owner`` returns"
|
||||
" ``True``. Sometimes we re-use a check often and want to split it into "
|
||||
"its own decorator. To do that we can just add another level of depth:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:637
|
||||
msgid ""
|
||||
"Since an owner check is so common, the library provides it for you "
|
||||
"(:func:`~ext.commands.is_owner`):"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:647
|
||||
msgid "When multiple checks are specified, **all** of them must be ``True``:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:663
|
||||
msgid ""
|
||||
"If any of those checks fail in the example above, then the command will "
|
||||
"not be run."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:665
|
||||
msgid ""
|
||||
"When an error happens, the error is propagated to the :ref:`error "
|
||||
"handlers <ext_commands_error_handler>`. If you do not raise a custom "
|
||||
":exc:`~ext.commands.CommandError` derived exception, then it will get "
|
||||
"wrapped up into a :exc:`~ext.commands.CheckFailure` exception as so:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:683
|
||||
msgid ""
|
||||
"If you want a more robust error system, you can derive from the exception"
|
||||
" and raise it instead of returning ``False``:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:708
|
||||
msgid ""
|
||||
"Since having a ``guild_only`` decorator is pretty common, it comes built-"
|
||||
"in via :func:`~ext.commands.guild_only`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:711
|
||||
msgid "Global Checks"
|
||||
msgstr "グローバルチェック"
|
||||
|
||||
#: ../../ext/commands/commands.rst:713
|
||||
msgid ""
|
||||
"Sometimes we want to apply a check to **every** command, not just certain"
|
||||
" commands. The library supports this as well using the global check "
|
||||
"concept."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:716
|
||||
msgid ""
|
||||
"Global checks work similarly to regular checks except they are registered"
|
||||
" with the :func:`.Bot.check` decorator."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:718
|
||||
msgid "For example, to block all DMs we could do the following:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:728
|
||||
msgid ""
|
||||
"Be careful on how you write your global checks, as it could also lock you"
|
||||
" out of your own bot."
|
||||
msgstr ""
|
||||
|
||||
#~ msgid ""
|
||||
#~ "To help aid with some parsing "
|
||||
#~ "ambiguities, :class:`str`, ``None`` and "
|
||||
#~ ":data:`~ext.commands.Greedy` are forbidden as "
|
||||
#~ "parameters for the :data:`~ext.commands.Greedy` "
|
||||
#~ "converter."
|
||||
#~ msgstr ""
|
||||
|
@ -1,83 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-22 09:35-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Japanese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Crowdin-Project: discordpy\n"
|
||||
"X-Crowdin-Project-ID: 362783\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: /ext/commands/extensions.pot\n"
|
||||
"X-Crowdin-File-ID: 68\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:6
|
||||
msgid "Extensions"
|
||||
msgstr "エクステンション"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:8
|
||||
msgid "There comes a time in the bot development when you want to extend the bot functionality at run-time and quickly unload and reload code (also called hot-reloading). The command framework comes with this ability built-in, with a concept called **extensions**."
|
||||
msgstr "Bot開発ではBotを起動している間にコードを素早くアンロードし、再度ロードし直したい (ホットリロードとも呼ばれます) という時があります。コマンドフレームワークでは **エクステンション** と呼ばれる概念でこの機能が組み込まれています。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:11
|
||||
msgid "Primer"
|
||||
msgstr "はじめに"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:13
|
||||
msgid "An extension at its core is a python file with an entry point called ``setup``. This setup must be a plain Python function (not a coroutine). It takes a single parameter -- the :class:`~.commands.Bot` that loads the extension."
|
||||
msgstr "その中核となるエクステンションは ``setup`` というエントリポイントを持つPythonファイルです。このsetupは通常のPython関数である必要があります (コルーチンではありません)。この関数はエクステンションをロードする :class:`~.commands.Bot` を受け取るための単一のパラメータを持ちます。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:15
|
||||
msgid "An example extension looks like this:"
|
||||
msgstr "エクステンションの例は以下のとおりです:"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:17
|
||||
msgid "hello.py"
|
||||
msgstr "hello.py"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:30
|
||||
msgid "In this example we define a simple command, and when the extension is loaded this command is added to the bot. Now the final step to this is loading the extension, which we do by calling :meth:`.commands.Bot.load_extension`. To load this extension we call ``bot.load_extension('hello')``."
|
||||
msgstr "この例では単純なコマンドを実装しており、エクステンションがロードされることでこのコマンドがBotに追加されます。最後にこのエクステンションをロードする必要があります。ロードには :meth:`.commands.Bot.load_extension` を実行します。このエクステンションを読み込むために ``bot.load_extension('hello')`` を実行します。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:32
|
||||
msgid "Cogs"
|
||||
msgstr "コグ"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:35
|
||||
msgid "Extensions are usually used in conjunction with cogs. To read more about them, check out the documentation, :ref:`ext_commands_cogs`."
|
||||
msgstr "エクステンションは通常、コグと組み合わせて使用します。詳細については :ref:`ext_commands_cogs` のドキュメントを参照してください。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:39
|
||||
msgid "Extension paths are ultimately similar to the import mechanism. What this means is that if there is a folder, then it must be dot-qualified. For example to load an extension in ``plugins/hello.py`` then we use the string ``plugins.hello``."
|
||||
msgstr "エクステンションのパスは究極的にはimportのメカニズムと似ています。これはフォルダ等がある場合、それをドットで区切らなければならないということです。例えば ``plugins/hello.py`` というエクステンションをロードする場合は、 ``plugins.hello`` という文字列を使います。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:42
|
||||
msgid "Reloading"
|
||||
msgstr "リロード"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:44
|
||||
msgid "When you make a change to the extension and want to reload the references, the library comes with a function to do this for you, :meth:`Bot.reload_extension`."
|
||||
msgstr "エクステンションを更新し、その参照を再読込したい場合のために、ライブラリには :meth:`Bot.reload_extension` が用意されています。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:50
|
||||
msgid "Once the extension reloads, any changes that we did will be applied. This is useful if we want to add or remove functionality without restarting our bot. If an error occurred during the reloading process, the bot will pretend as if the reload never happened."
|
||||
msgstr "エクステンションを再読込すると、その変更が適用されます。Botを再起動せずに機能の追加や削除を行いたい場合に便利です。再読込処理中にエラーが発生した場合、Botは再読込処理をする前の状態に戻ります。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:53
|
||||
msgid "Cleaning Up"
|
||||
msgstr "クリーンアップ"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:55
|
||||
msgid "Although rare, sometimes an extension needs to clean-up or know when it's being unloaded. For cases like these, there is another entry point named ``teardown`` which is similar to ``setup`` except called when the extension is unloaded."
|
||||
msgstr "稀ではありますが、エクステンションにクリーンアップが必要だったり、いつアンロードするかを確認したい場合があります。このために ``setup`` に似たエクステンションがアンロードされるときに呼び出される ``teardown`` というエントリポイントが用意されています。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:57
|
||||
msgid "basic_ext.py"
|
||||
msgstr "basic_ext.py"
|
||||
|
@ -1,27 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-22 09:35-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Japanese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Crowdin-Project: discordpy\n"
|
||||
"X-Crowdin-Project-ID: 362783\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: /ext/commands/index.pot\n"
|
||||
"X-Crowdin-File-ID: 66\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../ext/commands/index.rst:4
|
||||
msgid "``discord.ext.commands`` -- Bot commands framework"
|
||||
msgstr "``discord.ext.commands`` -- ボットコマンドのフレームワーク"
|
||||
|
||||
#: ../../ext/commands/index.rst:6
|
||||
msgid "``discord.py`` offers a lower level aspect on interacting with Discord. Often times, the library is used for the creation of bots. However this task can be daunting and confusing to get correctly the first time. Many times there comes a repetition in creating a bot command framework that is extensible, flexible, and powerful. For this reason, ``discord.py`` comes with an extension library that handles this for you."
|
||||
msgstr "``discord.py`` は、Discordと連携するための低レベルな機能を提供します。ときどき、このライブラリーはBotの作成に用いられています。しかしこの作業を正しくやるのは最初のときは気が重くややこしいものです。何度も繰り返し、拡張可能で柔軟、そしてパワフルなBotコマンドフレームワークを作成しています。この理由より、 ``discord.py`` にはこれを扱う拡張ライブラリがついてきます。"
|
||||
|
@ -1,417 +0,0 @@
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-10-23 22:41-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language: ja_JP\n"
|
||||
"Language-Team: Japanese\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
|
||||
#: ../../ext/tasks/index.rst:4
|
||||
msgid "``discord.ext.tasks`` -- asyncio.Task helpers"
|
||||
msgstr "``discord.ext.tasks`` -- asyncio.Task ヘルパー"
|
||||
|
||||
#: ../../ext/tasks/index.rst:8
|
||||
msgid ""
|
||||
"One of the most common operations when making a bot is having a loop run "
|
||||
"in the background at a specified interval. This pattern is very common "
|
||||
"but has a lot of things you need to look out for:"
|
||||
msgstr "ボットを作成するときの最も一般的な操作の1つは、指定した間隔でバックグラウンドでループを実行させることです。このパターンは非常に一般的ですが、注意すべきことがたくさんあります。"
|
||||
|
||||
#: ../../ext/tasks/index.rst:10
|
||||
msgid "How do I handle :exc:`asyncio.CancelledError`?"
|
||||
msgstr ":exc:`asyncio.CancelledError` はどのように処理するべきですか?"
|
||||
|
||||
#: ../../ext/tasks/index.rst:11
|
||||
msgid "What do I do if the internet goes out?"
|
||||
msgstr "インターネット接続が切れた場合はどうするべきですか?"
|
||||
|
||||
#: ../../ext/tasks/index.rst:12
|
||||
msgid "What is the maximum number of seconds I can sleep anyway?"
|
||||
msgstr "スリープできる最大時間は何秒ですか?"
|
||||
|
||||
#: ../../ext/tasks/index.rst:14
|
||||
msgid ""
|
||||
"The goal of this discord.py extension is to abstract all these worries "
|
||||
"away from you."
|
||||
msgstr "discord.pyの拡張機能の目的は、こういった苦労の種を抽象化することです。"
|
||||
|
||||
#: ../../ext/tasks/index.rst:17
|
||||
msgid "Recipes"
|
||||
msgstr "レシピ"
|
||||
|
||||
#: ../../ext/tasks/index.rst:19
|
||||
msgid "A simple background task in a :class:`~discord.ext.commands.Cog`:"
|
||||
msgstr ":class:`~discord.ext.commands.Cog` におけるシンプルなバックグラウンドタスク:"
|
||||
|
||||
#: ../../ext/tasks/index.rst:38
|
||||
msgid "Adding an exception to handle during reconnect:"
|
||||
msgstr "再接続中に処理する例外を追加します:"
|
||||
|
||||
#: ../../ext/tasks/index.rst:61
|
||||
msgid "Looping a certain amount of times before exiting:"
|
||||
msgstr "特定の回数ループさせる:"
|
||||
|
||||
#: ../../ext/tasks/index.rst:77
|
||||
msgid "Waiting until the bot is ready before the loop starts:"
|
||||
msgstr "ループが始まる前に、Botの準備が整うまで待機する: "
|
||||
|
||||
#: ../../ext/tasks/index.rst:102
|
||||
msgid "Doing something during cancellation:"
|
||||
msgstr "キャンセルする場合、その間に何らかの処理を行う:"
|
||||
|
||||
#: ../../ext/tasks/index.rst:136
|
||||
msgid "API Reference"
|
||||
msgstr "APIリファレンス"
|
||||
|
||||
#: discord.ext.tasks.Loop:1 of
|
||||
msgid ""
|
||||
"A background task helper that abstracts the loop and reconnection logic "
|
||||
"for you."
|
||||
msgstr "ループと再接続処理を抽象化するバックグラウンドタスクのヘルパー。"
|
||||
|
||||
#: discord.ext.tasks.Loop:3 of
|
||||
msgid "The main interface to create this is through :func:`loop`."
|
||||
msgstr ":func:`loop` はこれを作成するための主要なインタフェースです。"
|
||||
|
||||
#: discord.ext.tasks.Loop.current_loop:1 of
|
||||
msgid "The current iteration of the loop."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.current_loop discord.ext.tasks.Loop.next_iteration of
|
||||
msgid "type"
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.current_loop:3 of
|
||||
#, fuzzy
|
||||
msgid ":class:`int`"
|
||||
msgstr ":class:`asyncio.Task`"
|
||||
|
||||
#: discord.ext.tasks.Loop.next_iteration:1 of
|
||||
msgid "When the next iteration of the loop will occur."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.next_iteration:5 of
|
||||
msgid "Optional[:class:`datetime.datetime`]"
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.start:1 of
|
||||
msgid "Starts the internal task in the event loop."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.add_exception_type discord.ext.tasks.Loop.after_loop
|
||||
#: discord.ext.tasks.Loop.before_loop discord.ext.tasks.Loop.change_interval
|
||||
#: discord.ext.tasks.Loop.error discord.ext.tasks.Loop.remove_exception_type
|
||||
#: discord.ext.tasks.Loop.restart discord.ext.tasks.Loop.start
|
||||
#: discord.ext.tasks.loop of
|
||||
msgid "Parameters"
|
||||
msgstr "パラメーター"
|
||||
|
||||
#: discord.ext.tasks.Loop.start:3 of
|
||||
msgid "The arguments to use."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.restart:9 discord.ext.tasks.Loop.start:4 of
|
||||
msgid "The keyword arguments to use."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.add_exception_type discord.ext.tasks.Loop.after_loop
|
||||
#: discord.ext.tasks.Loop.before_loop discord.ext.tasks.Loop.change_interval
|
||||
#: discord.ext.tasks.Loop.error discord.ext.tasks.Loop.start
|
||||
#: discord.ext.tasks.loop of
|
||||
#, fuzzy
|
||||
msgid "Raises"
|
||||
msgstr "例外"
|
||||
|
||||
#: discord.ext.tasks.Loop.start:6 of
|
||||
msgid "A task has already been launched and is running."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.remove_exception_type discord.ext.tasks.Loop.start of
|
||||
msgid "Returns"
|
||||
msgstr "戻り値"
|
||||
|
||||
#: discord.ext.tasks.Loop.start:8 of
|
||||
msgid "The task that has been created."
|
||||
msgstr "タスクが作成されました。"
|
||||
|
||||
#: discord.ext.tasks.Loop.remove_exception_type discord.ext.tasks.Loop.start of
|
||||
msgid "Return type"
|
||||
msgstr "戻り値の型"
|
||||
|
||||
#: discord.ext.tasks.Loop.start:9 of
|
||||
msgid ":class:`asyncio.Task`"
|
||||
msgstr ":class:`asyncio.Task`"
|
||||
|
||||
#: discord.ext.tasks.Loop.stop:1 of
|
||||
msgid "Gracefully stops the task from running."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.stop:3 of
|
||||
msgid ""
|
||||
"Unlike :meth:`cancel`\\, this allows the task to finish its current "
|
||||
"iteration before gracefully exiting."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.stop:8 of
|
||||
msgid ""
|
||||
"If the internal function raises an error that can be handled before "
|
||||
"finishing then it will retry until it succeeds."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.stop:12 of
|
||||
msgid ""
|
||||
"If this is undesirable, either remove the error handling before stopping "
|
||||
"via :meth:`clear_exception_types` or use :meth:`cancel` instead."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.cancel:1 of
|
||||
msgid "Cancels the internal task, if it is running."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.restart:1 of
|
||||
msgid "A convenience method to restart the internal task."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.restart:5 of
|
||||
msgid ""
|
||||
"Due to the way this function works, the task is not returned like "
|
||||
":meth:`start`."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.restart:8 of
|
||||
msgid "The arguments to to use."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.add_exception_type:1 of
|
||||
#, fuzzy
|
||||
msgid "Adds exception types to be handled during the reconnect logic."
|
||||
msgstr "再接続中に処理する例外を追加します:"
|
||||
|
||||
#: discord.ext.tasks.Loop.add_exception_type:3 of
|
||||
msgid ""
|
||||
"By default the exception types handled are those handled by "
|
||||
":meth:`discord.Client.connect`\\, which includes a lot of internet "
|
||||
"disconnection errors."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.add_exception_type:7 of
|
||||
msgid ""
|
||||
"This function is useful if you're interacting with a 3rd party library "
|
||||
"that raises its own set of exceptions."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.add_exception_type:10
|
||||
#: discord.ext.tasks.Loop.remove_exception_type:3 of
|
||||
msgid "An argument list of exception classes to handle."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.add_exception_type:13 of
|
||||
msgid ""
|
||||
"An exception passed is either not a class or not inherited from "
|
||||
":class:`BaseException`."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.clear_exception_types:1 of
|
||||
msgid "Removes all exception types that are handled."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.clear_exception_types:5 of
|
||||
msgid "This operation obviously cannot be undone!"
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.remove_exception_type:1 of
|
||||
#, fuzzy
|
||||
msgid "Removes exception types from being handled during the reconnect logic."
|
||||
msgstr "再接続中に処理する例外を追加します:"
|
||||
|
||||
#: discord.ext.tasks.Loop.remove_exception_type:6 of
|
||||
msgid "Whether all exceptions were successfully removed."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.remove_exception_type:7 of
|
||||
msgid ":class:`bool`"
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.get_task:1 of
|
||||
msgid ""
|
||||
"Optional[:class:`asyncio.Task`]: Fetches the internal task or ``None`` if"
|
||||
" there isn't one running."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.is_being_cancelled:1 of
|
||||
msgid "Whether the task is being cancelled."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.failed:1 of
|
||||
msgid ":class:`bool`: Whether the internal task has failed."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.is_running:1 of
|
||||
msgid ":class:`bool`: Check if the task is currently running."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.before_loop:1 of
|
||||
msgid ""
|
||||
"A decorator that registers a coroutine to be called before the loop "
|
||||
"starts running."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.before_loop:3 of
|
||||
msgid ""
|
||||
"This is useful if you want to wait for some bot state before the loop "
|
||||
"starts, such as :meth:`discord.Client.wait_until_ready`."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.after_loop:3 discord.ext.tasks.Loop.before_loop:6 of
|
||||
msgid "The coroutine must take no arguments (except ``self`` in a class context)."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.before_loop:8 of
|
||||
msgid "The coroutine to register before the loop runs."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.after_loop:14 discord.ext.tasks.Loop.before_loop:11
|
||||
#: discord.ext.tasks.Loop.error:13 discord.ext.tasks.loop:22 of
|
||||
msgid "The function was not a coroutine."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.after_loop:1 of
|
||||
msgid ""
|
||||
"A decorator that register a coroutine to be called after the loop "
|
||||
"finished running."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.after_loop:7 of
|
||||
msgid ""
|
||||
"This coroutine is called even during cancellation. If it is desirable to "
|
||||
"tell apart whether something was cancelled or not, check to see whether "
|
||||
":meth:`is_being_cancelled` is ``True`` or not."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.after_loop:11 of
|
||||
msgid "The coroutine to register after the loop finishes."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.error:1 of
|
||||
msgid ""
|
||||
"A decorator that registers a coroutine to be called if the task "
|
||||
"encounters an unhandled exception."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.error:3 of
|
||||
msgid ""
|
||||
"The coroutine must take only one argument the exception raised (except "
|
||||
"``self`` in a class context)."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.error:5 of
|
||||
msgid ""
|
||||
"By default this prints to :data:`sys.stderr` however it could be "
|
||||
"overridden to have a different implementation."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.error:10 of
|
||||
msgid "The coroutine to register in the event of an unhandled exception."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.change_interval:1 of
|
||||
msgid "Changes the interval for the sleep time."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.change_interval:5 of
|
||||
msgid ""
|
||||
"This only applies on the next loop iteration. If it is desirable for the "
|
||||
"change of interval to be applied right away, cancel the task with "
|
||||
":meth:`cancel`."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.change_interval:10 discord.ext.tasks.loop:4 of
|
||||
msgid "The number of seconds between every iteration."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.change_interval:12 discord.ext.tasks.loop:6 of
|
||||
msgid "The number of minutes between every iteration."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.change_interval:14 discord.ext.tasks.loop:8 of
|
||||
msgid "The number of hours between every iteration."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.Loop.change_interval:17 discord.ext.tasks.loop:21 of
|
||||
msgid "An invalid value was given."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.loop:1 of
|
||||
msgid ""
|
||||
"A decorator that schedules a task in the background for you with optional"
|
||||
" reconnect logic. The decorator returns a :class:`Loop`."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.loop:10 of
|
||||
msgid "The number of loops to do, ``None`` if it should be an infinite loop."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.loop:13 of
|
||||
msgid ""
|
||||
"Whether to handle errors and restart the task using an exponential back-"
|
||||
"off algorithm similar to the one used in :meth:`discord.Client.connect`."
|
||||
msgstr ""
|
||||
|
||||
#: discord.ext.tasks.loop:17 of
|
||||
msgid ""
|
||||
"The loop to use to register the task, if not given defaults to "
|
||||
":func:`asyncio.get_event_loop`."
|
||||
msgstr ""
|
||||
|
||||
#~ msgid ":class:`int` -- The current iteration of the loop."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid ":exc:`RuntimeError` -- A task has already been launched and is running."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid "Adds an exception type to be handled during the reconnect logic."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid "The exception class to handle."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid ""
|
||||
#~ ":exc:`TypeError` -- The exception passed "
|
||||
#~ "is either not a class or not "
|
||||
#~ "inherited from :class:`BaseException`."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Removes an exception type from being "
|
||||
#~ "handled during the reconnect logic."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid "Whether it was successfully removed."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid ":exc:`TypeError` -- The function was not a coroutine."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid ":exc:`ValueError` -- An invalid value was given."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid ""
|
||||
#~ "A decorator that schedules a task "
|
||||
#~ "in the background for you with "
|
||||
#~ "optional reconnect logic."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid "The loop helper that handles the background task."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid ":class:`Loop`"
|
||||
#~ msgstr ""
|
||||
|
@ -1,582 +0,0 @@
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-10-23 22:41-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language: ja_JP\n"
|
||||
"Language-Team: Japanese\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
|
||||
#: ../../faq.rst:5
|
||||
msgid "Frequently Asked Questions"
|
||||
msgstr "よくある質問"
|
||||
|
||||
#: ../../faq.rst:7
|
||||
msgid ""
|
||||
"This is a list of Frequently Asked Questions regarding using "
|
||||
"``discord.py`` and its extension modules. Feel free to suggest a new "
|
||||
"question or submit one via pull requests."
|
||||
msgstr "これは ``discord.py`` 及び 拡張モジュールに対して、よくある質問をまとめたものです。気軽に質問やプルリクエストを提出してください。"
|
||||
|
||||
#: ../../faq.rst:11
|
||||
msgid "Questions"
|
||||
msgstr "質問"
|
||||
|
||||
#: ../../faq.rst:14
|
||||
msgid "Coroutines"
|
||||
msgstr "コルーチン"
|
||||
|
||||
#: ../../faq.rst:16
|
||||
msgid "Questions regarding coroutines and asyncio belong here."
|
||||
msgstr "コルーチンとasyncioに関する質問。"
|
||||
|
||||
#: ../../faq.rst:19
|
||||
msgid "What is a coroutine?"
|
||||
msgstr "コルーチンとはなんですか。"
|
||||
|
||||
#: ../../faq.rst:21
|
||||
msgid ""
|
||||
"A |coroutine_link|_ is a function that must be invoked with ``await`` or "
|
||||
"``yield from``. When Python encounters an ``await`` it stops the "
|
||||
"function's execution at that point and works on other things until it "
|
||||
"comes back to that point and finishes off its work. This allows for your "
|
||||
"program to be doing multiple things at the same time without using "
|
||||
"threads or complicated multiprocessing."
|
||||
msgstr ""
|
||||
"|coroutine_link|_ とは ``await`` または ``yield from`` から呼び出さなければならない関数です。 "
|
||||
"``await`` にエンカウントした場合、そのポイントで関数の実行を停止し、他の作業を実行します。 "
|
||||
"これは作業が終了し、このポイントに戻ってくるまで続きます。 "
|
||||
"これにより、スレッドや複雑なマルチプロセッシングを用いずに複数の処理を並列実行することができます。"
|
||||
|
||||
#: ../../faq.rst:26
|
||||
msgid ""
|
||||
"**If you forget to await a coroutine then the coroutine will not run. "
|
||||
"Never forget to await a coroutine.**"
|
||||
msgstr "**コルーチンにawaitを記述し忘れた場合、コルーチンは実行されません。awaitの記述を忘れないように注意してください。**"
|
||||
|
||||
#: ../../faq.rst:29
|
||||
msgid "Where can I use ``await``\\?"
|
||||
msgstr "``await`` はどこで使用することができますか。"
|
||||
|
||||
#: ../../faq.rst:31
|
||||
msgid ""
|
||||
"You can only use ``await`` inside ``async def`` functions and nowhere "
|
||||
"else."
|
||||
msgstr "``await`` は ``async def`` 関数の中でのみ使用できます。"
|
||||
|
||||
#: ../../faq.rst:34
|
||||
msgid "What does \"blocking\" mean?"
|
||||
msgstr "「ブロッキング」とはなんですか。"
|
||||
|
||||
#: ../../faq.rst:36
|
||||
msgid ""
|
||||
"In asynchronous programming a blocking call is essentially all the parts "
|
||||
"of the function that are not ``await``. Do not despair however, because "
|
||||
"not all forms of blocking are bad! Using blocking calls is inevitable, "
|
||||
"but you must work to make sure that you don't excessively block "
|
||||
"functions. Remember, if you block for too long then your bot will freeze "
|
||||
"since it has not stopped the function's execution at that point to do "
|
||||
"other things."
|
||||
msgstr ""
|
||||
"非同期プログラミングにおけるブロッキングとは、関数内の ``await`` 修飾子がないコードすべてを指します。 "
|
||||
"しかし、全てのブロッキングが悪いというわけではありません。ブロッキングを使用することは避けられませんが、ブロックの発生は出来るだけ少なくする必要があります。長時間のブロックが発生すると、関数の実行が停止しないため、長時間Botがフリーズすることになることを覚えておきましょう。"
|
||||
|
||||
#: ../../faq.rst:41
|
||||
msgid ""
|
||||
"If logging is enabled, this library will attempt to warn you that "
|
||||
"blocking is occurring with the message: ``Heartbeat blocked for more than"
|
||||
" N seconds.`` See :ref:`logging_setup` for details on enabling logging."
|
||||
msgstr ""
|
||||
"もしロギングを有効にしている場合、ライブラリはブロッキングが起きていることを次のメッセージで警告しようと試みます: ``Heartbeat "
|
||||
"blocked for more than N seconds.`` "
|
||||
"ロギングを有効にするには、:ref:`logging_setup`をご覧ください。"
|
||||
|
||||
#: ../../faq.rst:45
|
||||
msgid ""
|
||||
"A common source of blocking for too long is something like "
|
||||
":func:`time.sleep`. Don't do that. Use :func:`asyncio.sleep` instead. "
|
||||
"Similar to this example: ::"
|
||||
msgstr ""
|
||||
"長時間ブロックの原因として一般的なのは :func:`time.sleep` などです。 これは使用せず、下記の例のように "
|
||||
":func:`asyncio.sleep` を使用してください。"
|
||||
|
||||
#: ../../faq.rst:54
|
||||
msgid ""
|
||||
"Another common source of blocking for too long is using HTTP requests "
|
||||
"with the famous module :doc:`req:index`. While :doc:`req:index` is an "
|
||||
"amazing module for non-asynchronous programming, it is not a good choice "
|
||||
"for :mod:`asyncio` because certain requests can block the event loop too "
|
||||
"long. Instead, use the :doc:`aiohttp <aio:index>` library which is "
|
||||
"installed on the side with this library."
|
||||
msgstr ""
|
||||
"また、これだけでなく、有名なモジュール :doc:`req:index` のHTTPリクエストも長時間ブロックの原因になります。 "
|
||||
":doc:`req:index` "
|
||||
"モジュールは非非同期プログラミングでは素晴らしいモジュールですが、特定のリクエストがイベントループを長時間ブロックする可能性があるため、 "
|
||||
":mod:`asyncio` には適していません。 代わりにこのライブラリと一緒にインストールされた :doc:`aiohttp "
|
||||
"<aio:index>` を使用してください。"
|
||||
|
||||
#: ../../faq.rst:59
|
||||
msgid "Consider the following example: ::"
|
||||
msgstr "次の例を見てみましょう。"
|
||||
|
||||
#: ../../faq.rst:75
|
||||
msgid "General"
|
||||
msgstr "一般"
|
||||
|
||||
#: ../../faq.rst:77
|
||||
msgid "General questions regarding library usage belong here."
|
||||
msgstr "ライブラリの使用に関する一般的な質問。"
|
||||
|
||||
#: ../../faq.rst:80
|
||||
msgid "Where can I find usage examples?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:82
|
||||
msgid ""
|
||||
"Example code can be found in the `examples folder "
|
||||
"<https://github.com/Rapptz/discord.py/tree/master/examples>`_ in the "
|
||||
"repository."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:86
|
||||
msgid "How do I set the \"Playing\" status?"
|
||||
msgstr "「プレイ中」状態の設定をするにはどうすればいいですか。"
|
||||
|
||||
#: ../../faq.rst:88
|
||||
msgid ""
|
||||
"There is a method for this under :class:`Client` called "
|
||||
":meth:`Client.change_presence`. The relevant aspect of this is its "
|
||||
"``activity`` keyword argument which takes in an :class:`Activity` object."
|
||||
msgstr ""
|
||||
":class:`Client` 下にプレイ中状態の設定を行うためのメソッド :meth:`Client.change_presence` "
|
||||
"が用意されています。 これの引数 ``activity`` に :class:`Activity` を渡します。"
|
||||
|
||||
#: ../../faq.rst:91
|
||||
msgid ""
|
||||
"The status type (playing, listening, streaming, watching) can be set "
|
||||
"using the :class:`ActivityType` enum. For memory optimisation purposes, "
|
||||
"some activities are offered in slimmed down versions:"
|
||||
msgstr ""
|
||||
"ステータスタイプ(プレイ中、再生中、配信中、視聴中)は列挙型の :class:`ActivityType` "
|
||||
"を指定することで設定が可能です。メモリの最適化のため、一部のアクティビティはスリム化したバージョンで提供しています。"
|
||||
|
||||
#: ../../faq.rst:94
|
||||
msgid ":class:`Game`"
|
||||
msgstr ":class:`Game`"
|
||||
|
||||
#: ../../faq.rst:95
|
||||
msgid ":class:`Streaming`"
|
||||
msgstr ":class:`Streaming`"
|
||||
|
||||
#: ../../faq.rst:97
|
||||
msgid "Putting both of these pieces of info together, you get the following: ::"
|
||||
msgstr "これらの情報をまとめると以下のようになります: ::"
|
||||
|
||||
#: ../../faq.rst:106
|
||||
msgid "How do I send a message to a specific channel?"
|
||||
msgstr "特定のチャンネルにメッセージを送るにはどうすればいいですか。"
|
||||
|
||||
#: ../../faq.rst:108
|
||||
msgid ""
|
||||
"You must fetch the channel directly and then call the appropriate method."
|
||||
" Example: ::"
|
||||
msgstr "チャンネルを直接取得してから、適切なメソッドの呼び出しを行う必要があります。以下がその例です。"
|
||||
|
||||
#: ../../faq.rst:114
|
||||
msgid "How do I send a DM?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:116
|
||||
msgid ""
|
||||
"Get the :class:`User` or :class:`Member` object and call "
|
||||
":meth:`abc.Messageable.send`. For example: ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:121
|
||||
msgid ""
|
||||
"If you are responding to an event, such as :func:`on_message`, you "
|
||||
"already have the :class:`User` object via :attr:`Message.author`: ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:126
|
||||
#, fuzzy
|
||||
msgid "How do I get the ID of a sent message?"
|
||||
msgstr "元の ``message`` を取得するにはどうすればよいですか。"
|
||||
|
||||
#: ../../faq.rst:128
|
||||
msgid ""
|
||||
":meth:`abc.Messageable.send` returns the :class:`Message` that was sent. "
|
||||
"The ID of a message can be accessed via :attr:`Message.id`: ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:135
|
||||
msgid "How do I upload an image?"
|
||||
msgstr "画像をアップロードするにはどうすればいいですか。"
|
||||
|
||||
#: ../../faq.rst:137
|
||||
msgid "To upload something to Discord you have to use the :class:`File` object."
|
||||
msgstr "Discordに何かをアップロードする際には :class:`File` オブジェクトを使用する必要があります。"
|
||||
|
||||
#: ../../faq.rst:139
|
||||
msgid ""
|
||||
"A :class:`File` accepts two parameters, the file-like object (or file "
|
||||
"path) and the filename to pass to Discord when uploading."
|
||||
msgstr ":class:`File` は二つのパラメータがあり、ファイルライクなオブジェクト(または、そのファイルパス)と、ファイル名を渡すことができます。"
|
||||
|
||||
#: ../../faq.rst:142
|
||||
msgid "If you want to upload an image it's as simple as: ::"
|
||||
msgstr "画像をアップロードするだけなら、以下のように簡単に行なえます。"
|
||||
|
||||
#: ../../faq.rst:146
|
||||
msgid "If you have a file-like object you can do as follows: ::"
|
||||
msgstr "もし、ファイルライクなオブジェクトがあるなら、以下のような実装が可能です。"
|
||||
|
||||
#: ../../faq.rst:151
|
||||
msgid ""
|
||||
"To upload multiple files, you can use the ``files`` keyword argument "
|
||||
"instead of ``file``\\: ::"
|
||||
msgstr "複数のファイルをアップロードするには、 ``file`` の代わりに ``files`` を使用しましょう。"
|
||||
|
||||
#: ../../faq.rst:159
|
||||
msgid ""
|
||||
"If you want to upload something from a URL, you will have to use an HTTP "
|
||||
"request using :doc:`aiohttp <aio:index>` and then pass an "
|
||||
":class:`io.BytesIO` instance to :class:`File` like so:"
|
||||
msgstr ""
|
||||
"URLから何かをアップロードする場合は、 :doc:`aiohttp <aio:index>` のHTTPリクエストを使用し、 "
|
||||
":class:`io.BytesIO` インスタンスを :class:`File` にわたす必要があります。"
|
||||
|
||||
#: ../../faq.rst:176
|
||||
msgid "How can I add a reaction to a message?"
|
||||
msgstr "メッセージにリアクションをつけるにはどうすればいいですか。"
|
||||
|
||||
#: ../../faq.rst:178
|
||||
msgid "You use the :meth:`Message.add_reaction` method."
|
||||
msgstr ":meth:`Client.add_reaction` を使用してください。"
|
||||
|
||||
#: ../../faq.rst:180
|
||||
msgid ""
|
||||
"If you want to use unicode emoji, you must pass a valid unicode code "
|
||||
"point in a string. In your code, you can write this in a few different "
|
||||
"ways:"
|
||||
msgstr "Unicodeの絵文字を使用する場合は、文字列内の有効なUnicodeのコードポイントを渡す必要があります。 例を挙げると、このようになります。"
|
||||
|
||||
#: ../../faq.rst:182
|
||||
msgid "``'👍'``"
|
||||
msgstr "``'👍'``"
|
||||
|
||||
#: ../../faq.rst:183
|
||||
msgid "``'\\U0001F44D'``"
|
||||
msgstr "``'\\U0001F44D'``"
|
||||
|
||||
#: ../../faq.rst:184
|
||||
msgid "``'\\N{THUMBS UP SIGN}'``"
|
||||
msgstr "``'\\N{THUMBS UP SIGN}'``"
|
||||
|
||||
#: ../../faq.rst:186 ../../faq.rst:202 ../../faq.rst:277 ../../faq.rst:293
|
||||
#: ../../faq.rst:313
|
||||
msgid "Quick example: ::"
|
||||
msgstr "簡単な例。"
|
||||
|
||||
#: ../../faq.rst:192
|
||||
msgid ""
|
||||
"In case you want to use emoji that come from a message, you already get "
|
||||
"their code points in the content without needing to do anything special. "
|
||||
"You **cannot** send ``':thumbsup:'`` style shorthands."
|
||||
msgstr ""
|
||||
"メッセージから来た絵文字を使用したい場合は、特になにをするでもなく、コンテンツのコードポイントをあなたは取得しています。また、 "
|
||||
"``':thumbsup:'`` のような簡略化したものを送信することは **できません** 。"
|
||||
|
||||
#: ../../faq.rst:195
|
||||
msgid ""
|
||||
"For custom emoji, you should pass an instance of :class:`Emoji`. You can "
|
||||
"also pass a ``'<:name:id>'`` string, but if you can use said emoji, you "
|
||||
"should be able to use :meth:`Client.get_emoji` to get an emoji via ID or "
|
||||
"use :func:`utils.find`/ :func:`utils.get` on :attr:`Client.emojis` or "
|
||||
":attr:`Guild.emojis` collections."
|
||||
msgstr ""
|
||||
"カスタム絵文字については、:class:`Emoji`のインスタンスを渡すといいでしょう。``'<:名前:ID>'``形式の文字列も渡せますが、その絵文字が使えるなら、:meth:`Client.get_emoji`でIDから絵文字を取得したり、:attr:`Client.emojis`"
|
||||
" や :attr:`Guild.emojis`に対して:func:`utils.find`/ "
|
||||
":func:`utils.get`を使ったりできるでしょう。"
|
||||
|
||||
#: ../../faq.rst:199
|
||||
msgid ""
|
||||
"The name and ID of a custom emoji can be found with the client by "
|
||||
"prefixing ``:custom_emoji:`` with a backslash. For example, sending the "
|
||||
"message ``\\:python3:`` with the client will result in "
|
||||
"``<:python3:232720527448342530>``."
|
||||
msgstr "カスタム絵文字の名前とIDをクライアント側で知るには、``:カスタム絵文字:``の頭にバックスラッシュ(円記号)をつけます。たとえば、メッセージ``\\:python3:``を送信すると、結果は``<:python3:232720527448342530>``になります。"
|
||||
|
||||
#: ../../faq.rst:219
|
||||
msgid "How do I pass a coroutine to the player's \"after\" function?"
|
||||
msgstr "どうやってコルーチンをプレイヤーの後処理に渡すのですか。"
|
||||
|
||||
#: ../../faq.rst:221
|
||||
msgid ""
|
||||
"The library's music player launches on a separate thread, ergo it does "
|
||||
"not execute inside a coroutine. This does not mean that it is not "
|
||||
"possible to call a coroutine in the ``after`` parameter. To do so you "
|
||||
"must pass a callable that wraps up a couple of aspects."
|
||||
msgstr ""
|
||||
"ライブラリの音楽プレーヤーは別のスレッドで起動するもので、コルーチン内で実行されるものではありません。しかし、 ``after`` "
|
||||
"にコルーチンが渡せないというわけではありません。コルーチンを渡すためには、いくつかの機能を包括した呼び出し可能コードで渡す必要があります。"
|
||||
|
||||
#: ../../faq.rst:225
|
||||
msgid ""
|
||||
"The first gotcha that you must be aware of is that calling a coroutine is"
|
||||
" not a thread-safe operation. Since we are technically in another thread,"
|
||||
" we must take caution in calling thread-safe operations so things do not "
|
||||
"bug out. Luckily for us, :mod:`asyncio` comes with a "
|
||||
":func:`asyncio.run_coroutine_threadsafe` function that allows us to call "
|
||||
"a coroutine from another thread."
|
||||
msgstr ""
|
||||
"コルーチンを呼び出すという動作はスレッドセーフなものではないということを最初に理解しておく必要があります。技術的に別スレッドなので、スレッドセーフに呼び出す際には注意が必要です。幸運にも、"
|
||||
" :mod:`asyncio` には :func:`asyncio.run_coroutine_threadsafe` "
|
||||
"という関数があります。これを用いることで、別スレッドからコルーチンを呼び出すことが可能です。"
|
||||
|
||||
#: ../../faq.rst:230
|
||||
msgid ""
|
||||
"However, this function returns a :class:`concurrent.Future` and to "
|
||||
"actually call it we have to fetch its result. Putting all of this "
|
||||
"together we can do the following: ::"
|
||||
msgstr ""
|
||||
"しかし、この関数は :class:`concurrent.Future` "
|
||||
"を返すので、実際にはそこから結果を読み出す必要があります。これをすべてまとめると、次のことができます。"
|
||||
|
||||
#: ../../faq.rst:245
|
||||
msgid "How do I run something in the background?"
|
||||
msgstr "バックグラウンドで何かを動かすにはどうすればいいですか。"
|
||||
|
||||
#: ../../faq.rst:247
|
||||
msgid ""
|
||||
"`Check the background_task.py example. "
|
||||
"<https://github.com/Rapptz/discord.py/blob/master/examples/background_task.py>`_"
|
||||
msgstr ""
|
||||
"`background_task.pyの例を参照してください。 "
|
||||
"<https://github.com/Rapptz/discord.py/blob/master/examples/background_task.py>`_"
|
||||
|
||||
#: ../../faq.rst:250
|
||||
msgid "How do I get a specific model?"
|
||||
msgstr "特定のユーザー、役割、チャンネル、サーバを取得するにはどうすればいいですか。"
|
||||
|
||||
#: ../../faq.rst:252
|
||||
msgid ""
|
||||
"There are multiple ways of doing this. If you have a specific model's ID "
|
||||
"then you can use one of the following functions:"
|
||||
msgstr "方法は複数ありますが、特定のモデルのIDがわかっていれば、以下の方法が使えます。"
|
||||
|
||||
#: ../../faq.rst:255
|
||||
msgid ":meth:`Client.get_channel`"
|
||||
msgstr ":meth:`Client.get_channel`"
|
||||
|
||||
#: ../../faq.rst:256
|
||||
msgid ":meth:`Client.get_guild`"
|
||||
msgstr ":meth:`Client.get_guild`"
|
||||
|
||||
#: ../../faq.rst:257
|
||||
msgid ":meth:`Client.get_user`"
|
||||
msgstr ":meth:`Client.get_user`"
|
||||
|
||||
#: ../../faq.rst:258
|
||||
msgid ":meth:`Client.get_emoji`"
|
||||
msgstr ":meth:`Client.get_emoji`"
|
||||
|
||||
#: ../../faq.rst:259
|
||||
msgid ":meth:`Guild.get_member`"
|
||||
msgstr ":meth:`Guild.get_member`"
|
||||
|
||||
#: ../../faq.rst:260
|
||||
msgid ":meth:`Guild.get_channel`"
|
||||
msgstr ":meth:`Guild.get_channel`"
|
||||
|
||||
#: ../../faq.rst:261
|
||||
msgid ":meth:`Guild.get_role`"
|
||||
msgstr ":meth:`Guild.get_role`"
|
||||
|
||||
#: ../../faq.rst:263
|
||||
msgid "The following use an HTTP request:"
|
||||
msgstr "以下の例ではHTTPリクエストを使用します。"
|
||||
|
||||
#: ../../faq.rst:265
|
||||
msgid ":meth:`abc.Messageable.fetch_message`"
|
||||
msgstr ":meth:`abc.Messageable.fetch_message`"
|
||||
|
||||
#: ../../faq.rst:266
|
||||
msgid ":meth:`Client.fetch_user`"
|
||||
msgstr ":meth:`Client.fetch_user`"
|
||||
|
||||
#: ../../faq.rst:267
|
||||
msgid ":meth:`Client.fetch_guilds`"
|
||||
msgstr ":meth:`Client.fetch_guilds`"
|
||||
|
||||
#: ../../faq.rst:268
|
||||
msgid ":meth:`Client.fetch_guild`"
|
||||
msgstr ":meth:`Client.fetch_guild`"
|
||||
|
||||
#: ../../faq.rst:269
|
||||
msgid ":meth:`Guild.fetch_emoji`"
|
||||
msgstr ":meth:`Guild.fetch_emoji`"
|
||||
|
||||
#: ../../faq.rst:270
|
||||
msgid ":meth:`Guild.fetch_emojis`"
|
||||
msgstr ":meth:`Guild.fetch_emojis`"
|
||||
|
||||
#: ../../faq.rst:271
|
||||
msgid ":meth:`Guild.fetch_member`"
|
||||
msgstr ":meth:`Guild.fetch_member`"
|
||||
|
||||
#: ../../faq.rst:274
|
||||
msgid ""
|
||||
"If the functions above do not help you, then use of :func:`utils.find` or"
|
||||
" :func:`utils.get` would serve some use in finding specific models."
|
||||
msgstr "上記の関数を使えない状況の場合、 :func:`utils.find` または :func:`utils.get` が役に立つでしょう。"
|
||||
|
||||
#: ../../faq.rst:288
|
||||
msgid "How do I make a web request?"
|
||||
msgstr "Webリクエストはどうやって作ればよいですか。"
|
||||
|
||||
#: ../../faq.rst:290
|
||||
msgid ""
|
||||
"To make a request, you should use a non-blocking library. This library "
|
||||
"already uses and requires a 3rd party library for making requests, "
|
||||
"``aiohttp``."
|
||||
msgstr ""
|
||||
"リクエストを送るには、ノンブロッキングのライブラリを使わなければなりません。このライブラリは、リクエストを作成するのにサードパーティー製の "
|
||||
"``aiohttp`` を必要とします。"
|
||||
|
||||
#: ../../faq.rst:300
|
||||
msgid ""
|
||||
"See `aiohttp's full documentation "
|
||||
"<http://aiohttp.readthedocs.io/en/stable/>`_ for more information."
|
||||
msgstr ""
|
||||
"詳細は `aiohttpの完全なドキュメント <http://aiohttp.readthedocs.io/en/stable/>`_ "
|
||||
"を参照してください。"
|
||||
|
||||
#: ../../faq.rst:303
|
||||
msgid "How do I use a local image file for an embed image?"
|
||||
msgstr "Embedの画像にローカルの画像を使用するにはどうすればいいですか。"
|
||||
|
||||
#: ../../faq.rst:305
|
||||
msgid ""
|
||||
"Discord special-cases uploading an image attachment and using it within "
|
||||
"an embed so that it will not display separately, but instead in the "
|
||||
"embed's thumbnail, image, footer or author icon."
|
||||
msgstr "特殊なケースとして、画像が別々に表示されないようDiscordにembedを用いてアップロードする際、画像は代わりにembedのサムネイルや画像、フッター、製作者アイコンに表示されます。"
|
||||
|
||||
#: ../../faq.rst:308
|
||||
msgid ""
|
||||
"To do so, upload the image normally with :meth:`abc.Messageable.send`, "
|
||||
"and set the embed's image URL to ``attachment://image.png``, where "
|
||||
"``image.png`` is the filename of the image you will send."
|
||||
msgstr ""
|
||||
"これを行うには、通常通り :meth:`abc.Messageable.send` を用いて画像をアップロードし、Embedの画像URLに "
|
||||
"``attachment://image.png`` を設定します。このとき ``image.png`` は送信したい画像のファイル名にです。"
|
||||
|
||||
#: ../../faq.rst:322
|
||||
msgid "Due to a Discord limitation, filenames may not include underscores."
|
||||
msgstr "Discord側の制限により、ファイル名にアンダースコアが含まれていない場合があります。"
|
||||
|
||||
#: ../../faq.rst:325
|
||||
#, fuzzy
|
||||
msgid "Is there an event for audit log entries being created?"
|
||||
msgstr "招待、または監査ログのエントリが作成されるイベントはありますか。"
|
||||
|
||||
#: ../../faq.rst:327
|
||||
msgid ""
|
||||
"Since Discord does not dispatch this information in the gateway, the "
|
||||
"library cannot provide this information. This is currently a Discord "
|
||||
"limitation."
|
||||
msgstr "Discordはゲートウェイでこの情報をディスパッチしないため、ライブラリによってこの情報を提供することはできません。これは現在、Discord側の制限です。"
|
||||
|
||||
#: ../../faq.rst:331
|
||||
msgid "Commands Extension"
|
||||
msgstr "コマンド拡張"
|
||||
|
||||
#: ../../faq.rst:333
|
||||
msgid "Questions regarding ``discord.ext.commands`` belong here."
|
||||
msgstr "``discord.ext.commands`` に関する質問。"
|
||||
|
||||
#: ../../faq.rst:336
|
||||
msgid "Why does ``on_message`` make my commands stop working?"
|
||||
msgstr "``on_message`` を使うとコマンドが動作しなくなります。どうしてですか。"
|
||||
|
||||
#: ../../faq.rst:338
|
||||
msgid ""
|
||||
"Overriding the default provided ``on_message`` forbids any extra commands"
|
||||
" from running. To fix this, add a ``bot.process_commands(message)`` line "
|
||||
"at the end of your ``on_message``. For example: ::"
|
||||
msgstr ""
|
||||
"デフォルトで提供されている ``on_message`` をオーバーライドすると、コマンドが実行されなくなります。これを修正するには "
|
||||
"``on_message`` の最後に ``bot.process_commands(message)`` を追加してみてください。"
|
||||
|
||||
#: ../../faq.rst:347
|
||||
msgid ""
|
||||
"Alternatively, you can place your ``on_message`` logic into a "
|
||||
"**listener**. In this setup, you should not manually call "
|
||||
"``bot.process_commands()``. This also allows you to do multiple things "
|
||||
"asynchronously in response to a message. Example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:357
|
||||
msgid "Why do my arguments require quotes?"
|
||||
msgstr "コマンドの引数にクォーテーションが必要なのはなぜですか。"
|
||||
|
||||
#: ../../faq.rst:359
|
||||
msgid "In a simple command defined as: ::"
|
||||
msgstr "次の簡単なコマンドを見てみましょう。"
|
||||
|
||||
#: ../../faq.rst:365
|
||||
msgid ""
|
||||
"Calling it via ``?echo a b c`` will only fetch the first argument and "
|
||||
"disregard the rest. To fix this you should either call it via ``?echo \"a"
|
||||
" b c\"`` or change the signature to have \"consume rest\" behaviour. "
|
||||
"Example: ::"
|
||||
msgstr ""
|
||||
"このコマンドを ``?echo a b c`` "
|
||||
"のように実行したとき、コマンドに渡されるのは最初の引数だけです。その後の引数はすべて無視されます。これを正常に動かすためには ``?echo "
|
||||
"\"a b c\"`` のようにしてコマンドを実行するか、コマンドの引数を下記の例のようにしてみましょう"
|
||||
|
||||
#: ../../faq.rst:372
|
||||
msgid "This will allow you to use ``?echo a b c`` without needing the quotes."
|
||||
msgstr "これにより、クォーテーションなしで ``?echo a b c`` を使用することができます。"
|
||||
|
||||
#: ../../faq.rst:375
|
||||
msgid "How do I get the original ``message``\\?"
|
||||
msgstr "元の ``message`` を取得するにはどうすればよいですか。"
|
||||
|
||||
#: ../../faq.rst:377
|
||||
msgid ""
|
||||
"The :class:`~ext.commands.Context` contains an attribute, "
|
||||
":attr:`~.Context.message` to get the original message."
|
||||
msgstr ""
|
||||
":class:`~ext.commands.Context` は元のメッセージを取得するための属性である "
|
||||
":attr:`~.Context.message` を持っています。"
|
||||
|
||||
#: ../../faq.rst:380 ../../faq.rst:392
|
||||
msgid "Example: ::"
|
||||
msgstr "例:"
|
||||
|
||||
#: ../../faq.rst:387
|
||||
msgid "How do I make a subcommand?"
|
||||
msgstr "サブコマンドを作るにはどうすればいいですか。"
|
||||
|
||||
#: ../../faq.rst:389
|
||||
msgid ""
|
||||
"Use the ``group`` decorator. This will transform the callback into a "
|
||||
"``Group`` which will allow you to add commands into the group operating "
|
||||
"as \"subcommands\". These groups can be arbitrarily nested as well."
|
||||
msgstr ""
|
||||
"``group`` デコレータを使います。これにより、コールバックが ``Group`` "
|
||||
"に変換され、groupに「サブコマンド」として動作するコマンドを追加できます。これらのグループは、ネストすることもできます。"
|
||||
|
||||
#: ../../faq.rst:403
|
||||
msgid "This could then be used as ``?git push origin master``."
|
||||
msgstr "これは ``?git push origin master`` のように使うことができます。"
|
||||
|
@ -1,83 +0,0 @@
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-10-23 22:41-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language: ja_JP\n"
|
||||
"Language-Team: Japanese\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
|
||||
#: ../../index.rst:7
|
||||
msgid "Welcome to discord.py"
|
||||
msgstr "discord.py へようこそ。"
|
||||
|
||||
#: ../../index.rst:11
|
||||
msgid ""
|
||||
"discord.py is a modern, easy to use, feature-rich, and async ready API "
|
||||
"wrapper for Discord."
|
||||
msgstr "discord.py は機能豊富かつモダンで使いやすい、非同期処理にも対応したDiscord用のAPIラッパーです。"
|
||||
|
||||
#: ../../index.rst:14
|
||||
msgid "**Features:**"
|
||||
msgstr "**特徴:**"
|
||||
|
||||
#: ../../index.rst:16
|
||||
msgid "Modern Pythonic API using ``async``\\/``await`` syntax"
|
||||
msgstr "``async``\\/``await`` 構文を使ったモダンなPythonらしいAPI"
|
||||
|
||||
#: ../../index.rst:17
|
||||
msgid "Sane rate limit handling that prevents 429s"
|
||||
msgstr "429エラー防止の為のレート制限"
|
||||
|
||||
#: ../../index.rst:18
|
||||
msgid "Implements the entire Discord API"
|
||||
msgstr "Discord APIを完全にカバー"
|
||||
|
||||
#: ../../index.rst:19
|
||||
msgid "Command extension to aid with bot creation"
|
||||
msgstr "Bot作成に便利なコマンド拡張"
|
||||
|
||||
#: ../../index.rst:20
|
||||
msgid "Easy to use with an object oriented design"
|
||||
msgstr "オブジェクト指向設計で使いやすい"
|
||||
|
||||
#: ../../index.rst:21
|
||||
msgid "Optimised for both speed and memory"
|
||||
msgstr "メモリと速度の両方を最適化"
|
||||
|
||||
#: ../../index.rst:24
|
||||
msgid "Documentation Contents"
|
||||
msgstr "ドキュメントの目次"
|
||||
|
||||
#: ../../index.rst:36
|
||||
msgid "Extensions"
|
||||
msgstr "拡張機能"
|
||||
|
||||
#: ../../index.rst:46
|
||||
msgid "Additional Information"
|
||||
msgstr "追加情報"
|
||||
|
||||
#: ../../index.rst:57
|
||||
msgid ""
|
||||
"If you still can't find what you're looking for, try in one of the "
|
||||
"following pages:"
|
||||
msgstr "探しているものが見つからない場合は、以下のページを試してください。"
|
||||
|
||||
#: ../../index.rst:59
|
||||
msgid ":ref:`genindex`"
|
||||
msgstr ":ref:`genindex`"
|
||||
|
||||
#: ../../index.rst:60
|
||||
msgid ":ref:`search`"
|
||||
msgstr ":ref:`search`"
|
||||
|
||||
#~ msgid ":ref:`modindex`"
|
||||
#~ msgstr ":ref:`modindex`"
|
||||
|
@ -1,429 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2015-present, Rapptz
|
||||
# This file is distributed under the same license as the discord.py package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2020.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discord.py 1.5.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-10-23 22:41-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
|
||||
#: ../../intents.rst:6
|
||||
msgid "A Primer to Gateway Intents"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:8
|
||||
msgid ""
|
||||
"In version 1.5 comes the introduction of :class:`Intents`. This is a "
|
||||
"radical change in how bots are written. An intent basically allows a bot "
|
||||
"to subscribe into specific buckets of events. The events that correspond "
|
||||
"to each intent is documented in the individual attribute of the "
|
||||
":class:`Intents` documentation."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:10
|
||||
msgid ""
|
||||
"These intents are passed to the constructor of :class:`Client` or its "
|
||||
"subclasses (:class:`AutoShardedClient`, :class:`~.AutoShardedBot`, "
|
||||
":class:`~.Bot`) with the ``intents`` argument."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:12
|
||||
msgid ""
|
||||
"If intents are not passed, then the library defaults to every intent "
|
||||
"being enabled except the privileged intents, currently "
|
||||
":attr:`Intents.members` and :attr:`Intents.presences`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:15
|
||||
msgid "What intents are needed?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:17
|
||||
msgid ""
|
||||
"The intents that are necessary for your bot can only be dictated by "
|
||||
"yourself. Each attribute in the :class:`Intents` class documents what "
|
||||
":ref:`events <discord-api-events>` it corresponds to and what kind of "
|
||||
"cache it enables."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:19
|
||||
msgid ""
|
||||
"For example, if you want a bot that functions without spammy events like "
|
||||
"presences or typing then we could do the following:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:34
|
||||
msgid ""
|
||||
"Note that this doesn't enable :attr:`Intents.members` since it's a "
|
||||
"privileged intent."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:36
|
||||
msgid ""
|
||||
"Another example showing a bot that only deals with messages and guild "
|
||||
"information:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:54
|
||||
msgid "Privileged Intents"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:56
|
||||
msgid ""
|
||||
"With the API change requiring bot authors to specify intents, some "
|
||||
"intents were restricted further and require more manual steps. These "
|
||||
"intents are called **privileged intents**."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:58
|
||||
msgid ""
|
||||
"A privileged intent is one that requires you to go to the developer "
|
||||
"portal and manually enable it. To enable privileged intents do the "
|
||||
"following:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:60
|
||||
msgid ""
|
||||
"Make sure you're logged on to the `Discord website "
|
||||
"<https://discord.com>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:61
|
||||
msgid ""
|
||||
"Navigate to the `application page "
|
||||
"<https://discord.com/developers/applications>`_"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:62
|
||||
msgid "Click on the bot you want to enable privileged intents for."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:63
|
||||
msgid "Navigate to the bot tab on the left side of the screen."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:68
|
||||
msgid ""
|
||||
"Scroll down to the \"Privileged Gateway Intents\" section and enable the "
|
||||
"ones you want."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:75
|
||||
msgid ""
|
||||
"Enabling privileged intents when your bot is in over 100 guilds requires "
|
||||
"going through `bot verification <https://support.discord.com/hc/en-"
|
||||
"us/articles/360040720412>`_. If your bot is already verified and you "
|
||||
"would like to enable a privileged intent you must go through `discord "
|
||||
"support <https://dis.gd/contact>`_ and talk to them about it."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:79
|
||||
msgid ""
|
||||
"Even if you enable intents through the developer portal, you still have "
|
||||
"to enable the intents through code as well."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:83
|
||||
msgid "Do I need privileged intents?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:85
|
||||
msgid "This is a quick checklist to see if you need specific privileged intents."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:90
|
||||
msgid "Presence Intent"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:92
|
||||
msgid "Whether you use :attr:`Member.status` at all to track member statuses."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:93
|
||||
msgid ""
|
||||
"Whether you use :attr:`Member.activity` or :attr:`Member.activities` to "
|
||||
"check member's activities."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:98
|
||||
msgid "Member Intent"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:100
|
||||
msgid ""
|
||||
"Whether you track member joins or member leaves, corresponds to "
|
||||
":func:`on_member_join` and :func:`on_member_remove` events."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:101
|
||||
msgid "Whether you want to track member updates such as nickname or role changes."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:102
|
||||
msgid ""
|
||||
"Whether you want to track user updates such as usernames, avatars, "
|
||||
"discriminators, etc."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:103
|
||||
msgid ""
|
||||
"Whether you want to request the guild member list through "
|
||||
":meth:`Guild.chunk` or :meth:`Guild.fetch_members`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:104
|
||||
msgid "Whether you want high accuracy member cache under :attr:`Guild.members`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:109
|
||||
msgid "Member Cache"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:111
|
||||
msgid ""
|
||||
"Along with intents, Discord now further restricts the ability to cache "
|
||||
"members and expects bot authors to cache as little as is necessary. "
|
||||
"However, to properly maintain a cache the :attr:`Intents.members` intent "
|
||||
"is required in order to track the members who left and properly evict "
|
||||
"them."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:113
|
||||
msgid ""
|
||||
"To aid with member cache where we don't need members to be cached, the "
|
||||
"library now has a :class:`MemberCacheFlags` flag to control the member "
|
||||
"cache. The documentation page for the class goes over the specific "
|
||||
"policies that are possible."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:115
|
||||
msgid ""
|
||||
"It should be noted that certain things do not need a member cache since "
|
||||
"Discord will provide full member information if possible. For example:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:117
|
||||
msgid ""
|
||||
":func:`on_message` will have :attr:`Message.author` be a member even if "
|
||||
"cache is disabled."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:118
|
||||
msgid ""
|
||||
":func:`on_voice_state_update` will have the ``member`` parameter be a "
|
||||
"member even if cache is disabled."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:119
|
||||
msgid ""
|
||||
":func:`on_reaction_add` will have the ``user`` parameter be a member even"
|
||||
" if cache is disabled."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:120
|
||||
msgid ""
|
||||
":func:`on_raw_reaction_add` will have "
|
||||
":attr:`RawReactionActionEvent.member` be a member even if cache is "
|
||||
"disabled."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:121
|
||||
msgid ""
|
||||
"The reaction removal events do not have the member information. This is a"
|
||||
" Discord limitation."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:123
|
||||
msgid ""
|
||||
"Other events that take a :class:`Member` will require the use of the "
|
||||
"member cache. If absolute accuracy over the member cache is desirable, "
|
||||
"then it is advisable to have the :attr:`Intents.members` intent enabled."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:128
|
||||
msgid "Retrieving Members"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:130
|
||||
msgid ""
|
||||
"If cache is disabled or you disable chunking guilds at startup, we might "
|
||||
"still need a way to load members. The library offers a few ways to do "
|
||||
"this:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:134
|
||||
msgid ":meth:`Guild.query_members`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:133
|
||||
msgid "Used to query members by a prefix matching nickname or username."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:134
|
||||
msgid "This can also be used to query members by their user ID."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:135
|
||||
msgid "This uses the gateway and not the HTTP."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:136
|
||||
msgid ":meth:`Guild.chunk`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:137
|
||||
msgid "This can be used to fetch the entire member list through the gateway."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:138
|
||||
msgid ":meth:`Guild.fetch_member`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:139
|
||||
msgid "Used to fetch a member by ID through the HTTP API."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:141
|
||||
msgid ":meth:`Guild.fetch_members`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:141
|
||||
msgid "used to fetch a large number of members through the HTTP API."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:143
|
||||
msgid ""
|
||||
"It should be noted that the gateway has a strict rate limit of 120 "
|
||||
"requests per 60 seconds."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:146
|
||||
msgid "Troubleshooting"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:148
|
||||
msgid "Some common issues relating to the mandatory intent change."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:151
|
||||
msgid "Where'd my members go?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:153
|
||||
msgid ""
|
||||
"Due to an :ref:`API change <intents_member_cache>` Discord is now forcing"
|
||||
" developers who want member caching to explicitly opt-in to it. This is a"
|
||||
" Discord mandated change and there is no way to bypass it. In order to "
|
||||
"get members back you have to explicitly enable the :ref:`members "
|
||||
"privileged intent <privileged_intents>` and change the "
|
||||
":attr:`Intents.members` attribute to true."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:155
|
||||
msgid "For example:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:170
|
||||
msgid "Why does ``on_ready`` take so long to fire?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:172
|
||||
msgid ""
|
||||
"As part of the API change regarding intents, Discord also changed how "
|
||||
"members are loaded in the beginning. Originally the library could request"
|
||||
" 75 guilds at once and only request members from guilds that have the "
|
||||
":attr:`Guild.large` attribute set to ``True``. With the new intent "
|
||||
"changes, Discord mandates that we can only send 1 guild per request. This"
|
||||
" causes a 75x slowdown which is further compounded by the fact that *all*"
|
||||
" guilds, not just large guilds are being requested."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:174
|
||||
msgid "There are a few solutions to fix this."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:176
|
||||
msgid ""
|
||||
"The first solution is to request the privileged presences intent along "
|
||||
"with the privileged members intent and enable both of them. This allows "
|
||||
"the initial member list to contain online members just like the old "
|
||||
"gateway. Note that we're still limited to 1 guild per request but the "
|
||||
"number of guilds we request is significantly reduced."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:178
|
||||
msgid ""
|
||||
"The second solution is to disable member chunking by setting "
|
||||
"``chunk_guilds_at_startup`` to ``False`` when constructing a client. "
|
||||
"Then, when chunking for a guild is necessary you can use the various "
|
||||
"techniques to :ref:`retrieve members <retrieving_members>`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:180
|
||||
msgid ""
|
||||
"To illustrate the slowdown caused the API change, take a bot who is in "
|
||||
"840 guilds and 95 of these guilds are \"large\" (over 250 members)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:182
|
||||
msgid ""
|
||||
"Under the original system this would result in 2 requests to fetch the "
|
||||
"member list (75 guilds, 20 guilds) roughly taking 60 seconds. With "
|
||||
":attr:`Intents.members` but not :attr:`Intents.presences` this requires "
|
||||
"840 requests, with a rate limit of 120 requests per 60 seconds means that"
|
||||
" due to waiting for the rate limit it totals to around 7 minutes of "
|
||||
"waiting for the rate limit to fetch all the members. With both "
|
||||
":attr:`Intents.members` and :attr:`Intents.presences` we mostly get the "
|
||||
"old behaviour so we're only required to request for the 95 guilds that "
|
||||
"are large, this is slightly less than our rate limit so it's close to the"
|
||||
" original timing to fetch the member list."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:184
|
||||
msgid ""
|
||||
"Unfortunately due to this change being required from Discord there is "
|
||||
"nothing that the library can do to mitigate this."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:187
|
||||
msgid "I don't like this, can I go back?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:189
|
||||
msgid ""
|
||||
"For now, the old gateway will still work so downgrading to discord.py "
|
||||
"v1.4 is still possible and will continue to be supported until Discord "
|
||||
"officially kills the v6 gateway, which is imminent. However it is "
|
||||
"paramount that for the future of your bot that you upgrade your code to "
|
||||
"the new way things are done."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:191
|
||||
msgid "To downgrade you can do the following:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:197
|
||||
msgid "On Windows use ``py -3`` instead of ``python3``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:201
|
||||
msgid ""
|
||||
"There is no currently set date in which the old gateway will stop working"
|
||||
" so it is recommended to update your code instead."
|
||||
msgstr ""
|
||||
|
||||
#: ../../intents.rst:203
|
||||
msgid ""
|
||||
"If you truly dislike the direction Discord is going with their API, you "
|
||||
"can contact them via `support <https://dis.gd/contact>`_"
|
||||
msgstr ""
|
@ -1,123 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-22 09:35-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Japanese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Crowdin-Project: discordpy\n"
|
||||
"X-Crowdin-Project-ID: 362783\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: intro.pot\n"
|
||||
"X-Crowdin-File-ID: 80\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../intro.rst:6
|
||||
msgid "Introduction"
|
||||
msgstr "はじめに"
|
||||
|
||||
#: ../../intro.rst:8
|
||||
msgid "This is the documentation for discord.py, a library for Python to aid in creating applications that utilise the Discord API."
|
||||
msgstr "これはDiscord APIを利用したアプリケーションを作成するのに便利なPythonライブラリ、discord.pyのドキュメントです。"
|
||||
|
||||
#: ../../intro.rst:12
|
||||
msgid "Prerequisites"
|
||||
msgstr "前提"
|
||||
|
||||
#: ../../intro.rst:14
|
||||
msgid "discord.py works with Python 3.5.3 or higher. Support for earlier versions of Python is not provided. Python 2.7 or lower is not supported. Python 3.4 or lower is not supported due to one of the dependencies (:doc:`aiohttp <aio:index>`) not supporting Python 3.4."
|
||||
msgstr "discord.pyは3.5.3以降のバージョンのPythonで動作します。Python2.7のような旧バージョンはサポートされていません。Python3.4以下は依存関係にあるライブラリ (:doc:`aiohttp <aio:index>`) がサポートされていないため、サポートしていません。"
|
||||
|
||||
#: ../../intro.rst:22
|
||||
msgid "Installing"
|
||||
msgstr "インストール"
|
||||
|
||||
#: ../../intro.rst:24
|
||||
msgid "You can get the library directly from PyPI: ::"
|
||||
msgstr "PyPIから直接ライブラリをインストールできます。"
|
||||
|
||||
#: ../../intro.rst:28
|
||||
msgid "If you are using Windows, then the following should be used instead: ::"
|
||||
msgstr "Windowsを使用している場合は、以下のコマンドで実行してください。"
|
||||
|
||||
#: ../../intro.rst:33
|
||||
msgid "To get voice support, you should use ``discord.py[voice]`` instead of ``discord.py``, e.g. ::"
|
||||
msgstr "音声のサポートが必要な場合は、 ``discord.py`` ではなく、以下の例のように ``discord.py[voice]`` を使うべきです。"
|
||||
|
||||
#: ../../intro.rst:37
|
||||
msgid "On Linux environments, installing voice requires getting the following dependencies:"
|
||||
msgstr "Linux環境では、依存関係にある以下のライブラリが必要になるので注意してください。"
|
||||
|
||||
#: ../../intro.rst:39
|
||||
msgid "`libffi <https://github.com/libffi/libffi>`_"
|
||||
msgstr "`libffi <https://github.com/libffi/libffi>`_"
|
||||
|
||||
#: ../../intro.rst:40
|
||||
msgid "`libnacl <https://github.com/saltstack/libnacl>`_"
|
||||
msgstr "`libnacl <https://github.com/saltstack/libnacl>`_"
|
||||
|
||||
#: ../../intro.rst:41
|
||||
msgid "`python3-dev <https://packages.debian.org/python3-dev>`_"
|
||||
msgstr "`python3-dev <https://packages.debian.org/python3-dev>`_"
|
||||
|
||||
#: ../../intro.rst:43
|
||||
msgid "For a Debian-based system, the following command will get these dependencies:"
|
||||
msgstr "Debianベースのシステムでは、次のコマンドで依存関係にあるライブラリを取得できます。"
|
||||
|
||||
#: ../../intro.rst:49
|
||||
msgid "Remember to check your permissions!"
|
||||
msgstr "自分の権限の確認は忘れないようにしてください!"
|
||||
|
||||
#: ../../intro.rst:52
|
||||
msgid "Virtual Environments"
|
||||
msgstr "仮想環境"
|
||||
|
||||
#: ../../intro.rst:54
|
||||
msgid "Sometimes you want to keep libraries from polluting system installs or use a different version of libraries than the ones installed on the system. You might also not have permissions to install libaries system-wide. For this purpose, the standard library as of Python 3.3 comes with a concept called \"Virtual Environment\"s to help maintain these separate versions."
|
||||
msgstr "システムへのインストールをライブラリによって汚したくない場合や、現在インストールされているシステムとは異なるバージョンのライブラリを使用したい場合があります。または、システムへのライブラリのインストール権限がない場合などです。こういった目的のため、Python3.3の標準ライブラリには、このように別々のバージョンを保持したい場合のために、「仮想環境」というものが用意されています。"
|
||||
|
||||
#: ../../intro.rst:59
|
||||
msgid "A more in-depth tutorial is found on :doc:`py:tutorial/venv`."
|
||||
msgstr "より詳しいチュートリアルは :doc:`py:tutorial/venv` にあります。"
|
||||
|
||||
#: ../../intro.rst:61
|
||||
msgid "However, for the quick and dirty:"
|
||||
msgstr "簡単に仮想環境を構築する方法。"
|
||||
|
||||
#: ../../intro.rst:63
|
||||
msgid "Go to your project's working directory:"
|
||||
msgstr "プロジェクトの作業ディレクトリに移動してください。"
|
||||
|
||||
#: ../../intro.rst:70
|
||||
msgid "Activate the virtual environment:"
|
||||
msgstr "下記コマンドで仮想環境を有効化します。"
|
||||
|
||||
#: ../../intro.rst:76
|
||||
msgid "On Windows you activate it with:"
|
||||
msgstr "Windowsの場合は、こちらを使ってください。"
|
||||
|
||||
#: ../../intro.rst:82
|
||||
msgid "Use pip like usual:"
|
||||
msgstr "いつものようにpipインストールを実行します。"
|
||||
|
||||
#: ../../intro.rst:88
|
||||
msgid "Congratulations. You now have a virtual environment all set up."
|
||||
msgstr "おめでとうございます。これで仮想環境のセットアップができました。"
|
||||
|
||||
#: ../../intro.rst:91
|
||||
msgid "Basic Concepts"
|
||||
msgstr "基本概念"
|
||||
|
||||
#: ../../intro.rst:93
|
||||
msgid "discord.py revolves around the concept of :ref:`events <discord-api-events>`. An event is something you listen to and then respond to. For example, when a message happens, you will receive an event about it that you can respond to."
|
||||
msgstr "discord.pyは :ref:`イベント <discord-api-events>` の概念を中心としています。イベントは何かを受け取り、それに対する応答を行います。例えば、メッセージが発生すると、メッセージの発生に関連するイベントを受け取り、そのイベントに対して応答を返すことができます。"
|
||||
|
||||
#: ../../intro.rst:97
|
||||
msgid "A quick example to showcase how events work:"
|
||||
msgstr "以下はイベントの仕組みを紹介する簡単な例です。"
|
||||
|
@ -1,77 +0,0 @@
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-10-23 22:41-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language: ja_JP\n"
|
||||
"Language-Team: Japanese\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
|
||||
#: ../../logging.rst:5
|
||||
msgid "Setting Up Logging"
|
||||
msgstr "ログの設定"
|
||||
|
||||
#: ../../logging.rst:7
|
||||
msgid ""
|
||||
"*discord.py* logs errors and debug information via the :mod:`logging` "
|
||||
"python module. It is strongly recommended that the logging module is "
|
||||
"configured, as no errors or warnings will be output if it is not set up. "
|
||||
"Configuration of the ``logging`` module can be as simple as::"
|
||||
msgstr ""
|
||||
"*discord.py* はPythonの :mod:`logging` "
|
||||
"モジュールを介してエラーやデバッグの情報を記録します。loggingモジュールが設定されていない場合は、エラーや警告が出力されないため、設定するとを強くおすすめします。loggingモジュールの設定は下記手順で簡単に実装が可能です。"
|
||||
|
||||
#: ../../logging.rst:16
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Placed at the start of the application. This will output the logs from "
|
||||
"discord as well as other libraries that use the ``logging`` module "
|
||||
"directly to the console."
|
||||
msgstr ""
|
||||
"アプリケーションの始めにこれを書き加えるだけです。これはdiscordからのログを ``logging`` "
|
||||
"モジュールを用いた他のライブラリ同様、コンソールに出力します。"
|
||||
|
||||
#: ../../logging.rst:20
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"The optional ``level`` argument specifies what level of events to log out"
|
||||
" and can be any of ``CRITICAL``, ``ERROR``, ``WARNING``, ``INFO``, and "
|
||||
"``DEBUG`` and if not specified defaults to ``WARNING``."
|
||||
msgstr ""
|
||||
"オプションである ``level`` の引数は出力するイベントのレベルを指定するためのもので、 ``CRITICAL``, ``ERROR``, "
|
||||
"``WARNING``, ``INFO`` そして ``DEBUG`` を指定することが可能です。指定されていない場合はデフォルトである "
|
||||
"``WARNING`` に設定されます。"
|
||||
|
||||
#: ../../logging.rst:24
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"More advanced setups are possible with the :mod:`logging` module. For "
|
||||
"example to write the logs to a file called ``discord.log`` instead of "
|
||||
"outputting them to the console the following snippet can be used::"
|
||||
msgstr ""
|
||||
"また、 :mod:`logging` モジュールでは更に高度な設定が可能です。たとえば、コンソールへ出力するのではなく、 "
|
||||
"``discord.log`` というファイルにログを出力するには、以下のスニペットが利用できます。"
|
||||
|
||||
#: ../../logging.rst:37
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"This is recommended, especially at verbose levels such as ``INFO`` and "
|
||||
"``DEBUG``, as there are a lot of events logged and it would clog the "
|
||||
"stdout of your program."
|
||||
msgstr ""
|
||||
"特に、 ``INFO`` や ``DEBUG`` "
|
||||
"といった冗長なイベントレベルを設定している場合、プログラムの標準出力をつまらせてしまう原因になるため、ファイルへの出力が推奨されます。"
|
||||
|
||||
#: ../../logging.rst:43
|
||||
msgid ""
|
||||
"For more information, check the documentation and tutorial of the "
|
||||
":mod:`logging` module."
|
||||
msgstr "詳細は、:mod:`logging` モジュールのドキュメントを参照してください。"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,363 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-22 09:35-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Japanese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Crowdin-Project: discordpy\n"
|
||||
"X-Crowdin-Project-ID: 362783\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: migrating_to_async.pot\n"
|
||||
"X-Crowdin-File-ID: 48\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../migrating_to_async.rst:8
|
||||
msgid "Migrating to v0.10.0"
|
||||
msgstr "v0.10.0への移行"
|
||||
|
||||
#: ../../migrating_to_async.rst:10
|
||||
msgid "v0.10.0 is one of the biggest breaking changes in the library due to massive fundamental changes in how the library operates."
|
||||
msgstr "v0.10.0は、ライブラリの根本的動作が大幅に変更された、ライブラリの中でも大きな更新の一つです。"
|
||||
|
||||
#: ../../migrating_to_async.rst:13
|
||||
msgid "The biggest major change is that the library has dropped support to all versions prior to Python 3.4.2. This was made to support :mod:`asyncio`, in which more detail can be seen :issue:`in the corresponding issue <50>`. To reiterate this, the implication is that **python version 2.7 and 3.3 are no longer supported**."
|
||||
msgstr "最大の大きな変更点はPython 3.4.2以前のすべてのバージョンのサポートが打ち切られたことです。これは :mod:`asyncio` をサポートするためで、対応する :issue:`in the corresponding issue <50>` で詳細が見られます。繰り返しになりますが、 **Python 2.7及びPython3.3は、既にサポートされていません** 。"
|
||||
|
||||
#: ../../migrating_to_async.rst:18
|
||||
msgid "Below are all the other major changes from v0.9.0 to v0.10.0."
|
||||
msgstr "以下は、v0.9.0からv0.10.0までのその他の主要な変更点です。"
|
||||
|
||||
#: ../../migrating_to_async.rst:21
|
||||
msgid "Event Registration"
|
||||
msgstr "イベント登録"
|
||||
|
||||
#: ../../migrating_to_async.rst:23
|
||||
msgid "All events before were registered using :meth:`Client.event`. While this is still possible, the events must be decorated with ``@asyncio.coroutine``."
|
||||
msgstr "以前まではすべてのイベントが :meth:`Client.event` を使用して登録されていました。このやり方はまだ可能ですが、 ``@asyncio.coroutine`` で修飾が必要です。"
|
||||
|
||||
#: ../../migrating_to_async.rst:26
|
||||
#: ../../migrating_to_async.rst:71
|
||||
#: ../../migrating_to_async.rst:105
|
||||
#: ../../migrating_to_async.rst:166
|
||||
msgid "Before:"
|
||||
msgstr "更新前:"
|
||||
|
||||
#: ../../migrating_to_async.rst:34
|
||||
#: ../../migrating_to_async.rst:83
|
||||
#: ../../migrating_to_async.rst:111
|
||||
#: ../../migrating_to_async.rst:174
|
||||
#: ../../migrating_to_async.rst:284
|
||||
msgid "After:"
|
||||
msgstr "更新後:"
|
||||
|
||||
#: ../../migrating_to_async.rst:43
|
||||
msgid "Or in Python 3.5+:"
|
||||
msgstr "Python 3.5以降の場合:"
|
||||
|
||||
#: ../../migrating_to_async.rst:51
|
||||
msgid "Because there is a lot of typing, a utility decorator (:meth:`Client.async_event`) is provided for easier registration. For example:"
|
||||
msgstr "多くの型付けがあるため、登録を簡単にするためにユーティリティデコレータ (:meth:`Client.async_event`) が用意されています。例:"
|
||||
|
||||
#: ../../migrating_to_async.rst:61
|
||||
msgid "Be aware however, that this is still a coroutine and your other functions that are coroutines must be decorated with ``@asyncio.coroutine`` or be ``async def``."
|
||||
msgstr "しかし、これはまだコルーチンであり、コルーチンである関数には ``@asyncio.coroutine`` あるいは ``async def`` での修飾が必要であることに注意してください。"
|
||||
|
||||
#: ../../migrating_to_async.rst:65
|
||||
msgid "Event Changes"
|
||||
msgstr "イベントの変更"
|
||||
|
||||
#: ../../migrating_to_async.rst:67
|
||||
msgid "Some events in v0.9.0 were considered pretty useless due to having no separate states. The main events that were changed were the ``_update`` events since previously they had no context on what was changed."
|
||||
msgstr "v0.9.0でいくつかのイベントは、別の状態を持たないために、役に立たないと考えられていました。変更された主なイベントは、更新前と更新後の二つの状態を持つ ``_update`` イベントです。"
|
||||
|
||||
#: ../../migrating_to_async.rst:93
|
||||
msgid "Note that ``on_status`` was removed. If you want its functionality, use :func:`on_member_update`. See :ref:`discord-api-events` for more information. Other removed events include ``on_socket_closed``, ``on_socket_receive``, and ``on_socket_opened``."
|
||||
msgstr "``on_status`` が削除されていることに注意してください。似たような機能が使いたい場合は、 :func:`on_member_update` を使用します。詳細は :ref:`discord-api-events` を参照してください。他に、 ``on_socket_closed`` 、 ``on_socket_receive`` や ``on_socket_opened`` も削除されています。"
|
||||
|
||||
#: ../../migrating_to_async.rst:98
|
||||
msgid "Coroutines"
|
||||
msgstr "コルーチン"
|
||||
|
||||
#: ../../migrating_to_async.rst:100
|
||||
msgid "The biggest change that the library went through is that almost every function in :class:`Client` was changed to be a `coroutine <py:library/asyncio-task.html>`_. Functions that are marked as a coroutine in the documentation must be awaited from or yielded from in order for the computation to be done. For example..."
|
||||
msgstr "ライブラリの最大の変更点は :class:`Client` を使用していたほとんどの関数が `コルーチン <py:library/asyncio-task.html>`_ へと変更されたことです。ドキュメントのコルーチンとして定義された関数は、処理の終了を待機します。例えば、"
|
||||
|
||||
#: ../../migrating_to_async.rst:120
|
||||
msgid "In order for you to ``yield from`` or ``await`` a coroutine then your function must be decorated with ``@asyncio.coroutine`` or ``async def``."
|
||||
msgstr "``yield from`` あるいは ``await`` を使用するには、関数が ``@asyncio.coroutine`` または ``async def`` で修飾されている必要があります。"
|
||||
|
||||
#: ../../migrating_to_async.rst:124
|
||||
msgid "Iterables"
|
||||
msgstr "イテラブル"
|
||||
|
||||
#: ../../migrating_to_async.rst:126
|
||||
msgid "For performance reasons, many of the internal data structures were changed into a dictionary to support faster lookup. As a consequence, this meant that some lists that were exposed via the API have changed into iterables and not sequences. In short, this means that certain attributes now only support iteration and not any of the sequence functions."
|
||||
msgstr "パフォーマンス上の理由から、より高速な情報の取得を可能とするため、多くの内部データ構造が辞書に変更されました。結果として、これはAPIを介して公開された一部リストが、シーケンスではなくイテラブルに変更されたことを意味します。つまるところ、現在、特定の属性はイテラブルのみをサポートしており、シーケンスを扱うことができないことを意味しています。"
|
||||
|
||||
#: ../../migrating_to_async.rst:131
|
||||
msgid "The affected attributes are as follows:"
|
||||
msgstr "影響を受ける属性は以下のとおりです。"
|
||||
|
||||
#: ../../migrating_to_async.rst:133
|
||||
msgid ":attr:`Client.servers`"
|
||||
msgstr ":attr:`Client.servers`"
|
||||
|
||||
#: ../../migrating_to_async.rst:134
|
||||
msgid ":attr:`Client.private_channels`"
|
||||
msgstr ":attr:`Client.private_channels`"
|
||||
|
||||
#: ../../migrating_to_async.rst:135
|
||||
msgid ":attr:`Server.channels`"
|
||||
msgstr ":attr:`Server.channels`"
|
||||
|
||||
#: ../../migrating_to_async.rst:136
|
||||
msgid ":attr:`Server.members`"
|
||||
msgstr ":attr:`Server.members`"
|
||||
|
||||
#: ../../migrating_to_async.rst:138
|
||||
msgid "Some examples of previously valid behaviour that is now invalid"
|
||||
msgstr "以前は有効であったが、現在は無効である操作の例。"
|
||||
|
||||
#: ../../migrating_to_async.rst:145
|
||||
msgid "Since they are no longer :obj:`list`\\s, they no longer support indexing or any operation other than iterating. In order to get the old behaviour you should explicitly cast it to a list."
|
||||
msgstr "これらは、既に :obj:`list` ではないため、インデックスや反復処理以外の操作はサポートされなくなりました。以前の動作で処理を行うには、listに明示的にキャストする必要があります。"
|
||||
|
||||
#: ../../migrating_to_async.rst:155
|
||||
msgid "Due to internal changes of the structure, the order you receive the data in is not in a guaranteed order."
|
||||
msgstr "構造の内部的な変更のため、データを受け取った順序は保証されません。"
|
||||
|
||||
#: ../../migrating_to_async.rst:159
|
||||
msgid "Enumerations"
|
||||
msgstr "列挙型"
|
||||
|
||||
#: ../../migrating_to_async.rst:161
|
||||
msgid "Due to dropping support for versions lower than Python 3.4.2, the library can now use :doc:`py:library/enum` in places where it makes sense."
|
||||
msgstr "Python 3.4.2以前のバージョンのサポートを打ち切ったため、ライブラリは理にかなった場所での :doc:`py:library/enum` の使用が可能になりました。"
|
||||
|
||||
#: ../../migrating_to_async.rst:164
|
||||
msgid "The common places where this was changed was in the server region, member status, and channel type."
|
||||
msgstr "変更された主な場所は、サーバーリージョン、メンバーのステータス、およびチャンネルタイプです。"
|
||||
|
||||
#: ../../migrating_to_async.rst:182
|
||||
msgid "The main reason for this change was to reduce the use of finicky strings in the API as this could give users a false sense of power. More information can be found in the :ref:`discord-api-enums` page."
|
||||
msgstr "この変更の主な理由は、APIでの厄介な文字列の使用を削減することでした。ユーザーに誤った感覚を与える可能性があったためです。詳細は :ref:`discord-api-enums` を参照してください。"
|
||||
|
||||
#: ../../migrating_to_async.rst:186
|
||||
msgid "Properties"
|
||||
msgstr "プロパティ"
|
||||
|
||||
#: ../../migrating_to_async.rst:188
|
||||
msgid "A lot of function calls that returned constant values were changed into Python properties for ease of use in format strings."
|
||||
msgstr "定数値を返す関数呼び出しの多くは、書式化した文字列での使いやすさ向上を図るため、Pythonのプロパティに変更されました。"
|
||||
|
||||
#: ../../migrating_to_async.rst:191
|
||||
msgid "The following functions were changed into properties:"
|
||||
msgstr "以下はプロパティに変更された関数です。"
|
||||
|
||||
#: ../../migrating_to_async.rst:194
|
||||
#: ../../migrating_to_async.rst:223
|
||||
#: ../../migrating_to_async.rst:238
|
||||
msgid "Before"
|
||||
msgstr "変更前"
|
||||
|
||||
#: ../../migrating_to_async.rst:194
|
||||
#: ../../migrating_to_async.rst:223
|
||||
#: ../../migrating_to_async.rst:238
|
||||
msgid "After"
|
||||
msgstr "変更後"
|
||||
|
||||
#: ../../migrating_to_async.rst:196
|
||||
msgid "``User.avatar_url()``"
|
||||
msgstr "``User.avatar_url()``"
|
||||
|
||||
#: ../../migrating_to_async.rst:196
|
||||
msgid ":attr:`User.avatar_url`"
|
||||
msgstr ":attr:`User.avatar_url`"
|
||||
|
||||
#: ../../migrating_to_async.rst:198
|
||||
msgid "``User.mention()``"
|
||||
msgstr "``User.mention()``"
|
||||
|
||||
#: ../../migrating_to_async.rst:198
|
||||
msgid ":attr:`User.mention`"
|
||||
msgstr ":attr:`User.mention`"
|
||||
|
||||
#: ../../migrating_to_async.rst:200
|
||||
msgid "``Channel.mention()``"
|
||||
msgstr "``Channel.mention()``"
|
||||
|
||||
#: ../../migrating_to_async.rst:200
|
||||
msgid ":attr:`Channel.mention`"
|
||||
msgstr ":attr:`Channel.mention`"
|
||||
|
||||
#: ../../migrating_to_async.rst:202
|
||||
msgid "``Channel.is_default_channel()``"
|
||||
msgstr "``Channel.is_default_channel()``"
|
||||
|
||||
#: ../../migrating_to_async.rst:202
|
||||
msgid ":attr:`Channel.is_default`"
|
||||
msgstr ":attr:`Channel.is_default`"
|
||||
|
||||
#: ../../migrating_to_async.rst:204
|
||||
msgid "``Role.is_everyone()``"
|
||||
msgstr "``Role.is_everyone()``"
|
||||
|
||||
#: ../../migrating_to_async.rst:204
|
||||
msgid ":attr:`Role.is_everyone`"
|
||||
msgstr ":attr:`Role.is_everyone`"
|
||||
|
||||
#: ../../migrating_to_async.rst:206
|
||||
msgid "``Server.get_default_role()``"
|
||||
msgstr "``Server.get_default_role()``"
|
||||
|
||||
#: ../../migrating_to_async.rst:206
|
||||
msgid ":attr:`Server.default_role`"
|
||||
msgstr ":attr:`Server.default_role`"
|
||||
|
||||
#: ../../migrating_to_async.rst:208
|
||||
msgid "``Server.icon_url()``"
|
||||
msgstr "``Server.icon_url()``"
|
||||
|
||||
#: ../../migrating_to_async.rst:208
|
||||
msgid ":attr:`Server.icon_url`"
|
||||
msgstr ":attr:`Server.icon_url`"
|
||||
|
||||
#: ../../migrating_to_async.rst:210
|
||||
msgid "``Server.get_default_channel()``"
|
||||
msgstr "``Server.get_default_channel()``"
|
||||
|
||||
#: ../../migrating_to_async.rst:210
|
||||
msgid ":attr:`Server.default_channel`"
|
||||
msgstr ":attr:`Server.default_channel`"
|
||||
|
||||
#: ../../migrating_to_async.rst:212
|
||||
msgid "``Message.get_raw_mentions()``"
|
||||
msgstr "``Message.get_raw_mentions()``"
|
||||
|
||||
#: ../../migrating_to_async.rst:212
|
||||
msgid ":attr:`Message.raw_mentions`"
|
||||
msgstr ":attr:`Message.raw_mentions`"
|
||||
|
||||
#: ../../migrating_to_async.rst:214
|
||||
msgid "``Message.get_raw_channel_mentions()``"
|
||||
msgstr "``Message.get_raw_channel_mentions()``"
|
||||
|
||||
#: ../../migrating_to_async.rst:214
|
||||
msgid ":attr:`Message.raw_channel_mentions`"
|
||||
msgstr ":attr:`Message.raw_channel_mentions`"
|
||||
|
||||
#: ../../migrating_to_async.rst:218
|
||||
msgid "Member Management"
|
||||
msgstr "メンバー管理"
|
||||
|
||||
#: ../../migrating_to_async.rst:220
|
||||
msgid "Functions that involved banning and kicking were changed."
|
||||
msgstr "BANやキックを含む関数が追加されました。"
|
||||
|
||||
#: ../../migrating_to_async.rst:225
|
||||
msgid "``Client.ban(server, user)``"
|
||||
msgstr "``Client.ban(server, user)``"
|
||||
|
||||
#: ../../migrating_to_async.rst:225
|
||||
msgid "``Client.ban(member)``"
|
||||
msgstr "``Client.ban(member)``"
|
||||
|
||||
#: ../../migrating_to_async.rst:227
|
||||
msgid "``Client.kick(server, user)``"
|
||||
msgstr "``Client.kick(server, user)``"
|
||||
|
||||
#: ../../migrating_to_async.rst:227
|
||||
msgid "``Client.kick(member)``"
|
||||
msgstr "``Client.kick(member)``"
|
||||
|
||||
#: ../../migrating_to_async.rst:233
|
||||
msgid "Renamed Functions"
|
||||
msgstr "関数の改名"
|
||||
|
||||
#: ../../migrating_to_async.rst:235
|
||||
msgid "Functions have been renamed."
|
||||
msgstr "いくつかの関数名が変更されました。"
|
||||
|
||||
#: ../../migrating_to_async.rst:240
|
||||
msgid "``Client.set_channel_permissions``"
|
||||
msgstr "``Client.set_channel_permissions``"
|
||||
|
||||
#: ../../migrating_to_async.rst:240
|
||||
#: ../../migrating_to_async.rst:263
|
||||
msgid ":meth:`Client.edit_channel_permissions`"
|
||||
msgstr ":meth:`Client.edit_channel_permissions`"
|
||||
|
||||
#: ../../migrating_to_async.rst:243
|
||||
msgid "All the :class:`Permissions` related attributes have been renamed and the `can_` prefix has been dropped. So for example, ``can_manage_messages`` has become ``manage_messages``."
|
||||
msgstr "すべての :class:`Permissions` 関連の属性の名称が変更され、 接頭詞であった `can_` が削除されました。例を挙げると ``can_manage_messages`` が ``manage_messages`` になりました。"
|
||||
|
||||
#: ../../migrating_to_async.rst:247
|
||||
msgid "Forced Keyword Arguments"
|
||||
msgstr "強制キーワード引数"
|
||||
|
||||
#: ../../migrating_to_async.rst:249
|
||||
msgid "Since 3.0+ of Python, we can now force questions to take in forced keyword arguments. A keyword argument is when you explicitly specify the name of the variable and assign to it, for example: ``foo(name='test')``. Due to this support, some functions in the library were changed to force things to take said keyword arguments. This is to reduce errors of knowing the argument order and the issues that could arise from them."
|
||||
msgstr "Python 3.0以降では、強制的にキーワード引数をとるようにすることができるようになりました。キーワード引数は、変数の名前を明示的に指定してそれに割り当てることで、例えば ``foo(name='test')`` などです。このサポートにより、ライブラリ内のいくつかの関数が変更され、キーワード引数を取るようになりました。これは引数の順序が誤っていることが原因で発生するエラーを減らすためです。"
|
||||
|
||||
#: ../../migrating_to_async.rst:254
|
||||
msgid "The following parameters are now exclusively keyword arguments:"
|
||||
msgstr "次のパラメータは、現在、排他的なキーワード引数です。"
|
||||
|
||||
#: ../../migrating_to_async.rst:256
|
||||
msgid ":meth:`Client.send_message`"
|
||||
msgstr ":meth:`Client.send_message`"
|
||||
|
||||
#: ../../migrating_to_async.rst:257
|
||||
msgid "``tts``"
|
||||
msgstr "``tts``"
|
||||
|
||||
#: ../../migrating_to_async.rst:259
|
||||
msgid ":meth:`Client.logs_from`"
|
||||
msgstr ":meth:`Client.logs_from`"
|
||||
|
||||
#: ../../migrating_to_async.rst:259
|
||||
msgid "``before``"
|
||||
msgstr "``before``"
|
||||
|
||||
#: ../../migrating_to_async.rst:260
|
||||
msgid "``after``"
|
||||
msgstr "``after``"
|
||||
|
||||
#: ../../migrating_to_async.rst:262
|
||||
msgid "``allow``"
|
||||
msgstr "``allow``"
|
||||
|
||||
#: ../../migrating_to_async.rst:263
|
||||
msgid "``deny``"
|
||||
msgstr "``deny``"
|
||||
|
||||
#: ../../migrating_to_async.rst:265
|
||||
msgid "In the documentation you can tell if a function parameter is a forced keyword argument if it is after ``\\*,`` in the function signature."
|
||||
msgstr "ドキュメントでは、関数シグネチャ内の ``\\*,`` の後に引数があるかどうかで、関数の引数が強制的なキーワード引数であるかを知ることができます。"
|
||||
|
||||
#: ../../migrating_to_async.rst:271
|
||||
msgid "Running the Client"
|
||||
msgstr "クライアントの実行"
|
||||
|
||||
#: ../../migrating_to_async.rst:273
|
||||
msgid "In earlier versions of discord.py, ``client.run()`` was a blocking call to the main thread that called it. In v0.10.0 it is still a blocking call but it handles the event loop for you. However, in order to do that you must pass in your credentials to :meth:`Client.run`."
|
||||
msgstr "以前のバージョンのdiscord.pyでは ``client.run()`` は呼び出したメインスレッドをブロッキングするブロック付き呼び出しでした。v0.10.0でも未だブロック付き呼び出しですが、イベントループで処理を行います。ただし、それを行うためには認証情報を :meth:`Client.run` に渡す必要があります。"
|
||||
|
||||
#: ../../migrating_to_async.rst:277
|
||||
msgid "Basically, before:"
|
||||
msgstr "以前:"
|
||||
|
||||
#: ../../migrating_to_async.rst:292
|
||||
msgid "Like in the older ``Client.run`` function, the newer one must be the one of the last functions to call. This is because the function is **blocking**. Registering events or doing anything after :meth:`Client.run` will not execute until the function returns."
|
||||
msgstr "以前の ``Client.run`` 同様、新しくなった関数も最後に呼び出す必要があります。これは関数がブロッキングを行うためです。 :meth:`Client.run` の後に何かを定義しても、この関数が終了するまで、それらの処理は行われません。"
|
||||
|
||||
#: ../../migrating_to_async.rst:297
|
||||
msgid "This is a utility function that abstracts the event loop for you. There's no need for the run call to be blocking and out of your control. Indeed, if you want control of the event loop then doing so is quite straightforward:"
|
||||
msgstr "これはイベントループを抽象化するユーティリティ関数です。 実行呼び出しがブロックされ、コントロールから外れる必要はありません。実際に、イベントループを制御したい場合、この方法では非常に簡単です。"
|
||||
|
@ -1,91 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-22 09:35-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Japanese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Crowdin-Project: discordpy\n"
|
||||
"X-Crowdin-Project-ID: 362783\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: quickstart.pot\n"
|
||||
"X-Crowdin-File-ID: 50\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../quickstart.rst:6
|
||||
msgid "Quickstart"
|
||||
msgstr "クイックスタート"
|
||||
|
||||
#: ../../quickstart.rst:8
|
||||
msgid "This page gives a brief introduction to the library. It assumes you have the library installed, if you don't check the :ref:`installing` portion."
|
||||
msgstr "ここでは、ライブラリの概要を説明します。ライブラリがインストールされていることを前提としているので、インストールを終えていない人は :ref:`installing` を参照してください。"
|
||||
|
||||
#: ../../quickstart.rst:12
|
||||
msgid "A Minimal Bot"
|
||||
msgstr "最小限のBot"
|
||||
|
||||
#: ../../quickstart.rst:14
|
||||
msgid "Let's make a bot that replies to a specific message and walk you through it."
|
||||
msgstr "では早速、特定のメッセージに対して、返事をするBotを作ってみましょう。"
|
||||
|
||||
#: ../../quickstart.rst:16
|
||||
msgid "It looks something like this:"
|
||||
msgstr "結論から書くと、このように書くことができます。"
|
||||
|
||||
#: ../../quickstart.rst:38
|
||||
msgid "Let's name this file ``example_bot.py``. Make sure not to name it ``discord.py`` as that'll conflict with the library."
|
||||
msgstr "ファイルの名前を ``example_bot.py`` としましょう。ライブラリと競合してしまうので、 ``discord.py`` というファイル名にはしないでください。"
|
||||
|
||||
#: ../../quickstart.rst:41
|
||||
msgid "There's a lot going on here, so let's walk you through it step by step."
|
||||
msgstr "さて、では順を追って一つづつ説明していきます。"
|
||||
|
||||
#: ../../quickstart.rst:43
|
||||
msgid "The first line just imports the library, if this raises a `ModuleNotFoundError` or `ImportError` then head on over to :ref:`installing` section to properly install."
|
||||
msgstr "最初の行は、ただライブラリをインポートしただけです。 `ModuleNotFoundError` や `ImportError` が発生した場合は :ref:`installing` を見て、ライブラリをきちんとインストールしましょう。"
|
||||
|
||||
#: ../../quickstart.rst:45
|
||||
msgid "Next, we create an instance of a :class:`Client`. This client is our connection to Discord."
|
||||
msgstr "次に、 :class:`Client` のインスタンスを作成します。クライアントはDiscordへの接続を行います。"
|
||||
|
||||
#: ../../quickstart.rst:46
|
||||
msgid "We then use the :meth:`Client.event` decorator to register an event. This library has many events. Since this library is asynchronous, we do things in a \"callback\" style manner."
|
||||
msgstr "続いて、 :meth:`Client.event` デコレータを使用してイベントを登録します。ライブラリにはたくさんのイベントが用意されています。このライブラリは非同期のため、「コールバック」のスタイルで処理を行います。"
|
||||
|
||||
#: ../../quickstart.rst:49
|
||||
msgid "A callback is essentially a function that is called when something happens. In our case, the :func:`on_ready` event is called when the bot has finished logging in and setting things up and the :func:`on_message` event is called when the bot has received a message."
|
||||
msgstr "コールバックは基本的に、何かが発生した場合に呼び出される関数です。今回の場合だと、Botがログインして、設定などを終えたときに :func:`on_ready` が、メッセージを受信したときに :func:`on_message` が呼び出されます。"
|
||||
|
||||
#: ../../quickstart.rst:52
|
||||
msgid "Since the :func:`on_message` event triggers for *every* message received, we have to make sure that we ignore messages from ourselves. We do this by checking if the :attr:`Message.author` is the same as the :attr:`Client.user`."
|
||||
msgstr ":func:`on_message` イベントは受信したメッセージすべてに対して呼び出されるため、Bot自身からのメッセージは無視するように設定する必要があります。これは、メッセージの送信者である :attr:`Message.author` と、Bot自身を表す :attr:`Client.user` が等しいか比較することで実装できます。"
|
||||
|
||||
#: ../../quickstart.rst:55
|
||||
msgid "Afterwards, we check if the :class:`Message.content` starts with ``'$hello'``. If it is, then we reply in the channel it was used in with ``'Hello!'``."
|
||||
msgstr "その後、 :class:`Message.content` が ``'$hello'`` から始まるかどうかを確認し、当てはまればそのチャンネルに ``'Hello!'`` という返事を送信します。"
|
||||
|
||||
#: ../../quickstart.rst:57
|
||||
msgid "Finally, we run the bot with our login token. If you need help getting your token or creating a bot, look in the :ref:`discord-intro` section."
|
||||
msgstr "最後に、ログイン用トークンを用いてBotを起動します。トークンの取得やBotの作成について分からないことがあれば、 :ref:`discord-intro` を参照してください。"
|
||||
|
||||
#: ../../quickstart.rst:61
|
||||
msgid "Now that we've made a bot, we have to *run* the bot. Luckily, this is simple since this is just a Python script, we can run it directly."
|
||||
msgstr "さて、これでBotは完成なので、Botを *実行* してみましょう。幸いにも、これはただのPythonスクリプトなので実行は簡単です。直接実行が可能です。"
|
||||
|
||||
#: ../../quickstart.rst:64
|
||||
msgid "On Windows:"
|
||||
msgstr "Windowsの場合:"
|
||||
|
||||
#: ../../quickstart.rst:70
|
||||
msgid "On other systems:"
|
||||
msgstr "その他のシステムの場合:"
|
||||
|
||||
#: ../../quickstart.rst:76
|
||||
msgid "Now you can try playing around with your basic bot."
|
||||
msgstr "これで、あなたが作ったBotと遊ぶことができます。"
|
||||
|
@ -1,23 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-22 09:35-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Japanese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Crowdin-Project: discordpy\n"
|
||||
"X-Crowdin-Project-ID: 362783\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: sphinx.pot\n"
|
||||
"X-Crowdin-File-ID: 70\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../_templates/layout.html:24
|
||||
msgid "Created using <a href=\"http://sphinx-doc.org/\">Sphinx</a> %(sphinx_version)s."
|
||||
msgstr "<a href=\"http://sphinx-doc.org/\">Sphinx</a> %(sphinx_version)s で作成されました。"
|
||||
|
@ -1,79 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discordpy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-22 09:35-0400\n"
|
||||
"PO-Revision-Date: 2020-10-24 02:41\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Japanese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Crowdin-Project: discordpy\n"
|
||||
"X-Crowdin-Project-ID: 362783\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: version_guarantees.pot\n"
|
||||
"X-Crowdin-File-ID: 46\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../version_guarantees.rst:4
|
||||
msgid "Version Guarantees"
|
||||
msgstr "バージョン保証"
|
||||
|
||||
#: ../../version_guarantees.rst:6
|
||||
msgid "The library follows a `semantic versioning principle <https://semver.org/>`_ which means that the major version is updated every time there is an incompatible API change. However due to the lack of guarantees on the Discord side when it comes to breaking changes along with the fairly dynamic nature of Python it can be hard to discern what can be considered a breaking change and what isn't."
|
||||
msgstr "このライブラリは `セマンティック バージョニングの原則 <https://semver.org/>`_ に従います。それが意味するのは、互換性のないAPIの変更が行われるたびにメジャーバージョンが更新されるということです。しかしながら、Discord側にはPythonの非常に動的な性質とともに破壊的変更を行う際の保証がないため、破壊的変更とみなされるもの、そうでないものを区別するのは困難です。"
|
||||
|
||||
#: ../../version_guarantees.rst:8
|
||||
msgid "The first thing to keep in mind is that breaking changes only apply to **publicly documented functions and classes**. If it's not listed in the documentation here then it is not part of the public API and is thus bound to change. This includes attributes that start with an underscore or functions without an underscore that are not documented."
|
||||
msgstr "最初に覚えておくべきことは、破壊的変更は **公開ドキュメント化してある関数とクラス** のみに適用されるということです。ドキュメントにないものはパブリックAPIの一部ではないため、変更される可能性があります。これにはドキュメントに載っていないアンダースコアから始まる関数や、通常の関数が含まれます。"
|
||||
|
||||
#: ../../version_guarantees.rst:12
|
||||
msgid "The examples below are non-exhaustive."
|
||||
msgstr "以下の例は網羅的なものではありません。"
|
||||
|
||||
#: ../../version_guarantees.rst:15
|
||||
msgid "Examples of Breaking Changes"
|
||||
msgstr "破壊的変更の例"
|
||||
|
||||
#: ../../version_guarantees.rst:17
|
||||
msgid "Changing the default parameter value to something else."
|
||||
msgstr "デフォルトのパラメータ値を別のものに変更。"
|
||||
|
||||
#: ../../version_guarantees.rst:18
|
||||
msgid "Renaming a function without an alias to an old function."
|
||||
msgstr "古い関数へのエイリアスのない関数の名称を変更。"
|
||||
|
||||
#: ../../version_guarantees.rst:19
|
||||
msgid "Adding or removing parameters to an event."
|
||||
msgstr "イベントへのパラメータの追加、あるいは削除。"
|
||||
|
||||
#: ../../version_guarantees.rst:22
|
||||
msgid "Examples of Non-Breaking Changes"
|
||||
msgstr "破壊的変更ではないものの例"
|
||||
|
||||
#: ../../version_guarantees.rst:24
|
||||
msgid "Adding or removing private underscored attributes."
|
||||
msgstr "アンダースコア付きのプライベート関数の追加、あるいは削除。"
|
||||
|
||||
#: ../../version_guarantees.rst:25
|
||||
msgid "Adding an element into the ``__slots__`` of a data class."
|
||||
msgstr "データクラスの ``__slots__`` への要素の追加。"
|
||||
|
||||
#: ../../version_guarantees.rst:26
|
||||
msgid "Changing the behaviour of a function to fix a bug."
|
||||
msgstr "バグ修正のための関数の動作の変更。"
|
||||
|
||||
#: ../../version_guarantees.rst:27
|
||||
msgid "Changes in the documentation."
|
||||
msgstr "ドキュメントの変更。"
|
||||
|
||||
#: ../../version_guarantees.rst:28
|
||||
msgid "Modifying the internal HTTP handling."
|
||||
msgstr "内部HTTP処理の変更。"
|
||||
|
||||
#: ../../version_guarantees.rst:29
|
||||
msgid "Upgrading the dependencies to a new version, major or otherwise."
|
||||
msgstr "依存関係をメジャー、またはそれ以外の新しいバージョンへアップグレード。"
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user