You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/locale/ja/LC_MESSAGES/faq.po
+63-11Lines changed: 63 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@ msgid ""
2
2
msgstr ""
3
3
"Project-Id-Version: discordpy\n"
4
4
"Report-Msgid-Bugs-To: \n"
5
-
"POT-Creation-Date: 2023-06-21 01:17+0000\n"
6
-
"PO-Revision-Date: 2024-04-17 02:43\n"
5
+
"POT-Creation-Date: 2025-08-18 19:11+0000\n"
6
+
"PO-Revision-Date: 2025-08-25 18:06\n"
7
7
"Last-Translator: \n"
8
8
"Language-Team: Japanese\n"
9
9
"MIME-Version: 1.0\n"
@@ -439,8 +439,8 @@ msgid "This requires three steps."
439
439
msgstr"これには3つのステップが必要です。"
440
440
441
441
#:../../faq.rst:442
442
-
msgid"Attach a message to the :class:`~discord.ui.View` using either the return type of :meth:`~abc.Messageable.send` or retrieving it via :meth:`Interaction.original_response`."
msgid"Attach a message to the :class:`~discord.ui.View` using either the return type of :meth:`~abc.Messageable.send` or retrieving it via :attr:`InteractionCallbackResponse.resource`."
443
+
msgstr""
444
444
445
445
#:../../faq.rst:443
446
446
msgid"Inside :meth:`~ui.View.on_timeout`, loop over all items inside the view and mark them disabled."
@@ -455,30 +455,82 @@ msgid "Putting it all together, we can do this in a text command:"
455
455
msgstr"すべてをまとめると、テキストコマンドではこのように行うことができます。"
456
456
457
457
#:../../faq.rst:470
458
-
msgid"Application commands do not return a message when you respond with :meth:`InteractionResponse.send_message`, therefore in order to reliably do this we should retrieve the message using :meth:`Interaction.original_response`."
msgid"Application commands, when you respond with :meth:`InteractionResponse.send_message`, return an instance of :class:`InteractionCallbackResponse` which contains the message you sent. This is the message you should attach to the view."
459
+
msgstr""
460
460
461
461
#:../../faq.rst:472
462
462
msgid"Putting it all together, using the previous view definition:"
463
463
msgstr"以前のビューの定義を使用して、すべてをまとめます。"
464
464
465
-
#:../../faq.rst:487
465
+
#:../../faq.rst:490
466
466
msgid"Application Commands"
467
467
msgstr"アプリケーションコマンド"
468
468
469
-
#:../../faq.rst:489
469
+
#:../../faq.rst:492
470
470
msgid"Questions regarding Discord's new application commands, commonly known as \"slash commands\" or \"context menu commands\"."
msgid"Did you invite your bot with the correct permissions? Bots need to be invited with the ``applications.commands`` scope in addition to the ``bot`` scope. For example, invite the bot with the following URL: ``https://discord.com/oauth2/authorize?client_id=<client id>&scope=applications.commands+bot``. Alternatively, if you use :func:`utils.oauth_url`, you can call the function as such: ``oauth_url(<other options>, scopes=(\"bot\", \"applications.commands\"))``."
msgid"How do I restrict a command to a specific guild?"
487
+
msgstr""
488
+
489
+
#:../../faq.rst:507
490
+
msgid"To restrict an application command to one or more guilds, you must register it as a **guild command** instead of a global command. Guild commands are only available in the specified guild(s)."
491
+
msgstr""
492
+
493
+
#:../../faq.rst:510
494
+
msgid"The most straightforward way is to use the :meth:`~app_commands.guilds` decorator on your command or GroupCog."
495
+
msgstr""
496
+
497
+
#:../../faq.rst:512
498
+
msgid"``123456789012345678`` should be replaced with the actual guild ID you want to restrict the command to."
499
+
msgstr""
500
+
501
+
#:../../faq.rst:529
502
+
msgid"After that, you must :meth:`~app_commands.CommandTree.sync` the command tree for each guild:"
503
+
msgstr""
504
+
505
+
#:../../faq.rst:535
506
+
msgid"Other methods to restrict commands to specific guilds include:"
507
+
msgstr""
508
+
509
+
#:../../faq.rst:537
510
+
msgid"Using the ``guild`` or ``guilds`` argument in the :meth:`~app_commands.CommandTree.command` decorator:"
511
+
msgstr""
512
+
513
+
#:../../faq.rst:545
514
+
msgid"Adding commands with :meth:`~app_commands.CommandTree.add_command` and specifying ``guild`` or ``guilds``:"
515
+
msgstr""
516
+
517
+
#:../../faq.rst:557
518
+
msgid"Do not combine this method with the :meth:`~app_commands.CommandTree.command` decorator, as it will cause duplicate commands."
519
+
msgstr""
520
+
521
+
#:../../faq.rst:560
522
+
msgid"Using ``guild`` or ``guilds`` in :meth:`~ext.commands.Bot.add_cog`:"
523
+
msgstr""
524
+
525
+
#:../../faq.rst:562
526
+
msgid"This is mainly for :class:`~ext.commands.GroupCog`, but also works for cogs with application commands. Note: This does not work with hybrid app commands (:issue:`9366`)."
0 commit comments