Add stubs for Japanese translations.
This commit is contained in:
3100
docs/locale/ja/LC_MESSAGES/ext/commands/api.po
Normal file
3100
docs/locale/ja/LC_MESSAGES/ext/commands/api.po
Normal file
File diff suppressed because it is too large
Load Diff
665
docs/locale/ja/LC_MESSAGES/ext/commands/commands.po
Normal file
665
docs/locale/ja/LC_MESSAGES/ext/commands/commands.po
Normal file
@ -0,0 +1,665 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2015-2017, Rapptz
|
||||
# This file is distributed under the same license as the discord.py package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discord.py 1.0.0a\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-07-31 14:21-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"
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:34
|
||||
msgid "Essentially, these two are equivalent: ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:132
|
||||
msgid ""
|
||||
"Since the ``args`` variable is a `tuple "
|
||||
"<https://docs.python.org/3/library/stdtypes.html#sequence-types-list-"
|
||||
"tuple-range>`_, 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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:174
|
||||
msgid ":attr:`.Context.message` to fetch the :class:`Message` of the command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:175
|
||||
msgid ""
|
||||
":attr:`.Context.author` to fetch the :class:`Member` or :class:`User` "
|
||||
"that called the command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:176
|
||||
msgid ""
|
||||
":meth:`.Context.send` to send a message to the channel the command was "
|
||||
"used in."
|
||||
msgstr ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:194
|
||||
msgid "A custom class that inherits from :class:`~ext.commands.Converter`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../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 ""
|
||||
|
||||
#: ../../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:227
|
||||
msgid "Advanced Converters"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:229
|
||||
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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:232
|
||||
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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:236
|
||||
msgid "An example converter:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:251
|
||||
msgid ""
|
||||
"The converter provided can either be constructed or not. Essentially "
|
||||
"these two are equivalent:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:265
|
||||
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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:281
|
||||
msgid ""
|
||||
"If a converter fails to convert an argument to its designated target "
|
||||
"type, the :exc:`.BadArgument` exception must be raised."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:285
|
||||
msgid "Discord Converters"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:287
|
||||
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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:290
|
||||
msgid ""
|
||||
"For example, to receive a :class:`Member`, you can just pass it as a "
|
||||
"converter:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:298
|
||||
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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:302
|
||||
msgid "A lot of discord models work out of the gate as a parameter:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:304 ../../ext/commands/commands.rst:325
|
||||
msgid ":class:`Member`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:305 ../../ext/commands/commands.rst:327
|
||||
msgid ":class:`User`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:306 ../../ext/commands/commands.rst:329
|
||||
msgid ":class:`TextChannel`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:307 ../../ext/commands/commands.rst:331
|
||||
#: ../../ext/commands/commands.rst:333
|
||||
msgid ":class:`VoiceChannel`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:308
|
||||
msgid ":class:`CategoryChannel`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:309 ../../ext/commands/commands.rst:335
|
||||
msgid ":class:`Role`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:310 ../../ext/commands/commands.rst:337
|
||||
msgid ":class:`Invite`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:311 ../../ext/commands/commands.rst:339
|
||||
msgid ":class:`Game`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:312 ../../ext/commands/commands.rst:341
|
||||
msgid ":class:`Emoji`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:313 ../../ext/commands/commands.rst:343
|
||||
msgid ":class:`PartialEmoji`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:314 ../../ext/commands/commands.rst:345
|
||||
msgid ":class:`Colour`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:316
|
||||
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:319
|
||||
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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:323
|
||||
msgid "Discord Class"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:323
|
||||
msgid "Converter"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:325
|
||||
msgid ":class:`~ext.commands.MemberConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:327
|
||||
msgid ":class:`~ext.commands.UserConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:329
|
||||
msgid ":class:`~ext.commands.TextChannelConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:331
|
||||
msgid ":class:`~ext.commands.VoiceChannelConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:333
|
||||
msgid ":class:`~ext.commands.CategoryChannelConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:335
|
||||
msgid ":class:`~ext.commands.RoleConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:337
|
||||
msgid ":class:`~ext.commands.InviteConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:339
|
||||
msgid ":class:`~ext.commands.GameConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:341
|
||||
msgid ":class:`~ext.commands.EmojiConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:343
|
||||
msgid ":class:`~ext.commands.PartialEmojiConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:345
|
||||
msgid ":class:`~ext.commands.ColourConverter`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:348
|
||||
msgid ""
|
||||
"By providing the converter it allows us to use them as building blocks "
|
||||
"for another converter:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:363
|
||||
msgid "Inline Advanced Converters"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:365
|
||||
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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:368
|
||||
msgid ""
|
||||
"For example, a common idiom would be to have a class and a converter for "
|
||||
"that class:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:394
|
||||
msgid ""
|
||||
"This can get tedious, so an inline advanced converter is possible through"
|
||||
" a ``classmethod`` inside the type:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:423
|
||||
msgid "Error Handling"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:425
|
||||
msgid ""
|
||||
"When our commands fail to either 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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:428
|
||||
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:432
|
||||
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:448
|
||||
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:452
|
||||
msgid "Checks"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:454
|
||||
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 ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:458
|
||||
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:461
|
||||
msgid "Return ``True`` to signal that the person can run the command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:462
|
||||
msgid "Return ``False`` to signal that the person cannot run the command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:463
|
||||
msgid ""
|
||||
"Raise a :exc:`~ext.commands.CommandError` derived exception to signal the"
|
||||
" person cannot run the command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:465
|
||||
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:468
|
||||
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:482
|
||||
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:499
|
||||
msgid ""
|
||||
"Since an owner check is so common, the library provides it for you "
|
||||
"(:func:`~ext.commands.is_owner`):"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:509
|
||||
msgid "When multiple checks are specified, **all** of them must be ``True``:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:524
|
||||
msgid ""
|
||||
"If any of those checks fail in the example above, then the command will "
|
||||
"not be run."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:526
|
||||
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:543
|
||||
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:568
|
||||
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:571
|
||||
msgid "Global Checks"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:573
|
||||
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:576
|
||||
msgid ""
|
||||
"Global checks work similarly to regular checks except they are registered"
|
||||
" with the :func:`.Bot.check` decorator."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:578
|
||||
msgid "For example, to block all DMs we could do the following:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:588
|
||||
msgid ""
|
||||
"Be careful on how you write your global checks, as it could also lock you"
|
||||
" out of your own bot."
|
||||
msgstr ""
|
||||
|
33
docs/locale/ja/LC_MESSAGES/ext/commands/index.po
Normal file
33
docs/locale/ja/LC_MESSAGES/ext/commands/index.po
Normal file
@ -0,0 +1,33 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2015-2017, Rapptz
|
||||
# This file is distributed under the same license as the discord.py package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discord.py 1.0.0a\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-07-31 14:21-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"
|
||||
|
||||
#: ../../ext/commands/index.rst:2
|
||||
msgid "``discord.ext.commands`` -- Bot commands framework"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/index.rst:4
|
||||
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 ""
|
||||
|
Reference in New Issue
Block a user