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**."
msgid "**This is not the Client Secret at the General Information page**"
msgstr "**これはClient Secretではありません。**"
#: ../../discord.rst:39
msgid "Look at the image above to see where the **Token** is."
msgstr "上記画像を参照し、 **Token** の位置を確認してください。"
#: ../../discord.rst:43
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."
#: ../../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 "
msgid "Copy paste that into the pre-formatted URL:"
msgstr "コピーしたものを予めフォーマットされたURLにコピーします。"
msgid "Click on your bot's page."
msgstr ""
#: ../../discord.rst:67
msgid "Go to the \"OAuth2\" tab."
msgstr ""
#: ../../discord.rst:72
msgid "Replace ``YOUR_CLIENT_ID`` with the Client ID we got in the previous step. For example, in the image above our client ID is 312777964700041216 so the resulting URL would be https://discordapp.com/oauth2/authorize?client_id=312777964700041216&scope=bot&permissions=0 (note that this bot has been deleted)."
"Please be aware of the consequences of requiring your bot to have the "
"\"Administrator\" permission."
msgstr ""
#: ../../discord.rst:84
msgid "Bot accounts can request specific permissions to be granted upon joining. When the bot joins the guild, they will be granted a managed role that contains the permissions you requested. If the permissions is 0, then no special role is created."
"-Setting-up-Two-Factor-Authentication>`_ for more information."
msgstr ""
#: ../../discord.rst:88
msgid "This ``permissions`` value is calculated based on bit-wise arithmetic. Thankfully, people have created a calculator that makes it easy to calculate the permissions necessary visually."
msgid "Feel free to use whichever is easier for you to grasp."
msgstr "使いやすい方を選んでください。"
msgid "The person adding the bot needs \"Manage Server\" permissions to do so."
msgstr ""
#: ../../discord.rst:96
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`."
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**."
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."
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')``."
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``."
"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 ""
#: ../../ext/commands/extensions.rst:51
msgid "Once we remove and load the extension, any changes that we did will be applied upon load. This is useful if we want to add or remove functionality without restarting our bot."
"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 ""
#: ../../ext/commands/extensions.rst:54
#: ../../ext/commands/extensions.rst:53
msgid "Cleaning Up"
msgstr "クリーンアップ"
#: ../../ext/commands/extensions.rst:56
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."
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."
msgid ""
"This is a list of Frequently Asked Questions regarding using "
"``discord.py`` and its extension modules. Feel free to suggest a new "
msgid "A coroutine 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."
@ -54,7 +65,9 @@ msgid "Where can I use ``await``\\?"
msgstr "``await`` はどこで使用することができますか。"
#: ../../faq.rst:31
msgid "You can only use ``await`` inside ``async def`` functions and nowhere else."
msgid ""
"You can only use ``await`` inside ``async def`` functions and nowhere "
"else."
msgstr "``await`` は ``async def`` 関数の中でのみ使用できます。"
#: ../../faq.rst:34
@ -62,16 +75,40 @@ 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."
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: ::"
msgid "Another common source of blocking for too long is using HTTP requests with the famous module ``requests``. While ``requests`` 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 ``aiohttp`` library which is installed on the side with this library."
@ -90,12 +127,22 @@ msgid "How do I set the \"Playing\" status?"
msgstr "「プレイ中」状態の設定をするにはどうすればいいですか。"
#: ../../faq.rst:77
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."
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:"
msgid "If you want to upload something from a URL, you will have to use an HTTP request using ``aiohttp`` and then pass an :class:`io.BytesIO` instance to :class:`File` like so:"
@ -154,7 +212,10 @@ msgid "You use the :meth:`Message.add_reaction` method."
msgstr ":meth:`Client.add_reaction` を使用してください。"
#: ../../faq.rst:144
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:"
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 "
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."
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."
msgid "How do I pass a coroutine to the player's \"after\" function?"
msgstr "どうやってコルーチンをプレイヤーの後処理に渡すのですか。"
#: ../../faq.rst:175
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."
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."
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: ::"
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: ::"
@ -278,8 +388,15 @@ msgid "In a simple command defined as: ::"
msgstr "次の簡単なコマンドを見てみましょう。"
#: ../../faq.rst:261
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\"`` のようにしてコマンドを実行するか、コマンドの引数を下記の例のようにしてみましょう"
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. "
@ -302,8 +423,13 @@ msgid "How do I make a subcommand?"
msgstr "サブコマンドを作るにはどうすればいいですか。"
#: ../../faq.rst:285
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."